25 m_rows =
other.rows();
26 m_cols =
other.cols();
27 m_vector.resize (m_rows * m_cols);
37 m_rows =
other.rows();
38 m_cols =
other.cols();
39 m_vector.resize (m_rows * m_cols);
49void Matrix::addRowToAnotherWithScaling (
int rowFrom,
93int Matrix::fold2dIndexes (
int row,
int col)
const
104void Matrix::initialize (
int rows,
114 if (
row ==
col && m_rows == m_cols) {
139 return inverseGaussianElimination (significantDigits,
171 if (valueFailsEpsilonTest (
determ,
196Matrix Matrix::inverseGaussianElimination (
int significantDigits,
314unsigned int Matrix::leadingZeros (
int row)
const
316 unsigned int sum = 0;
354 int significantDigits,
395 for (
int index = 0; index < m_cols; index++) {
433void Matrix::switchRows (
int row1,
482bool Matrix::valueFailsEpsilonTest (
double value,
const int INNER_RADIUS_MIN
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) define ENGAUGE...
MatrixConsistent
Indicates if matrix is consistent (i.e. has at least one solution)
Matrix class that supports arbitrary NxN size.
double determinant() const
Return the determinant of this matrix.
int rows() const
Height of matrix.
Matrix & operator=(const Matrix &matrix)
Assignment operator.
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....
void set(int row, int col, double value)
Set (row, col) element.
Matrix transpose() const
Return the transpose of the current matrix.
Matrix(int N)
Simple constructor of square matrix with initialization to identity matrix.
Matrix operator*(const Matrix &other) const
Multiplication operator with a matrix.
double get(int row, int col) const
Return (row, col) element.
QString toString() const
Dump matrix to a string.
int cols() const
Width of matrix.