ug4
math_matrix_functions_common_impl.hpp File Reference
#include <cmath>
#include <iostream>
#include <iomanip>
#include <cassert>
#include "math_matrix.h"
#include "common/assert.h"
#include "common/static_assert.h"

Go to the source code of this file.

Namespaces

 ug
 the ug namespace
 

Functions

template<typename T >
MathMatrix< 0, 0, T >::value_type ug::Determinant (const MathMatrix< 0, 0, T > &m)
 
template<typename T >
MathMatrix< 4, 4, T >::value_type ug::Determinant (const MathMatrix< 4, 4, T > &m)
 
template<typename T >
MathMatrix< 0, 0, T >::value_type ug::GramDeterminant (const MathMatrix< 0, 0, T > &m)
 
template<size_t M, typename T >
MathMatrix< 0, M, T >::value_type ug::GramDeterminant (const MathMatrix< 0, M, T > &m)
 
template<size_t N, typename T >
MathMatrix< N, 0, T >::value_type ug::GramDeterminant (const MathMatrix< N, 0, T > &m)
 
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)
 
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<typename T >
MathMatrix< 1, 1, T >::value_type ug::MaxAbsEigenvalue (const MathMatrix< 1, 1, T > &m)
 
template<typename T >
MathMatrix< 2, 2, T >::value_type ug::MaxAbsEigenvalue (const MathMatrix< 2, 2, T > &m)
 
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<typename matrix_t >
matrix_t::value_type ug::MinAbsEigenvalue (matrix_t &m)
 
template<typename T >
MathMatrix< 0, 0, T >::value_type ug::SqrtGramDeterminant (const MathMatrix< 0, 0, T > &m)
 
template<size_t M, typename T >
MathMatrix< 0, M, T >::value_type ug::SqrtGramDeterminant (const MathMatrix< 0, M, T > &m)
 
template<size_t N, typename T >
MathMatrix< N, 0, T >::value_type ug::SqrtGramDeterminant (const MathMatrix< N, 0, T > &m)
 
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...
 
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, 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::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::GramDeterminant (const MathMatrix< N, M, T > &m)
 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::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::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::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::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::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::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::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::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::LeftInverse (MathMatrix< N, M, T > &mOut, const MathMatrix< M, N, T > &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...