Base class for matrix expression. More...
#include <Core/Matrix/MatrixExpression.hpp>
 
  
 | Public Types | |
| using | ValueType = T | 
| Public Member Functions | |
| constexpr size_t | GetRows () const | 
| Returns the number of rows.  More... | |
| constexpr size_t | GetCols () const | 
| Returns the number of columns.  More... | |
| T | Eval (size_t i, size_t j) const | 
| Returns the evaluated value for (i, j).  More... | |
| Matrix< T, Rows, Cols > | Eval () const | 
| template<size_t R, size_t C, typename E > | |
| bool | IsSimilar (const MatrixExpression< T, R, C, E > &m, double tol=std::numeric_limits< double >::epsilon()) const | 
| constexpr bool | IsSquare () const | 
| Returns true if this matrix is a square matrix.  More... | |
| ValueType | Sum () const | 
| ValueType | Avg () const | 
| ValueType | Min () const | 
| ValueType | Max () const | 
| ValueType | AbsMin () const | 
| ValueType | AbsMax () const | 
| ValueType | Trace () const | 
| ValueType | Determinant () const | 
| size_t | DominantAxis () const | 
| size_t | SubdominantAxis () const | 
| ValueType | Norm () const | 
| ValueType | NormSquared () const | 
| ValueType | FrobeniusNorm () const | 
| ValueType | Length () const | 
| ValueType | LengthSquared () const | 
| template<size_t R, size_t C, typename E > | |
| ValueType | DistanceTo (const MatrixExpression< T, R, C, E > &other) const | 
| Returns the distance to the other vector.  More... | |
| template<size_t R, size_t C, typename E > | |
| ValueType | DistanceSquaredTo (const MatrixExpression< T, R, C, E > &other) const | 
| Returns the squared distance to the other vector.  More... | |
| MatrixScalarElemWiseBinaryOp< T, Rows, Cols, const Derived &, std::divides< T > > | Normalized () const | 
| MatrixDiagonal< T, Rows, Cols, const Derived & > | Diagonal () const | 
| Returns diagonal part of this matrix.  More... | |
| MatrixOffDiagonal< T, Rows, Cols, const Derived & > | OffDiagonal () const | 
| Returns off-diagonal part of this matrix.  More... | |
| MatrixTri< T, Rows, Cols, const Derived & > | StrictLowerTri () const | 
| Returns strictly lower triangle part of this matrix.  More... | |
| MatrixTri< T, Rows, Cols, const Derived & > | StrictUpperTri () const | 
| Returns strictly upper triangle part of this matrix.  More... | |
| MatrixTri< T, Rows, Cols, const Derived & > | LowerTri () const | 
| Returns lower triangle part of this matrix (including the diagonal).  More... | |
| MatrixTri< T, Rows, Cols, const Derived & > | UpperTri () const | 
| Returns upper triangle part of this matrix (including the diagonal).  More... | |
| MatrixTranspose< T, Rows, Cols, const Derived & > | Transposed () const | 
| Matrix< T, Rows, Cols > | Inverse () const | 
| Returns inverse matrix.  More... | |
| template<typename U > | |
| MatrixUnaryOp< U, Rows, Cols, const Derived &, TypeCast< T, U > > | CastTo () const | 
| template<size_t R, size_t C, typename E , typename U = ValueType> | |
| std::enable_if_t<(IsMatrixSizeDynamic< Rows, Cols >)||Cols==1) &&(IsMatrixSizeDynamic< R, C >)||C==1), U > | Dot (const MatrixExpression< T, R, C, E > &expression) const | 
| template<size_t R, size_t C, typename E , typename U = ValueType> | |
| std::enable_if_t<(IsMatrixSizeDynamic< Rows, Cols >)||(Rows==2 &&Cols==1)) &&(IsMatrixSizeDynamic< R, C >)||(R==2 &&C==1)), U > | Cross (const MatrixExpression< T, R, C, E > &expression) const | 
| template<size_t R, size_t C, typename E , typename U = ValueType> | |
| std::enable_if_t<(IsMatrixSizeDynamic< Rows, Cols >)||(Rows==3 &&Cols==1)) &&(IsMatrixSizeDynamic< R, C >)||(R==3 &&C==1)), Matrix< U, 3, 1 > > | Cross (const MatrixExpression< T, R, C, E > &expression) const | 
| template<size_t R, size_t C, typename E , typename U = ValueType> | |
| std::enable_if_t<(IsMatrixSizeDynamic< Rows, Cols >)||((Rows==2||Rows==3) &&Cols==1)) &&(IsMatrixSizeDynamic< R, C >)||((R==2||R==3) &&C==1)), Matrix< U, Rows, 1 > > | Reflected (const MatrixExpression< T, R, C, E > &normal) const | 
| Returns the reflection vector to the surface with given surface normal.  More... | |
| template<size_t R, size_t C, typename E , typename U = ValueType> | |
| std::enable_if_t<(IsMatrixSizeDynamic< Rows, Cols >)||((Rows==2||Rows==3) &&Cols==1)) &&(IsMatrixSizeDynamic< R, C >)||((R==2||R==3) &&C==1)), Matrix< U, Rows, 1 > > | Projected (const MatrixExpression< T, R, C, E > &normal) const | 
| Returns the projected vector to the surface with given surface normal.  More... | |
| template<typename U = ValueType> | |
| std::enable_if_t<(IsMatrixSizeDynamic< Rows, Cols >)||(Rows==2 &&Cols==1)), Matrix< U, 2, 1 > > | Tangential () const | 
| Returns the tangential vector for this vector.  More... | |
| template<typename U = ValueType> | |
| std::enable_if_t<(IsMatrixSizeDynamic< Rows, Cols >)||(Rows==3 &&Cols==1)), std::tuple< Matrix< U, 3, 1 >, Matrix< U, 3, 1 > > > | Tangentials () const | 
| Returns the tangential vectors for this vector.  More... | |
| Derived & | GetDerived () | 
| Returns actual implementation (the subclass).  More... | |
| const Derived & | GetDerived () const | 
| Returns actual implementation (the subclass).  More... | |
| template<size_t R, size_t C, typename E > | |
| T | DistanceTo (const MatrixExpression< T, R, C, E > &other) const | 
| template<size_t R, size_t C, typename E > | |
| T | DistanceSquaredTo (const MatrixExpression< T, R, C, E > &other) const | 
| template<typename U > | |
| MatrixTypeCast< T, Rows, Cols, U, const D & > | CastTo () const | 
| template<typename U > | |
| std::enable_if_t<(Rows > 4 &&Cols > 4)||IsMatrixSizeDynamic< Rows, Cols >), U > | Determinant (const MatrixExpression &m) | 
| template<typename M > | |
| void | Inverse (const MatrixExpression< T, Rows, Cols, Derived > &m, std::enable_if_t<(Rows > 4 &&Cols > 4)||IsMatrixSizeDynamic< Rows, Cols >(), M > &result) | 
| Protected Member Functions | |
| MatrixExpression ()=default | |
| Static Protected Member Functions | |
| static constexpr T | Determinant (const MatrixExpression< T, 1, 1, Derived > &m) | 
| static constexpr T | Determinant (const MatrixExpression< T, 2, 2, Derived > &m) | 
| static constexpr T | Determinant (const MatrixExpression< T, 3, 3, Derived > &m) | 
| static constexpr T | Determinant (const MatrixExpression< T, 4, 4, Derived > &m) | 
| template<typename U = ValueType> | |
| static std::enable_if_t<(Rows > 4 &&Cols > 4)||IsMatrixSizeDynamic< Rows, Cols >), U > | Determinant (const MatrixExpression< T, Rows, Cols, Derived > &m) | 
| static void | Inverse (const MatrixExpression< T, 1, 1, Derived > &m, Matrix< T, Rows, Cols > &result) | 
| static void | Inverse (const MatrixExpression< T, 2, 2, Derived > &m, Matrix< T, Rows, Cols > &result) | 
| static void | Inverse (const MatrixExpression< T, 3, 3, Derived > &m, Matrix< T, Rows, Cols > &result) | 
| static void | Inverse (const MatrixExpression< T, 4, 4, Derived > &m, Matrix< T, Rows, Cols > &result) | 
| template<typename M = Matrix<T, Rows, Cols>> | |
| static void | Inverse (const MatrixExpression &m, std::enable_if_t<(Rows > 4 &&Cols > 4)||IsMatrixSizeDynamic< Rows, Cols >(), M > &result) | 
Detailed Description
template<typename T, size_t Rows, size_t Cols, typename Derived>
class CubbyFlow::MatrixExpression< T, Rows, Cols, Derived >
Base class for matrix expression.
Matrix expression is a meta type that enables template expression pattern.
- Template Parameters
- 
  T Real number type. Rows The number of rows. Cols The number of columns. Derived Subclass type. 
Member Typedef Documentation
◆ ValueType
| using CubbyFlow::MatrixExpression< T, Rows, Cols, Derived >::ValueType = T | 
Constructor & Destructor Documentation
◆ MatrixExpression()
| 
 | protecteddefault | 
Member Function Documentation
◆ AbsMax()
| T CubbyFlow::MatrixExpression< T, Rows, Cols, D >::AbsMax | ( | ) | const | 
◆ AbsMin()
| T CubbyFlow::MatrixExpression< T, Rows, Cols, D >::AbsMin | ( | ) | const | 
◆ Avg()
| T CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Avg | ( | ) | const | 
◆ CastTo() [1/2]
| MatrixUnaryOp<U, Rows, Cols, const Derived&, TypeCast<T, U> > CubbyFlow::MatrixExpression< T, Rows, Cols, Derived >::CastTo | ( | ) | const | 
◆ CastTo() [2/2]
| MatrixTypeCast<T, Rows, Cols, U, const D&> CubbyFlow::MatrixExpression< T, Rows, Cols, Derived >::CastTo | ( | ) | const | 
◆ Cross() [1/2]
| std::enable_if_t<(IsMatrixSizeDynamic< Rows, Cols >)||(Rows==2 &&Cols==1)) &&(IsMatrixSizeDynamic< R, C >)||(R==2 &&C==1)), U > CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Cross | ( | const MatrixExpression< T, R, C, E > & | expression | ) | const | 
◆ Cross() [2/2]
| std::enable_if_t<(IsMatrixSizeDynamic< Rows, Cols >)||(Rows==3 &&Cols==1)) &&(IsMatrixSizeDynamic< R, C >)||(R==3 &&C==1)), Matrix< U, 3, 1 > > CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Cross | ( | const MatrixExpression< T, R, C, E > & | expression | ) | const | 
◆ Determinant() [1/7]
| T CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Determinant | ( | ) | const | 
◆ Determinant() [2/7]
| 
 | staticprotected | 
◆ Determinant() [3/7]
| 
 | staticprotected | 
◆ Determinant() [4/7]
| 
 | staticprotected | 
◆ Determinant() [5/7]
| 
 | staticprotected | 
◆ Determinant() [6/7]
| 
 | staticprotected | 
◆ Determinant() [7/7]
| std::enable_if_t<(Rows > 4 && Cols > 4) || IsMatrixSizeDynamic<Rows, Cols>), U> CubbyFlow::MatrixExpression< T, Rows, Cols, Derived >::Determinant | ( | const MatrixExpression< T, Rows, Cols, Derived > & | m | ) | 
◆ Diagonal()
| MatrixDiagonal< T, Rows, Cols, const D & > CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Diagonal | ( | ) | const | 
Returns diagonal part of this matrix.
◆ DistanceSquaredTo() [1/2]
| ValueType CubbyFlow::MatrixExpression< T, Rows, Cols, Derived >::DistanceSquaredTo | ( | const MatrixExpression< T, R, C, E > & | other | ) | const | 
Returns the squared distance to the other vector.
◆ DistanceSquaredTo() [2/2]
| T CubbyFlow::MatrixExpression< T, Rows, Cols, Derived >::DistanceSquaredTo | ( | const MatrixExpression< T, R, C, E > & | other | ) | const | 
◆ DistanceTo() [1/2]
| ValueType CubbyFlow::MatrixExpression< T, Rows, Cols, Derived >::DistanceTo | ( | const MatrixExpression< T, R, C, E > & | other | ) | const | 
Returns the distance to the other vector.
◆ DistanceTo() [2/2]
| T CubbyFlow::MatrixExpression< T, Rows, Cols, Derived >::DistanceTo | ( | const MatrixExpression< T, R, C, E > & | other | ) | const | 
◆ DominantAxis()
| size_t CubbyFlow::MatrixExpression< T, Rows, Cols, D >::DominantAxis | ( | ) | const | 
◆ Dot()
| std::enable_if_t<(IsMatrixSizeDynamic< Rows, Cols >)||Cols==1) &&(IsMatrixSizeDynamic< R, C >)||C==1), U > CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Dot | ( | const MatrixExpression< T, R, C, E > & | expression | ) | const | 
◆ Eval() [1/2]
| T CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Eval | ( | size_t | i, | 
| size_t | j | ||
| ) | const | 
Returns the evaluated value for (i, j).
◆ Eval() [2/2]
| Matrix< T, Rows, Cols > CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Eval | ( | ) | const | 
◆ FrobeniusNorm()
| T CubbyFlow::MatrixExpression< T, Rows, Cols, D >::FrobeniusNorm | ( | ) | const | 
◆ GetCols()
| constexpr size_t CubbyFlow::MatrixExpression< T, Rows, Cols, D >::GetCols | ( | ) | const | 
Returns the number of columns.
◆ GetDerived() [1/2]
| D & CubbyFlow::MatrixExpression< T, Rows, Cols, D >::GetDerived | ( | ) | 
Returns actual implementation (the subclass).
◆ GetDerived() [2/2]
| const D & CubbyFlow::MatrixExpression< T, Rows, Cols, D >::GetDerived | ( | ) | const | 
Returns actual implementation (the subclass).
◆ GetRows()
| constexpr size_t CubbyFlow::MatrixExpression< T, Rows, Cols, D >::GetRows | ( | ) | const | 
Returns the number of rows.
◆ Inverse() [1/7]
| Matrix< T, Rows, Cols > CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Inverse | ( | ) | const | 
Returns inverse matrix.
◆ Inverse() [2/7]
| 
 | staticprotected | 
◆ Inverse() [3/7]
| 
 | staticprotected | 
◆ Inverse() [4/7]
| 
 | staticprotected | 
◆ Inverse() [5/7]
| 
 | staticprotected | 
◆ Inverse() [6/7]
| 
 | staticprotected | 
◆ Inverse() [7/7]
| void CubbyFlow::MatrixExpression< T, Rows, Cols, Derived >::Inverse | ( | const MatrixExpression< T, Rows, Cols, Derived > & | m, | 
| std::enable_if_t<(Rows > 4 && | Cols, | ||
| 4 | |||
| ) | & | 
◆ IsSimilar()
| bool CubbyFlow::MatrixExpression< T, Rows, Cols, D >::IsSimilar | ( | const MatrixExpression< T, R, C, E > & | m, | 
| double | tol = std::numeric_limits<double>::epsilon() | ||
| ) | const | 
Returns true if this matrix is similar to the input matrix within the given tolerance.
◆ IsSquare()
| constexpr bool CubbyFlow::MatrixExpression< T, Rows, Cols, D >::IsSquare | ( | ) | const | 
Returns true if this matrix is a square matrix.
◆ Length()
| T CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Length | ( | ) | const | 
◆ LengthSquared()
| T CubbyFlow::MatrixExpression< T, Rows, Cols, D >::LengthSquared | ( | ) | const | 
◆ LowerTri()
| MatrixTri< T, Rows, Cols, const D & > CubbyFlow::MatrixExpression< T, Rows, Cols, D >::LowerTri | ( | ) | const | 
Returns lower triangle part of this matrix (including the diagonal).
◆ Max()
| T CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Max | ( | ) | const | 
◆ Min()
| T CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Min | ( | ) | const | 
◆ Norm()
| T CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Norm | ( | ) | const | 
◆ Normalized()
| MatrixScalarElemWiseDiv< T, Rows, Cols, const D & > CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Normalized | ( | ) | const | 
◆ NormSquared()
| T CubbyFlow::MatrixExpression< T, Rows, Cols, D >::NormSquared | ( | ) | const | 
◆ OffDiagonal()
| MatrixOffDiagonal< T, Rows, Cols, const D & > CubbyFlow::MatrixExpression< T, Rows, Cols, D >::OffDiagonal | ( | ) | const | 
Returns off-diagonal part of this matrix.
◆ Projected()
| std::enable_if_t<(IsMatrixSizeDynamic< Rows, Cols >)||((Rows==2||Rows==3) &&Cols==1)) &&(IsMatrixSizeDynamic< R, C >)||((R==2||R==3) &&C==1)), Matrix< U, Rows, 1 > > CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Projected | ( | const MatrixExpression< T, R, C, E > & | normal | ) | const | 
Returns the projected vector to the surface with given surface normal.
◆ Reflected()
| std::enable_if_t<(IsMatrixSizeDynamic< Rows, Cols >)||((Rows==2||Rows==3) &&Cols==1)) &&(IsMatrixSizeDynamic< R, C >)||((R==2||R==3) &&C==1)), Matrix< U, Rows, 1 > > CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Reflected | ( | const MatrixExpression< T, R, C, E > & | normal | ) | const | 
Returns the reflection vector to the surface with given surface normal.
◆ StrictLowerTri()
| MatrixTri< T, Rows, Cols, const D & > CubbyFlow::MatrixExpression< T, Rows, Cols, D >::StrictLowerTri | ( | ) | const | 
Returns strictly lower triangle part of this matrix.
◆ StrictUpperTri()
| MatrixTri< T, Rows, Cols, const D & > CubbyFlow::MatrixExpression< T, Rows, Cols, D >::StrictUpperTri | ( | ) | const | 
Returns strictly upper triangle part of this matrix.
◆ SubdominantAxis()
| size_t CubbyFlow::MatrixExpression< T, Rows, Cols, D >::SubdominantAxis | ( | ) | const | 
◆ Sum()
| T CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Sum | ( | ) | const | 
◆ Tangential()
| std::enable_if_t<(IsMatrixSizeDynamic< Rows, Cols >)||(Rows==2 &&Cols==1)), Matrix< U, 2, 1 > > CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Tangential | ( | ) | const | 
Returns the tangential vector for this vector.
◆ Tangentials()
| std::enable_if_t<(IsMatrixSizeDynamic< Rows, Cols >)||(Rows==3 &&Cols==1)), std::tuple< Matrix< U, 3, 1 >, Matrix< U, 3, 1 > > > CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Tangentials | ( | ) | const | 
Returns the tangential vectors for this vector.
◆ Trace()
| T CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Trace | ( | ) | const | 
◆ Transposed()
| MatrixTranspose< T, Rows, Cols, const D & > CubbyFlow::MatrixExpression< T, Rows, Cols, D >::Transposed | ( | ) | const | 
◆ UpperTri()
| MatrixTri< T, Rows, Cols, const D & > CubbyFlow::MatrixExpression< T, Rows, Cols, D >::UpperTri | ( | ) | const | 
Returns upper triangle part of this matrix (including the diagonal).
The documentation for this class was generated from the following files:
- Core/Matrix/MatrixExpression.hpp
- Core/Matrix/MatrixExpression-Impl.hpp
 1.8.13
 1.8.13