matcmp(1) matcmp(1)
NAME
matcmp - matrix comparison facility, command line version
SYNOPSIS (SYNTAX)
matcmp [-sparse] [-tol ] [-list] [operator]
|
DESCRIPTION
Performs a comparison between two matrices or between a matrix and a
constant, and displays the output in textual format. The input files
file1 and file2 contain snapshot summaries of matrix contents in the
format described in mcf(5). The last argument to the command may either
be a filename or a constant. It is assumed to be a file, but if no such
file exists, it is considered a constant. The constant should be
specified as either an integer or a floating point number (see options
for examples).
An optional operator determines how the comparison is performed. Six
predefined operators may be specified using C-like or Fortran-like
notation. The following list provides all the valid operators:
EQ "=" GT ">" GE ">=" LT "<" LE "<="
If the argument is not a predefined operator, it is assumed to be a
user-defined comparison function (see mcf(5) for description). If an
operator is not provided, a default of equality is assumed.
An optional tolerance determines if an element in the result matrix is
a mismatch or not. Only elements whose value exceeds the tolerance are
counted as mismatches. If no tolerance value is specified, a default
of 0.0 is assumed.
OPTIONS
-sparse indicates that the matrix snapshots are in
sparse format (see mcf(5) for file formats).
Dense format is assumed by default.
-tol apply tolerance instead of the default of 0.0.
The tolerance is specified as either an integer
or a floating point number. Examples of valid
values for tolerance are: 8.197620, -4, 0.495-13.045, etc.
-list list all mismatches, showing the indices and
the value of each.
EXAMPLES
matcmp base_file new_file
** Test: base.mcf EQ new.mcf (tol = 0.0000000000e+00) **
Number of mismatches: 346
Magnitude of average mismatch: 5.7500000000e+00
Magnitude of worst case mismatch: 9.0000000000e+00
matcmp base_file LT 4.7
** Test: base.mcf LT 4.7 (tol = 0.0000000000e+00) **
Number of mismatches: 720
Magnitude of average mismatch: 1.0245000000e+01
Magnitude of worst case mismatch: 1.3245000000e+01
matcmp -tol 13.25 base_file LT 4.7
** Test: base.mcf LT 4.7 (tol = 1.3250000000e+01) **
No mismatches found.
matcmp -list -sparse sp1 GT 1
** Test: sp1.mcf GT 1 (tol = 0.0000000000e+00) **
Number of mismatches: 3
(1,10) 9.0000000000e-00
(2,1) 1.0000000000e-01
(2,9) 7.0000000000e-00
Magnitude of average mismatch: 9.0000000000e+00
Magnitude of worst case mismatch: 1.0000000000e+01
SEE ALSO
xmatcmp(1), mcf(5)
COPYRIGHT
The design and implementation of the Matrix Comparison Facility
(MCF) are available for royalty-free adoption and use for
non-commercial purposes, by any public or private organization.
Copyright is retained by Oregon State University.
Redistribution of any part of MCF or any derivative works must
include this notice.
MCF was developed by Bhanu Balasubramaniam, Department of Computer
Science, Oregon State University, 1995.
Back to MCF home page