34 QPMatrix(
const int m,
const int n,
const int npassed, ...);
81 double Cofactor(
const int i,
const int j);
98 double At(
int i,
int j);
135 std::string
Print(
bool quite=
false);
183 for(
int i=0; i<fM*fN; i++){
184 fElement[i] *= other;
Dense m×n matrix of double with hand-rolled linear algebra.
friend QPMatrix operator-(QPMatrix &, QPMatrix &)
Element-wise difference.
bool IsTransShape(QPMatrix &other)
friend QPMatrix operator+(QPMatrix &, QPMatrix &)
Element-wise sum.
~QPMatrix()
Frees the element storage.
friend QPMatrix operator*(QPMatrix, double)
Scaled copy.
QPMatrix Inverse()
Inverse by the adjugate formula .
std::string Print(bool quite=false)
Formats the matrix as tab-separated rows.
double Trace()
Sum of the diagonal elements up to min(m, n).
QPMatrix & operator*=(const double &other)
Multiply every element in place.
double Cofactor(const int i, const int j)
Cofactor where is the minor.
QPMatrix & operator=(const QPMatrix &)
Deep copy assignment; reallocates the storage.
double At(int i)
Value of linear element i of the row-major storage.
QPMatrix()
Null matrix: 0×0, no storage.
QPMatrix SubMatrix(const int i, const int j)
Minor matrix: this matrix with row i and column j removed.
bool IsSameShape(QPMatrix &other)
QPMatrix(QPVector &vec)
Column vector from a QPVector.
double & operator[](int i)
Reference to linear element i of the row-major storage.
void Freeing()
Releases the element storage.
double Det()
Determinant by recursive Laplace expansion along the first row.
double & operator()(int i)
Same as operator[].
3-component double vector with hand-rolled operations.