ug4
|
Classes | |
class | ug::MathMatrix< N, M, T > |
A class for fixed size, dense matrices. More... | |
class | ug::MathMatrix< 0, 0, T > |
class | ug::MathMatrix< 0, N, T > |
class | ug::MathMatrix< N, 0, T > |
class | ug::MathSymmetricMatrix< N, T > |
A class for fixed size, dense matrices. More... | |
Typedefs | |
typedef std::size_t | ug::MathSymmetricMatrix< N, T >::size_type |
typedef T | ug::MathSymmetricMatrix< N, T >::value_type |
Functions | |
void | ug::MathSymmetricMatrix< N, T >::assign (const MathSymmetricMatrix &v) |
value_type & | ug::MathSymmetricMatrix< N, T >::entry (std::size_t row, std::size_t col) |
const value_type & | ug::MathSymmetricMatrix< N, T >::entry (std::size_t row, std::size_t col) const |
value_type | ug::MathSymmetricMatrix< N, T >::fnorm () |
template<typename matrix_t > | |
void | ug::MatAdd (matrix_t &mOut, const matrix_t &m, typename matrix_t::value_type s) |
Add a scalar to a matrix (componentwise) More... | |
template<typename matrix_t > | |
void | ug::MatAdd (matrix_t &mOut, const matrix_t &m1, const matrix_t &m2) |
adds two matrices and stores the result in a third one More... | |
template<typename matrix_t > | |
matrix_t::value_type | ug::MatContraction (const matrix_t &m1, const matrix_t &m2) |
template<typename matrix_t > | |
matrix_t::value_type | ug::MatDeviatorTrace (const matrix_t &m, matrix_t &dev) |
template<typename matrix_t > | |
void | ug::MatDiagSet (matrix_t &mInOut, typename matrix_t::value_type s) |
Set diagonal entries of a matrix to a scalar (other entries are not changed) More... | |
template<typename matrix_t > | |
void | ug::MatDivide (matrix_t &mOut, const matrix_t &m, typename matrix_t::value_type s) |
Devide a matrix by a scalar (componentwise) More... | |
template<typename matrix_t > | |
matrix_t::value_type | ug::MatFrobeniusNorm (matrix_t &m) |
template<typename matrix_t > | |
matrix_t::value_type | ug::MatFrobeniusNormSq (matrix_t &m) |
template<typename matrix_t , typename vector_t > | |
void | ug::MatHouseholder (matrix_t &mOut, const vector_t &orthoVec) |
ug::MathSymmetricMatrix< N, T >::MathSymmetricMatrix () | |
ug::MathSymmetricMatrix< N, T >::MathSymmetricMatrix (const MathSymmetricMatrix &v) | |
template<typename matrix_t > | |
void | ug::MatIdentity (matrix_t &mOut) |
Fills the matrix with the identity matrix. More... | |
template<typename matrix_t > | |
matrix_t::value_type | ug::MatInftyNorm (matrix_t &m) |
template<typename matrix_t > | |
matrix_t::value_type | ug::MatMaxNorm (matrix_t &m) |
template<size_t N, size_t M, size_t L, typename T > | |
void | ug::MatMultiply (MathMatrix< N, M, T > &mOut, const MathMatrix< N, L, T > &m1, const MathMatrix< L, M, T > &m2) |
multiply two matrices and stores the result in a third one More... | |
template<size_t N, size_t M, size_t L, size_t P, typename T > | |
void | ug::MatMultiply (MathMatrix< N, M, T > &mOut, const MathMatrix< N, L, T > &m1, const MathMatrix< L, P, T > &m2, const MathMatrix< P, M, T > &m3) |
multiply three matrices and stores the result in a fourth one More... | |
template<typename matrix_t > | |
void | ug::MatMultiply (matrix_t &mOut, const matrix_t &m, typename matrix_t::value_type s) |
Multiply a matrix by a scalar (componentwise) More... | |
template<size_t N, size_t M, typename T > | |
void | ug::MatMultiplyMBMT (MathMatrix< N, N, T > &mOut, const MathMatrix< N, M, T > &m1, const MathMatrix< M, M, T > &m2) |
template<size_t N, size_t M, size_t L, typename T > | |
void | ug::MatMultiplyMBT (MathMatrix< N, M, T > &mOut, const MathMatrix< N, L, T > &m1, const MathMatrix< M, L, T > &m2) |
multiply a matrix with the transposed of a second one and stores the result in mOut More... | |
template<size_t N, size_t M, typename T > | |
void | ug::MatMultiplyMMT (MathMatrix< M, M, T > &mOut, const MathMatrix< M, N, T > &m) |
multiply a matrix with its transposed and stores the result in a second one More... | |
template<size_t N, size_t M, size_t L, typename T > | |
void | ug::MatMultiplyMTB (MathMatrix< N, M, T > &mOut, const MathMatrix< L, N, T > &m1, const MathMatrix< L, M, T > &m2) |
multiply the transposed of a matrix with a matrix and stores the result in mOut More... | |
template<size_t N, size_t M, typename T > | |
void | ug::MatMultiplyMTBM (MathMatrix< N, N, T > &mOut, const MathMatrix< M, N, T > &m1, const MathMatrix< M, M, T > &m2) |
template<size_t N, size_t M, typename T > | |
void | ug::MatMultiplyMTM (MathMatrix< N, N, T > &mOut, const MathMatrix< M, N, T > &m) |
multiply a transposed matrix with itself and stores the result in a second one More... | |
template<size_t N, size_t M, size_t L, typename T > | |
void | ug::MatMultiplyTransposed (MathMatrix< N, M, T > &mOut, const MathMatrix< L, N, T > &m1, const MathMatrix< M, L, T > &m2) |
multiply two transposed matrices and stores the result in a third one More... | |
template<typename matrix_t > | |
matrix_t::value_type | ug::MatOneNorm (matrix_t &m) |
template<typename matrix_t > | |
void | ug::MatRotationX (matrix_t &mOut, typename matrix_t::value_type rads) |
Fills the matrix with a matrix that rotates around the x-axis in 3 dimensions. More... | |
template<typename matrix_t > | |
void | ug::MatRotationY (matrix_t &mOut, typename matrix_t::value_type rads) |
Fills the matrix with a matrix that rotates around the y-axis in 3 dimensions. More... | |
template<typename matrix_t > | |
void | ug::MatRotationYawPitchRoll (matrix_t &mOut, typename matrix_t::value_type yaw, typename matrix_t::value_type pitch, typename matrix_t::value_type roll) |
Creates a rotation matrix given yaw, pitch and roll in radiants. More... | |
template<typename matrix_t > | |
void | ug::MatRotationZ (matrix_t &mOut, typename matrix_t::value_type rads) |
Fills the matrix with a matrix that rotates around the y-axis in 2 or 3 dimensions. More... | |
template<typename matrix_t > | |
void | ug::MatScale (matrix_t &mOut, typename matrix_t::value_type s, const matrix_t &m) |
scales a matrix_t More... | |
template<typename matrix_t > | |
void | ug::MatScaleAppend (matrix_t &mOut, typename matrix_t::value_type s, const matrix_t &m) |
scales a matrix_t and adds to result to a second matrix More... | |
template<typename matrix_t > | |
void | ug::MatSet (matrix_t &mInOut, typename matrix_t::value_type s) |
Set each matrix entry to a scalar (componentwise) More... | |
template<typename matrix_t > | |
void | ug::MatSubtract (matrix_t &mOut, const matrix_t &m, typename matrix_t::value_type s) |
Subtract a scalar from a matrix (componentwise) More... | |
template<typename matrix_t > | |
void | ug::MatSubtract (matrix_t &mOut, const matrix_t &m1, const matrix_t &m2) |
subtracts m2 from m1 and stores the result in a mOut More... | |
template<size_t N, size_t M, typename T > | |
MathMatrix< N, M, T >::value_type | ug::MaxAbsEigenvalue (const MathMatrix< M, N, T > &m) |
Computes maximum eigenvalue of a (symmetric) matrix. More... | |
template<size_t N, size_t M, typename T > | |
MathMatrix< N, M, T >::value_type | ug::MinAbsEigenvalue (const MathMatrix< M, N, T > &m) |
Computes minimum eigenvalue of a (symmetric) matrix. More... | |
std::size_t | ug::MathSymmetricMatrix< N, T >::num_cols () const |
std::size_t | ug::MathSymmetricMatrix< N, T >::num_rows () const |
value_type & | ug::MathSymmetricMatrix< N, T >::operator() (std::size_t row, std::size_t col) |
const value_type & | ug::MathSymmetricMatrix< N, T >::operator() (std::size_t row, std::size_t col) const |
value_type | ug::MathSymmetricMatrix< N, T >::operator* (const MathSymmetricMatrix &v) const |
Multiplies the matrix element-wise with another matrix and sums up the entries. More... | |
MathSymmetricMatrix & | ug::MathSymmetricMatrix< N, T >::operator*= (const value_type &val) |
Multiplies all elements of the matrix with the given value. More... | |
MathSymmetricMatrix & | ug::MathSymmetricMatrix< N, T >::operator+= (const MathSymmetricMatrix &B) |
Adds a matrix to 'this' one: \( A_{this} \leftarrow A_{this} + B\). More... | |
MathSymmetricMatrix & | ug::MathSymmetricMatrix< N, T >::operator+= (const value_type &val) |
Adds the given value to all elements of the matrix. More... | |
MathSymmetricMatrix & | ug::MathSymmetricMatrix< N, T >::operator-= (const MathSymmetricMatrix &B) |
Subtracts a matrix from 'this' one: \( A_{this} \leftarrow A_{this} - B\). More... | |
MathSymmetricMatrix & | ug::MathSymmetricMatrix< N, T >::operator-= (const value_type &val) |
Subtracts the given value from all elements of the matrix. More... | |
MathSymmetricMatrix & | ug::MathSymmetricMatrix< N, T >::operator/= (const value_type &val) |
Divides all elements of the matrix by the given value. More... | |
std::ostream & | ug::operator<< (std::ostream &outStream, const ug::MathMatrix< 2, 2 > &m) |
std::ostream & | ug::operator<< (std::ostream &outStream, const ug::MathMatrix< 2, 3 > &m) |
std::ostream & | ug::operator<< (std::ostream &outStream, const ug::MathMatrix< 3, 2 > &m) |
std::ostream & | ug::operator<< (std::ostream &outStream, const ug::MathMatrix< 3, 3 > &m) |
template<std::size_t N, std::size_t M> | |
std::ostream & | ug::operator<< (std::ostream &outStream, const ug::MathMatrix< N, M > &m) |
Print MathMatrix<N,M> to standard output. More... | |
std::ostream & | ug::operator<< (std::ostream &outStream, const ug::MathSymmetricMatrix< 2 > &m) |
std::ostream & | ug::operator<< (std::ostream &outStream, const ug::MathSymmetricMatrix< 3 > &m) |
template<std::size_t N> | |
std::ostream & | ug::operator<< (std::ostream &outStream, const ug::MathSymmetricMatrix< N > &m) |
Print MathSymmetricMatrix<N> to standard output. More... | |
MathSymmetricMatrix & | ug::MathSymmetricMatrix< N, T >::operator= (const MathSymmetricMatrix &v) |
Assigns the elements of the given matrix to this one. More... | |
MathSymmetricMatrix & | ug::MathSymmetricMatrix< N, T >::operator= (const value_type &val) |
Assigns the given value to all elements of the matrix. More... | |
value_type & | ug::MathSymmetricMatrix< N, T >::operator[] (std::size_t index) |
const value_type & | ug::MathSymmetricMatrix< N, T >::operator[] (std::size_t index) const |
void | ug::MathSymmetricMatrix< N, T >::scale_by_fnorm () |
template<size_t N, size_t M, typename T > | |
void | ug::Transpose (MathMatrix< N, M, T > &mOut, const MathMatrix< M, N, T > &m) |
transpose a matrix More... | |
template<typename matrix_t > | |
void | ug::Transpose (matrix_t &m) |
transpose a matrix_t, override original matrix_t More... | |
Variables | |
static const std::size_t | ug::MathSymmetricMatrix< N, T >::ColSize = N |
value_type | ug::MathSymmetricMatrix< N, T >::m_data [m_size] |
static const size_t | ug::MathSymmetricMatrix< N, T >::m_size = (size_t)((N*N+N)/2) |
static const std::size_t | ug::MathSymmetricMatrix< N, T >::RowSize = N |
template<size_t N, typename T > | |
MathMatrix< N, N, T >::value_type | ug::Determinant (const MathMatrix< N, N, T > &m) |
Determinant of a matrix. More... | |
template<typename T > | |
MathMatrix< 1, 1, T >::value_type | ug::Determinant (const MathMatrix< 1, 1, T > &m) |
Determinant of a matrix. More... | |
template<typename T > | |
MathMatrix< 2, 2, T >::value_type | ug::Determinant (const MathMatrix< 2, 2, T > &m) |
Determinant of a matrix. More... | |
template<typename T > | |
MathMatrix< 3, 3, T >::value_type | ug::Determinant (const MathMatrix< 3, 3, T > &m) |
Determinant of a matrix. More... | |
template<size_t N, size_t M, typename T > | |
MathMatrix< N, M, T >::value_type | ug::GramDeterminant (const MathMatrix< N, M, T > &m) |
Gram Determinant of a matrix. More... | |
template<typename T > | |
MathMatrix< 1, 1, T >::value_type | ug::GramDeterminant (const MathMatrix< 1, 1, T > &m) |
Gram Determinant of a matrix. More... | |
template<typename T > | |
MathMatrix< 2, 2, T >::value_type | ug::GramDeterminant (const MathMatrix< 2, 2, T > &m) |
Gram Determinant of a matrix. More... | |
template<typename T > | |
MathMatrix< 3, 3, T >::value_type | ug::GramDeterminant (const MathMatrix< 3, 3, T > &m) |
Gram Determinant of a matrix. More... | |
template<size_t N, size_t M, typename T > | |
MathMatrix< N, M, T >::value_type | ug::SqrtGramDeterminant (const MathMatrix< N, M, T > &m) |
Square root of Gram Determinant of a matrix. More... | |
template<typename T > | |
MathMatrix< 1, 1, T >::value_type | ug::SqrtGramDeterminant (const MathMatrix< 1, 1, T > &m) |
Square root of Gram Determinant of a matrix. More... | |
template<typename T > | |
MathMatrix< 2, 2, T >::value_type | ug::SqrtGramDeterminant (const MathMatrix< 2, 2, T > &m) |
Square root of Gram Determinant of a matrix. More... | |
template<typename T > | |
MathMatrix< 3, 3, T >::value_type | ug::SqrtGramDeterminant (const MathMatrix< 3, 3, T > &m) |
Square root of Gram Determinant of a matrix. More... | |
template<size_t N, size_t M, typename T > | |
MathMatrix< N, M, T >::value_type | ug::Inverse (MathMatrix< N, M, T > &mOut, const MathMatrix< M, N, T > &m) |
Inverse of a matrix. More... | |
template<typename T > | |
MathMatrix< 1, 1, T >::value_type | ug::Inverse (MathMatrix< 1, 1, T > &mOut, const MathMatrix< 1, 1, T > &m) |
Inverse of a matrix. More... | |
template<typename T > | |
MathMatrix< 2, 2, T >::value_type | ug::Inverse (MathMatrix< 2, 2, T > &mOut, const MathMatrix< 2, 2, T > &m) |
Inverse of a matrix. More... | |
template<typename T > | |
MathMatrix< 3, 3, T >::value_type | ug::Inverse (MathMatrix< 3, 3, T > &mOut, const MathMatrix< 3, 3, T > &m) |
Inverse of a matrix. More... | |
template<size_t N, size_t M, typename T > | |
MathMatrix< N, M, T >::value_type | ug::InverseTransposed (MathMatrix< N, M, T > &mOut, const MathMatrix< M, N, T > &m) |
Transposed-Inverse of a Matrix (= Inverse-Transposed of a Matrix) More... | |
template<typename T > | |
MathMatrix< 1, 1, T >::value_type | ug::InverseTransposed (MathMatrix< 1, 1, T > &mOut, const MathMatrix< 1, 1, T > &m) |
Transposed-Inverse of a Matrix (= Inverse-Transposed of a Matrix) More... | |
template<typename T > | |
MathMatrix< 2, 2, T >::value_type | ug::InverseTransposed (MathMatrix< 2, 2, T > &mOut, const MathMatrix< 2, 2, T > &m) |
Transposed-Inverse of a Matrix (= Inverse-Transposed of a Matrix) More... | |
template<typename T > | |
MathMatrix< 3, 3, T >::value_type | ug::InverseTransposed (MathMatrix< 3, 3, T > &mOut, const MathMatrix< 3, 3, T > &m) |
Transposed-Inverse of a Matrix (= Inverse-Transposed of a Matrix) More... | |
template<size_t N, size_t M, typename T > | |
MathMatrix< N, M, T >::value_type | ug::RightInverse (MathMatrix< N, M, T > &mOut, const MathMatrix< M, N, T > &m) |
Right-Inverse of a Matrix. More... | |
template<typename T > | |
MathMatrix< 1, 1, T >::value_type | ug::RightInverse (MathMatrix< 1, 1 > &mOut, const MathMatrix< 1, 1 > &m) |
Right-Inverse of a Matrix. More... | |
template<typename T > | |
MathMatrix< 2, 2, T >::value_type | ug::RightInverse (MathMatrix< 2, 2 > &mOut, const MathMatrix< 2, 2 > &m) |
Right-Inverse of a Matrix. More... | |
template<typename T > | |
MathMatrix< 3, 3, T >::value_type | ug::RightInverse (MathMatrix< 3, 3 > &mOut, const MathMatrix< 3, 3 > &m) |
Right-Inverse of a Matrix. More... | |
template<size_t N, size_t M, typename T > | |
MathMatrix< N, M, T >::value_type | ug::LeftInverse (MathMatrix< N, M, T > &mOut, const MathMatrix< M, N, T > &m) |
Left-Inverse of a Matrix. More... | |
template<typename T > | |
MathMatrix< 1, 1, T >::value_type | ug::LeftInverse (MathMatrix< 1, 1 > &mOut, const MathMatrix< 1, 1 > &m) |
Left-Inverse of a Matrix. More... | |
template<typename T > | |
MathMatrix< 2, 2, T >::value_type | ug::LeftInverse (MathMatrix< 2, 2 > &mOut, const MathMatrix< 2, 2 > &m) |
Left-Inverse of a Matrix. More... | |
template<typename T > | |
MathMatrix< 3, 3, T >::value_type | ug::LeftInverse (MathMatrix< 3, 3 > &mOut, const MathMatrix< 3, 3 > &m) |
Left-Inverse of a Matrix. More... | |
template<size_t N, size_t M, typename T > | |
MathMatrix< N, M, T >::value_type | ug::GeneralizedInverse (MathMatrix< N, M, T > &mOut, const MathMatrix< M, N, T > &m) |
template<typename T > | |
MathMatrix< 1, 1, T >::value_type | ug::Trace (const MathMatrix< 1, 1, T > &m) |
Trace of a Matrix. More... | |
template<typename T > | |
MathMatrix< 2, 2, T >::value_type | ug::Trace (const MathMatrix< 2, 2, T > &m) |
Trace of a Matrix. More... | |
template<typename T > | |
MathMatrix< 3, 3, T >::value_type | ug::Trace (const MathMatrix< 3, 3, T > &m) |
Trace of a Matrix. More... | |
typedef std::size_t ug::MathSymmetricMatrix< N, T >::size_type |
typedef T ug::MathSymmetricMatrix< N, T >::value_type |
|
inlineprotected |
|
inline |
Determinant of a matrix.
Returns the Determinate of a matrix.
m | Matrix |
|
inline |
Determinant of a matrix.
Returns the Determinate of a matrix.
m | Matrix |
|
inline |
Determinant of a matrix.
Returns the Determinate of a matrix.
m | Matrix |
|
inline |
Determinant of a matrix.
Returns the Determinate of a matrix.
m | Matrix |
References UG_THROW.
Referenced by ug::GramDeterminant(), ug::Inverse(), ug::InverseTransposed(), ug::RayRayIntersection2d(), and ug::SqrtGramDeterminant().
|
inline |
References ug::MathSymmetricMatrix< N, T >::m_data, and UG_ASSERT.
Referenced by ug::MathSymmetricMatrix< N, T >::operator*(), and ug::operator<<().
|
inline |
References ug::MathSymmetricMatrix< N, T >::m_data, and UG_ASSERT.
|
inline |
References ug::MathSymmetricMatrix< N, T >::m_data, and ug::MathSymmetricMatrix< N, T >::m_size.
Referenced by ug::MathSymmetricMatrix< N, T >::scale_by_fnorm().
|
inline |
Computes the pseudo-Inverse of a MxN Matrix (N!=M) and returns the square root of the gram determinate or the inverse of a matrix (M=N) and returns the determinante.
For M<N, Right-Inverse of Matrix For M>N, Left-Inverse of Matrix For M=N, Inverse of Matrix
mOut | (pseundo)-Inverse of Matrix |
m | Matrix |
References ug::Inverse(), ug::LeftInverse(), and ug::RightInverse().
|
inline |
Gram Determinant of a matrix.
Returns Gram Determinant of a matrix, i.e. \( \det(M M^T) \).
m | Matrix |
References ug::Determinant().
|
inline |
Gram Determinant of a matrix.
Returns Gram Determinant of a matrix, i.e. \( \det(M M^T) \).
m | Matrix |
References ug::Determinant().
|
inline |
Gram Determinant of a matrix.
Returns Gram Determinant of a matrix, i.e. \( \det(M M^T) \).
m | Matrix |
References ug::Determinant().
|
inline |
Gram Determinant of a matrix.
Returns Gram Determinant of a matrix, i.e. \( \det(M M^T) \).
m | Matrix |
References ug::Determinant(), ug::MatMultiplyMMT(), and ug::MatMultiplyMTM().
Referenced by ug::SqrtGramDeterminant().
|
inline |
Inverse of a matrix.
Computes the inverse of a matrix and returns the determinante.
mOut | Inverse of Matrix |
m | Matrix |
References UG_ASSERT.
|
inline |
Inverse of a matrix.
Computes the inverse of a matrix and returns the determinante.
mOut | Inverse of Matrix |
m | Matrix |
References ug::Determinant(), and UG_ASSERT.
|
inline |
Inverse of a matrix.
Computes the inverse of a matrix and returns the determinante.
mOut | Inverse of Matrix |
m | Matrix |
References ug::Determinant(), and UG_ASSERT.
|
inline |
Inverse of a matrix.
Computes the inverse of a matrix and returns the determinante.
mOut | Inverse of Matrix |
m | Matrix |
References UG_THROW.
Referenced by ug::GradientDataExport< dim >::eval_and_deriv(), ug::ExplicitGridFunctionGradient< TGridFunction >::evaluate(), ug::GeneralizedInverse(), ug::IntegralNormalComponentOnManifoldUsingFV1Geom(), ug::InverseTransposed(), ug::LeftInverse(), ug::MinAbsEigenvalue(), ug::RayRayIntersection2d(), and ug::RightInverse().
|
inline |
Transposed-Inverse of a Matrix (= Inverse-Transposed of a Matrix)
Computes the Inverse-Transposed of a Matrix and returns the Determinant.
mOut | Inverse-Transposed of Matrix |
m | Matrix |
References ug::Inverse().
|
inline |
Transposed-Inverse of a Matrix (= Inverse-Transposed of a Matrix)
Computes the Inverse-Transposed of a Matrix and returns the Determinant.
mOut | Inverse-Transposed of Matrix |
m | Matrix |
References ug::Determinant(), and UG_ASSERT.
|
inline |
Transposed-Inverse of a Matrix (= Inverse-Transposed of a Matrix)
Computes the Inverse-Transposed of a Matrix and returns the Determinant.
mOut | Inverse-Transposed of Matrix |
m | Matrix |
References ug::Determinant(), and UG_ASSERT.
|
inline |
Transposed-Inverse of a Matrix (= Inverse-Transposed of a Matrix)
Computes the Inverse-Transposed of a Matrix and returns the Determinant.
mOut | Inverse-Transposed of Matrix |
m | Matrix |
References UG_THROW.
|
inline |
Left-Inverse of a Matrix.
Computes the Left-Inverse of a Matrix and returns the square root of the gram determinate. For any \( A \in \mathbb{R}^{M \times N} \) (with \( M \geq N \)) the Left-Inverse is defined as
\[ A^{-1}_{left} := (A^T A)^{-1} A^T, \]
such that \( A^{-1}_{left} A = 1 \). The gram determinate is defined as \( \det{A^T A} \).
Please note, that in case of a square matrix (i.e. \( N = M \)), the Left- Inverse is identical to the Inverse and the square root of the gram determinante simplifies to the norm of the usual determinate.
mOut | Left-Inverse of Matrix |
m | Matrix |
References ug::Inverse().
|
inline |
Left-Inverse of a Matrix.
Computes the Left-Inverse of a Matrix and returns the square root of the gram determinate. For any \( A \in \mathbb{R}^{M \times N} \) (with \( M \geq N \)) the Left-Inverse is defined as
\[ A^{-1}_{left} := (A^T A)^{-1} A^T, \]
such that \( A^{-1}_{left} A = 1 \). The gram determinate is defined as \( \det{A^T A} \).
Please note, that in case of a square matrix (i.e. \( N = M \)), the Left- Inverse is identical to the Inverse and the square root of the gram determinante simplifies to the norm of the usual determinate.
mOut | Left-Inverse of Matrix |
m | Matrix |
References ug::Inverse().
|
inline |
Left-Inverse of a Matrix.
Computes the Left-Inverse of a Matrix and returns the square root of the gram determinate. For any \( A \in \mathbb{R}^{M \times N} \) (with \( M \geq N \)) the Left-Inverse is defined as
\[ A^{-1}_{left} := (A^T A)^{-1} A^T, \]
such that \( A^{-1}_{left} A = 1 \). The gram determinate is defined as \( \det{A^T A} \).
Please note, that in case of a square matrix (i.e. \( N = M \)), the Left- Inverse is identical to the Inverse and the square root of the gram determinante simplifies to the norm of the usual determinate.
mOut | Left-Inverse of Matrix |
m | Matrix |
References ug::Inverse().
|
inline |
Left-Inverse of a Matrix.
Computes the Left-Inverse of a Matrix and returns the square root of the gram determinate. For any \( A \in \mathbb{R}^{M \times N} \) (with \( M \geq N \)) the Left-Inverse is defined as
\[ A^{-1}_{left} := (A^T A)^{-1} A^T, \]
such that \( A^{-1}_{left} A = 1 \). The gram determinate is defined as \( \det{A^T A} \).
Please note, that in case of a square matrix (i.e. \( N = M \)), the Left- Inverse is identical to the Inverse and the square root of the gram determinante simplifies to the norm of the usual determinate.
mOut | Left-Inverse of Matrix |
m | Matrix |
References ug::Inverse(), ug::MatMultiplyMTM(), ug::MatMultiplyTransposed(), and UG_THROW.
Referenced by ug::GeneralizedInverse(), and ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::global_to_local().
|
inline |
Add a scalar to a matrix (componentwise)
References s.
|
inline |
adds two matrices and stores the result in a third one
Referenced by ug::MatAdd().
|
inline |
|
inline |
References ug::Trace().
|
inline |
Set diagonal entries of a matrix to a scalar (other entries are not changed)
References s.
Referenced by ug::MatIdentity().
|
inline |
Devide a matrix by a scalar (componentwise)
References s.
|
inline |
References ug::MatFrobeniusNormSq().
|
inline |
Referenced by ug::MatFrobeniusNorm().
|
inline |
Creates a householder matrix given the orthogonal vector to the householder-hypersphere through the origin.
References ug::VecDot().
Referenced by ug::ObstacleInNormalDir< TDomain, TAlgebra >::transform_eulerian_coord_sys().
|
inline |
|
inline |
References ug::MathSymmetricMatrix< N, T >::assign().
|
inline |
Fills the matrix with the identity matrix.
References ug::MatDiagSet(), and ug::MatSet().
Referenced by ug::MatRotationX(), ug::MatRotationY(), and ug::MatRotationZ().
|
inline |
|
inline |
|
inline |
multiply two matrices and stores the result in a third one
Referenced by ug::MatRotationYawPitchRoll().
|
inline |
multiply three matrices and stores the result in a fourth one
|
inline |
Multiply a matrix by a scalar (componentwise)
References s.
|
inline |
multiply a matrix m2 with a matrix m1 from left and its transpose m1^T from right and stores the result in mOut
|
inline |
multiply a matrix with the transposed of a second one and stores the result in mOut
|
inline |
multiply a matrix with its transposed and stores the result in a second one
Referenced by ug::GramDeterminant(), and ug::RightInverse().
|
inline |
multiply the transposed of a matrix with a matrix and stores the result in mOut
|
inline |
multiply a matrix m2 with a matrix m1 from right and its transpose m1^T from left and stores the result in mOut
|
inline |
multiply a transposed matrix with itself and stores the result in a second one
Referenced by ug::GramDeterminant(), and ug::LeftInverse().
|
inline |
multiply two transposed matrices and stores the result in a third one
Referenced by ug::LeftInverse(), and ug::RightInverse().
|
inline |
|
inline |
Fills the matrix with a matrix that rotates around the x-axis in 3 dimensions.
matrix_t has to have at least 3 rows and 3 columns. Rotation is specified in radiants.
References ug::MatIdentity(), and s.
Referenced by ug::MatRotationYawPitchRoll().
|
inline |
Fills the matrix with a matrix that rotates around the y-axis in 3 dimensions.
matrix_t has to have at least 3 rows and 3 columns. Rotation is specified in radiants.
References ug::MatIdentity(), and s.
Referenced by ug::MatRotationYawPitchRoll().
|
inline |
Creates a rotation matrix given yaw, pitch and roll in radiants.
References ug::MatMultiply(), ug::MatRotationX(), ug::MatRotationY(), and ug::MatRotationZ().
|
inline |
Fills the matrix with a matrix that rotates around the y-axis in 2 or 3 dimensions.
matrix_t has to have at least 2 rows and 2 columns. Rotation is specified in radiants.
References ug::MatIdentity(), and s.
Referenced by ug::MatRotationYawPitchRoll().
|
inline |
|
inline |
scales a matrix_t and adds to result to a second matrix
References s.
Referenced by ug::linker_traits< MathMatrix< dim, dim >, number >::mult_add(), and ug::LocalMatrix::scale_append().
|
inline |
Set each matrix entry to a scalar (componentwise)
References s.
Referenced by ug::MatIdentity(), and ug::ConvectionShapesPartialUpwind< TDim >::update().
|
inline |
Subtract a scalar from a matrix (componentwise)
References s.
|
inline |
subtracts m2 from m1 and stores the result in a mOut
|
inline |
Computes maximum eigenvalue of a (symmetric) matrix.
References UG_THROW.
Referenced by ug::MinAbsEigenvalue().
|
inline |
Computes minimum eigenvalue of a (symmetric) matrix.
|
inline |
|
inline |
|
inline |
References ug::MathSymmetricMatrix< N, T >::m_data, and UG_ASSERT.
|
inline |
References ug::MathSymmetricMatrix< N, T >::m_data, and UG_ASSERT.
|
inline |
Multiplies the matrix element-wise with another matrix and sums up the entries.
v | The Matrix. |
References ug::MathSymmetricMatrix< N, T >::entry().
|
inline |
Multiplies all elements of the matrix with the given value.
val | The factor. |
References ug::MathSymmetricMatrix< N, T >::m_data, and ug::MathSymmetricMatrix< N, T >::m_size.
|
inline |
Adds a matrix to 'this' one: \( A_{this} \leftarrow A_{this} + B\).
B | The matrix to be added. |
References ug::MathSymmetricMatrix< N, T >::m_data, and ug::MathSymmetricMatrix< N, T >::m_size.
|
inline |
Adds the given value to all elements of the matrix.
val | The value to be added. |
References ug::MathSymmetricMatrix< N, T >::m_data, and ug::MathSymmetricMatrix< N, T >::m_size.
|
inline |
Subtracts a matrix from 'this' one: \( A_{this} \leftarrow A_{this} - B\).
B | The matrix to be subtracted. |
References ug::MathSymmetricMatrix< N, T >::m_data, and ug::MathSymmetricMatrix< N, T >::m_size.
|
inline |
Subtracts the given value from all elements of the matrix.
val | The value to be subtracted. |
References ug::MathSymmetricMatrix< N, T >::m_data, and ug::MathSymmetricMatrix< N, T >::m_size.
|
inline |
Divides all elements of the matrix by the given value.
val | The divisor. |
References ug::MathSymmetricMatrix< N, T >::m_data, and ug::MathSymmetricMatrix< N, T >::m_size.
std::ostream & ug::operator<< | ( | std::ostream & | outStream, |
const ug::MathMatrix< 2, 2 > & | m | ||
) |
References ug::MathMatrix< N, M, T >::entry().
std::ostream & ug::operator<< | ( | std::ostream & | outStream, |
const ug::MathMatrix< 2, 3 > & | m | ||
) |
References ug::MathMatrix< N, M, T >::entry().
std::ostream & ug::operator<< | ( | std::ostream & | outStream, |
const ug::MathMatrix< 3, 2 > & | m | ||
) |
References ug::MathMatrix< N, M, T >::entry().
std::ostream & ug::operator<< | ( | std::ostream & | outStream, |
const ug::MathMatrix< 3, 3 > & | m | ||
) |
References ug::MathMatrix< N, M, T >::entry().
std::ostream& ug::operator<< | ( | std::ostream & | outStream, |
const ug::MathMatrix< N, M > & | m | ||
) |
Print MathMatrix<N,M> to standard output.
References ug::MathMatrix< N, M, T >::entry().
std::ostream& ug::operator<< | ( | std::ostream & | outStream, |
const ug::MathSymmetricMatrix< 2 > & | m | ||
) |
std::ostream& ug::operator<< | ( | std::ostream & | outStream, |
const ug::MathSymmetricMatrix< 3 > & | m | ||
) |
std::ostream& ug::operator<< | ( | std::ostream & | outStream, |
const ug::MathSymmetricMatrix< N > & | m | ||
) |
Print MathSymmetricMatrix<N> to standard output.
References ug::MathSymmetricMatrix< N, T >::entry().
|
inline |
Assigns the elements of the given matrix to this one.
v | The matrix to be assigned. |
References ug::MathSymmetricMatrix< N, T >::assign().
|
inline |
Assigns the given value to all elements of the matrix.
val | The value to be assigned to the matrix. |
References ug::MathSymmetricMatrix< N, T >::m_data, and ug::MathSymmetricMatrix< N, T >::m_size.
|
inline |
|
inline |
|
inline |
Right-Inverse of a Matrix.
Computes the Right-Inverse of a Matrix and returns the square root of the gram determinate. For any \( A \in \mathbb{R}^{M \times N} \) (with \( M \leq N \)) the Right-Inverse is defined as
\[ A^{-1}_{right} := A^T (A A^T)^{-1}, \]
such that \( A A^{-1}_{right} = 1 \). The gram determinate is defined as \( \det{A A^T} \).
Please note, that in case of a square matrix (i.e. \( N = M \)), the Right- Inverse is identical to the Inverse and the square root of the gram determinante simplifies to the norm of the usual determinate.
mOut | Right-Inverse of Matrix |
m | Matrix |
References ug::Inverse().
|
inline |
Right-Inverse of a Matrix.
Computes the Right-Inverse of a Matrix and returns the square root of the gram determinate. For any \( A \in \mathbb{R}^{M \times N} \) (with \( M \leq N \)) the Right-Inverse is defined as
\[ A^{-1}_{right} := A^T (A A^T)^{-1}, \]
such that \( A A^{-1}_{right} = 1 \). The gram determinate is defined as \( \det{A A^T} \).
Please note, that in case of a square matrix (i.e. \( N = M \)), the Right- Inverse is identical to the Inverse and the square root of the gram determinante simplifies to the norm of the usual determinate.
mOut | Right-Inverse of Matrix |
m | Matrix |
References ug::Inverse().
|
inline |
Right-Inverse of a Matrix.
Computes the Right-Inverse of a Matrix and returns the square root of the gram determinate. For any \( A \in \mathbb{R}^{M \times N} \) (with \( M \leq N \)) the Right-Inverse is defined as
\[ A^{-1}_{right} := A^T (A A^T)^{-1}, \]
such that \( A A^{-1}_{right} = 1 \). The gram determinate is defined as \( \det{A A^T} \).
Please note, that in case of a square matrix (i.e. \( N = M \)), the Right- Inverse is identical to the Inverse and the square root of the gram determinante simplifies to the norm of the usual determinate.
mOut | Right-Inverse of Matrix |
m | Matrix |
References ug::Inverse().
|
inline |
Right-Inverse of a Matrix.
Computes the Right-Inverse of a Matrix and returns the square root of the gram determinate. For any \( A \in \mathbb{R}^{M \times N} \) (with \( M \leq N \)) the Right-Inverse is defined as
\[ A^{-1}_{right} := A^T (A A^T)^{-1}, \]
such that \( A A^{-1}_{right} = 1 \). The gram determinate is defined as \( \det{A A^T} \).
Please note, that in case of a square matrix (i.e. \( N = M \)), the Right- Inverse is identical to the Inverse and the square root of the gram determinante simplifies to the norm of the usual determinate.
mOut | Right-Inverse of Matrix |
m | Matrix |
References ug::Inverse(), ug::MatMultiplyMMT(), ug::MatMultiplyTransposed(), and UG_THROW.
Referenced by ug::GridFunctionGradientData< TGridFunction >::eval_and_deriv(), ug::GridFunctionGradientComponentData< TGridFunction >::eval_and_deriv(), ug::GlobalGridFunctionGradientData< TGridFunction >::evaluate(), ug::GeneralizedInverse(), and ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::jacobian_transposed_inverse().
|
inline |
|
inline |
Square root of Gram Determinant of a matrix.
Returns Square root of Gram Determinant of a matrix, i.e. \( \sqrt{\det(M M^T)} \).
m | Matrix |
References ug::Determinant().
|
inline |
Square root of Gram Determinant of a matrix.
Returns Square root of Gram Determinant of a matrix, i.e. \( \sqrt{\det(M M^T)} \).
m | Matrix |
References ug::Determinant().
|
inline |
Square root of Gram Determinant of a matrix.
Returns Square root of Gram Determinant of a matrix, i.e. \( \sqrt{\det(M M^T)} \).
m | Matrix |
References ug::Determinant().
|
inline |
Square root of Gram Determinant of a matrix.
Returns Square root of Gram Determinant of a matrix, i.e. \( \sqrt{\det(M M^T)} \).
m | Matrix |
References ug::GramDeterminant().
Referenced by ug::IntegralNormalComponentOnManifoldGeneral(), ug::Integrate(), and ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::sqrt_gram_det().
|
inline |
|
inline |
Trace of a Matrix.
Returns the Trace of a Matrix.
|
inline |
Trace of a Matrix.
Returns the Trace of a Matrix.
|
inline |
transpose a matrix
References ug::MathMatrix< N, M, T >::num_cols(), and ug::MathMatrix< N, M, T >::num_rows().
Referenced by ug::BaseReferenceMapping< dim, worldDim, isLinear, TImpl >::jacobian().
|
inline |
transpose a matrix_t, override original matrix_t
References UG_ASSERT.
|
static |
|
protected |
Referenced by ug::MathSymmetricMatrix< N, T >::assign(), ug::MathSymmetricMatrix< N, T >::entry(), ug::MathSymmetricMatrix< N, T >::fnorm(), ug::MathSymmetricMatrix< N, T >::operator()(), ug::MathSymmetricMatrix< N, T >::operator*=(), ug::MathSymmetricMatrix< N, T >::operator+=(), ug::MathSymmetricMatrix< N, T >::operator-=(), ug::MathSymmetricMatrix< N, T >::operator/=(), ug::MathSymmetricMatrix< N, T >::operator=(), ug::MathSymmetricMatrix< N, T >::operator[](), and ug::MathSymmetricMatrix< N, T >::scale_by_fnorm().
|
staticprotected |
Referenced by ug::MathSymmetricMatrix< N, T >::assign(), ug::MathSymmetricMatrix< N, T >::fnorm(), ug::MathSymmetricMatrix< N, T >::operator*=(), ug::MathSymmetricMatrix< N, T >::operator+=(), ug::MathSymmetricMatrix< N, T >::operator-=(), ug::MathSymmetricMatrix< N, T >::operator/=(), ug::MathSymmetricMatrix< N, T >::operator=(), ug::MathSymmetricMatrix< N, T >::operator[](), and ug::MathSymmetricMatrix< N, T >::scale_by_fnorm().
|
static |