Engauge Digitizer 2
|
Matrix class that supports arbitrary NxN size. More...
#include <Matrix.h>
Public Member Functions | |
Matrix (int N) | |
Simple constructor of square matrix with initialization to identity matrix. | |
Matrix (int rows, int cols) | |
Simple constructor of rectangular matrix with initialization to zero matrix. | |
Matrix (const Matrix &other) | |
Copy constructor. | |
Matrix & | operator= (const Matrix &matrix) |
Assignment operator. | |
int | cols () const |
Width of matrix. | |
double | determinant () const |
Return the determinant of this matrix. | |
double | get (int row, int col) const |
Return (row, col) element. | |
Matrix | inverse (int significantDigits, MatrixConsistent &matrixConsistent) const |
Return the inverse of this matrix. | |
Matrix | minorReduced (int rowOmit, int colOmit) const |
Return minor matrix which is the original with the specified row and column omitted. The name 'minor' is a reserved word. | |
Matrix | operator* (const Matrix &other) const |
Multiplication operator with a matrix. | |
QVector< double > | operator* (const QVector< double > other) const |
Multiplication operator with a vector. | |
int | rows () const |
Height of matrix. | |
void | set (int row, int col, double value) |
Set (row, col) element. | |
QString | toString () const |
Dump matrix to a string. | |
Matrix | transpose () const |
Return the transpose of the current matrix. | |
Matrix::Matrix | ( | int | N | ) |
Simple constructor of square matrix with initialization to identity matrix.
Definition at line 12 of file Matrix.cpp.
Simple constructor of rectangular matrix with initialization to zero matrix.
Definition at line 17 of file Matrix.cpp.
Copy constructor.
Definition at line 23 of file Matrix.cpp.
int Matrix::cols | ( | ) | const |
double Matrix::determinant | ( | ) | const |
Return the determinant of this matrix.
Definition at line 66 of file Matrix.cpp.
Return (row, col) element.
Definition at line 98 of file Matrix.cpp.
Matrix Matrix::inverse | ( | int | significantDigits, |
MatrixConsistent & | matrixConsistent ) const |
Return the inverse of this matrix.
significantDigits | Input value for calculating epsilon threshold for determinants that are so close to zero that matrix should be considered inconsistent. |
matrixConsistent | Output flag indicating success or failure |
Definition at line 123 of file Matrix.cpp.
Return minor matrix which is the original with the specified row and column omitted. The name 'minor' is a reserved word.
Definition at line 326 of file Matrix.cpp.
Multiplication operator with a matrix.
Definition at line 386 of file Matrix.cpp.
Multiplication operator with a vector.
Definition at line 405 of file Matrix.cpp.
Assignment operator.
Definition at line 35 of file Matrix.cpp.
int Matrix::rows | ( | ) | const |
Set (row, col) element.
Definition at line 428 of file Matrix.cpp.
QString Matrix::toString | ( | ) | const |
Dump matrix to a string.
Definition at line 445 of file Matrix.cpp.
Matrix Matrix::transpose | ( | ) | const |