Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
matrixutils.cc File Reference
Include dependency graph for matrixutils.cc:

Go to the source code of this file.

Namespaces

 ion
 Copyright 2016 Google Inc.
 
 ion::math
 

Macros

#define ION_SPECIALIZE_MATRIX_FUNCS(dim, scalar)
 Fully specialize or instantiate all of these for all supported types. More...
 

Functions

template<int Dimension, typename T >
T ion::math::Determinant (const Matrix< Dimension, T > &m)
 Public functions. More...
 
template<int Dimension, typename T >
Matrix< Dimension, Tion::math::CofactorMatrix (const Matrix< Dimension, T > &m)
 Returns the signed cofactor matrix (adjunct) of the matrix. More...
 
template<int Dimension, typename T >
Matrix< Dimension, Tion::math::AdjugateWithDeterminant (const Matrix< Dimension, T > &m, T *determinant)
 Returns the adjugate of the matrix, which is defined as the transpose of the cofactor matrix. More...
 
template<int Dimension, typename T >
Matrix< Dimension, Tion::math::InverseWithDeterminant (const Matrix< Dimension, T > &m, T *determinant)
 Returns the inverse of the matrix. More...
 
template<int Dimension, typename T >
bool ion::math::MatrixAlmostOrthogonal (const Matrix< Dimension, T > &m, T tolerance)
 Returns true if the dot product of all column vector pairs in the matrix is less than a provided tolerance, and if all column vectors have unit length. More...
 
 ion::math::ION_SPECIALIZE_MATRIX_FUNCS (2, float)
 
 ion::math::ION_SPECIALIZE_MATRIX_FUNCS (2, double)
 
 ion::math::ION_SPECIALIZE_MATRIX_FUNCS (3, float)
 
 ion::math::ION_SPECIALIZE_MATRIX_FUNCS (3, double)
 
 ion::math::ION_SPECIALIZE_MATRIX_FUNCS (4, float)
 
 ion::math::ION_SPECIALIZE_MATRIX_FUNCS (4, double)
 

Macro Definition Documentation

#define ION_SPECIALIZE_MATRIX_FUNCS (   dim,
  scalar 
)
Value:
template <> scalar ION_API Determinant(const Matrix<dim, scalar>& m) { \
return Determinant ## dim(m); \
} \
template <> Matrix<dim, scalar> ION_API CofactorMatrix( \
const Matrix<dim, scalar>& m) { \
return CofactorMatrix ## dim(m); \
} \
template <> Matrix<dim, scalar> ION_API AdjugateWithDeterminant( \
const Matrix<dim, scalar>& m, scalar* determinant) { \
return Adjugate ## dim(m, determinant); \
} \
\
/* Explicit instantiations. */ \
template Matrix<dim, scalar> ION_API InverseWithDeterminant( \
const Matrix<dim, scalar>& m, scalar* determinant); \
template bool ION_API MatrixAlmostOrthogonal( \
const Matrix<dim, scalar>& m, scalar tolerance)
Matrix< Dimension, T > AdjugateWithDeterminant(const Matrix< Dimension, T > &m, T *determinant)
Returns the adjugate of the matrix, which is defined as the transpose of the cofactor matrix...
Definition: matrixutils.cc:237
bool MatrixAlmostOrthogonal(const Matrix< Dimension, T > &m, T tolerance)
Returns true if the dot product of all column vector pairs in the matrix is less than a provided tole...
Definition: matrixutils.cc:257
T Determinant(const Matrix< Dimension, T > &m)
Public functions.
Definition: matrixutils.cc:227
Matrix< Dimension, T > CofactorMatrix(const Matrix< Dimension, T > &m)
Returns the signed cofactor matrix (adjunct) of the matrix.
Definition: matrixutils.cc:232
Matrix< Dimension, T > InverseWithDeterminant(const Matrix< Dimension, T > &m, T *determinant)
Returns the inverse of the matrix.
Definition: matrixutils.cc:243
Matrix< Dimension, T > Adjugate(const Matrix< Dimension, T > &m)
Returns the adjugate of the matrix, which is defined as the transpose of the cofactor matrix...
Definition: matrixutils.h:134

Fully specialize or instantiate all of these for all supported types.

Definition at line 275 of file matrixutils.cc.