Computes the inverse and determinant of a matrix. More...
Computes the inverse and determinant of a matrix.
This program computes the inverse and determinant of a square real matrix using the routines in Module DetInverse.c. The following option flags are accepted:
-n] Generates a random symmetric size \(\times\)size metric. If this option is not given, -n 3 is assumed. This option (or its default) is overridden by the -i option, below. -i] Reads a matrix from an input file infile using the function LALSReadVector(). If the input file is specified as stdin, the data is read from standard input (not a file named stdin). -o] Writes the determinant and inverse matrix to an output file outfile. If the output file is specified as stdout or stderr, the data is written to standard output or standard error (not to files named stdout or stderr). -v] Specifies that the inverse matrix is to be computed as well the determinant. -t] Specifies that the computation is to be timed; timing information is written to stderr. -s] Specifies that the calculations are to be done to single-precision (REAL4) rather than double-precision (REAL8). -d] Sets the debug level to debuglevel. If not specified, level 0 is assumed. LALDReadVector(), or LALSReadVector() if the -s option was given. The data block may be preceded by blank or comment lines (lines containing no parseable numbers), but once a parseable number is found, the rest should follow in a contiguous block. If the lines contain different numbers of data columns, or if there are fewer lines than columns, then an error is returned; if there are more lines than columns, then the extra lines are ignored.-v option is specified, then another blank line will be appended to the output, followed by the inverse matrix written as \(N\) lines of \(N\) whitespace-separated numbers. Definition in file DetInverseTest.c.
Go to the source code of this file.
Macros | |
Error Codes | |
| #define | DETINVERSETESTC_ENORM 0 |
| Normal exit. More... | |
| #define | DETINVERSETESTC_ESUB 1 |
| Subroutine failed. More... | |
| #define | DETINVERSETESTC_EARG 2 |
| Error parsing arguments. More... | |
| #define | DETINVERSETESTC_EMEM 3 |
| Out of memory. More... | |
| #define | DETINVERSETESTC_EFILE 4 |
| Could not open file. More... | |
| #define | DETINVERSETESTC_EFMT 5 |
| Bad input file format. More... | |
| #define DETINVERSETESTC_ENORM 0 |
Normal exit.
Definition at line 87 of file DetInverseTest.c.
| #define DETINVERSETESTC_ESUB 1 |
Subroutine failed.
Definition at line 88 of file DetInverseTest.c.
| #define DETINVERSETESTC_EARG 2 |
Error parsing arguments.
Definition at line 89 of file DetInverseTest.c.
| #define DETINVERSETESTC_EMEM 3 |
Out of memory.
Definition at line 90 of file DetInverseTest.c.
| #define DETINVERSETESTC_EFILE 4 |
Could not open file.
Definition at line 91 of file DetInverseTest.c.
| #define DETINVERSETESTC_EFMT 5 |
Bad input file format.
Definition at line 92 of file DetInverseTest.c.