STK++ 0.9.13
Hidden implementation details
Collaboration diagram for Hidden implementation details:

Classes

struct  STK::hidden::InvertMatrixImpl< Matrix, Size_ >
 Implementation of the inversion matrix method for general/square matrices. More...
 
struct  STK::hidden::InvertMatrixDispatcher< Matrix, Size_ >
 computing the inverse of a matrix. More...
 
struct  STK::hidden::InvertLowerSymMatrixImpl< Matrix, Size_ >
 Implementation of the computation of the inverse of a lower symmetric matrix. More...
 
struct  STK::hidden::InvertLowerSymMatrixDispatcher< Matrix, Size_ >
 computing the inverse of a lower symmetric matrix. More...
 
struct  STK::hidden::InvertLowerTriangularImpl< Matrix, Size_ >
 Implementation of the computation of the inverse of a lower triangular matrix. More...
 
struct  STK::hidden::InvertLowerTriangularDispatcher< Matrix, Size_ >
 utility class allowing to call the correct static function computing the inverse of a matrix. More...
 
struct  STK::hidden::InvertSymImpl< Matrix, Size_ >
 Implementation of the computation of the inverse of a lower triangular matrix. More...
 
struct  STK::hidden::InvertSymMatrixDispatcher< Matrix, Size_ >
 computing the inverse of a symmetric matrix. More...
 
struct  STK::hidden::InvertUpperSymMatrixImpl< Matrix, Size_ >
 Implementation of the inversion matrix method for upper symmetric matrices. More...
 
struct  STK::hidden::InvertUpperSymMatrixDispatcher< Matrix, Size_ >
 computing the inverse of a symmetric matrix. More...
 
struct  STK::hidden::InvertUpperTriangularImpl< Matrix, Size_ >
 Implementation of the inversion matrix method for upper triangular matrices. More...
 
struct  STK::hidden::InvertUpperTriangularDispatcher< Matrix, Size_ >
 computing the inverse of a matrix. More...
 
struct  STK::hidden::AlgebraTraits< Derived >
 traits class for the algebra methods. More...
 
struct  STK::hidden::DispatcherChooser< Matrix, Size_, structure_ >
 Utility class allowing to choose the dispatcher for inversion matrix. More...
 
struct  STK::hidden::DispatcherChooser< Matrix, Size_, Arrays::array2D_ >
 Specialization for general arrays. More...
 
struct  STK::hidden::DispatcherChooser< Matrix, Size_, Arrays::square_ >
 Specialization for square arrays. More...
 
struct  STK::hidden::DispatcherChooser< Matrix, Size_, Arrays::upper_triangular_ >
 Specialization for upper triangular arrays. More...
 
struct  STK::hidden::DispatcherChooser< Matrix, Size_, Arrays::lower_triangular_ >
 Specialization for upper triangular arrays. More...
 
struct  STK::hidden::DispatcherChooser< Matrix, Size_, Arrays::symmetric_ >
 Specialization for symmetric arrays. More...
 
struct  STK::hidden::DispatcherChooser< Matrix, Size_, Arrays::upper_symmetric_ >
 Specialization for symmetric arrays. More...
 
struct  STK::hidden::AlgebraTraits< InvertMatrix< Matrix, Size_ > >
 Specialization for matrix inversion methods. More...
 
struct  STK::hidden::AlgebraTraits< lapack::MultiLeastSquare< ArrayB_, ArrayA_ > >
 Specialization for the lapack::MultiLeastSquare class. More...
 
struct  STK::hidden::AlgebraTraits< lapack::Qr >
 Specialization for the Qr class. More...
 
struct  STK::hidden::AlgebraTraits< lapack::Svd >
 Specialization for the Svd class. More...
 
struct  STK::hidden::AlgebraTraits< lapack::SymEigen< SquareArray_ > >
 Specialization for the lapack::SymEigen class. More...
 
struct  STK::hidden::AlgebraTraits< MultiLeastSquare< ArrayB_, ArrayA_ > >
 Specialization for the MultiLeastSquare class. More...
 
struct  STK::hidden::AlgebraTraits< Qr >
 Specialization for the Qr class. More...
 
struct  STK::hidden::AlgebraTraits< Svd< Array_ > >
 Specialization for the Svd class. More...
 
struct  STK::hidden::AlgebraTraits< SymEigen< SquareArray_ > >
 Specialization for the Qr class. More...
 
struct  STK::hidden::AlgebraTraits< WeightedSvd< Array_, WRows, WCols > >
 Specialization for the WeightedSvd class. More...
 
struct  STK::hidden::Traits< CAllocator< Type_, SizeRows_, SizeCols_, Orient_ > >
 Specialization of Traits class for CAllocator. More...
 
struct  STK::hidden::MemHandler< Type_, Size_ >
 Helper class allowing to free memory (or not) More...
 
struct  STK::hidden::MemHandler< Type_, UnknownSize >
 Specialization for dynamic size arrays. More...
 
struct  STK::hidden::MemChooser< int, Type_ >
 :: :: fundamental types More...
 
struct  STK::hidden::MemChooser< 1, Type_ >
 Specialization for fundamental types. More...
 
struct  STK::hidden::MemChooser< 0, Type_ >
 Specialization for other types using loop and operator=. More...
 
struct  STK::hidden::CheckShift< Derived, Structure_ >
 Utility class allowing to know if in an assignment the destination must be resized or shifted. More...
 
struct  STK::hidden::CheckShift< Derived, Arrays::array2D_ >
 Specialization for general array2D_. More...
 
struct  STK::hidden::CheckShift< Derived, Arrays::upper_triangular_ >
 Specialization for upper_triangular_. More...
 
struct  STK::hidden::CheckShift< Derived, Arrays::lower_triangular_ >
 Specialization for lower_triangular_. More...
 
struct  STK::hidden::CheckShift< Derived, Arrays::square_ >
 Specialization for square_. More...
 
struct  STK::hidden::CheckShift< Derived, Arrays::diagonal_ >
 Specialization for diagonal_. More...
 
struct  STK::hidden::resizeSelector< Lhs, Rhs, TStructure_ >
 utility class that select the resize method to call More...
 
struct  STK::hidden::Copycat< Derived, Rhs, TStructure_, RhsStructure_ >
 Copycat to use at compile time. More...
 
struct  STK::hidden::CopycatSelector< Lhs, Rhs, TOrient_ >
 utility class that select if the copy will be by row or by column More...
 
struct  STK::hidden::IteratorTraits< BiDirectionalIterator< Array_ > >
 Specialization for the BiDirectionalIterator iterator class. More...
 
struct  STK::hidden::IteratorTraits< ConstBiDirectionalIterator< Array_ > >
 Specialization for the ConstBiDirectionalIterator iterator class. More...
 
struct  STK::hidden::IteratorTraits< Derived >
 , More...
 
struct  STK::hidden::IteratorTraits< DenseRandomIterator< Array_ > >
 Specialization of the IteratorTraits class for the DenseRandomIterator iterator class. More...
 
struct  STK::hidden::IteratorTraits< ConstDenseRandomIterator< Array_ > >
 Specialization of the IteratorTraits for the ConstDenseRandomIterator iterator class. More...
 
struct  STK::hidden::BinaryEltImpl< FunctorOp, Lhs, Rhs, LStructure_, RStructure_ >
 Helper class giving the Structure of a binary operator. More...
 
struct  STK::hidden::BinaryRowsImpl< Lhs, Rhs, Size_, useForRows_ >
 implement the access to the rows of the BinaryOperator Possible cases are: More...
 
struct  STK::hidden::BinaryColsImpl< Lhs, Rhs, Size_, useForCols_ >
 implement the access to the columns of the BinaryOperator Possible cases are: More...
 
struct  STK::hidden::BinaryRowsImpl< Lhs, Rhs, Size_, Arrays::useLhsSize_ >
 specialization for the case useLhsSize_ More...
 
struct  STK::hidden::BinaryRowsImpl< Lhs, Rhs, Size_, Arrays::useRhsSize_ >
 specialization for the case useRhsSize_ More...
 
struct  STK::hidden::BinaryRowsImpl< Lhs, Rhs, Size_, Arrays::useLhsOtherSize_ >
 specialization for the case useLhsOtherSize_ More...
 
struct  STK::hidden::BinaryRowsImpl< Lhs, Rhs, Size_, Arrays::useRhsOtherSize_ >
 specialization for the case useRhsOtherSize_ More...
 
struct  STK::hidden::BinaryColsImpl< Lhs, Rhs, Size_, Arrays::useLhsSize_ >
 specialization for the case useLhsSize_ More...
 
struct  STK::hidden::BinaryColsImpl< Lhs, Rhs, Size_, Arrays::useRhsSize_ >
 specialization for the case useRhsSize_ More...
 
struct  STK::hidden::BinaryColsImpl< Lhs, Rhs, Size_, Arrays::useLhsOtherSize_ >
 specialization for the case useLhsOtherSize_ More...
 
struct  STK::hidden::BinaryColsImpl< Lhs, Rhs, Size_, Arrays::useRhsOtherSize_ >
 specialization for the case useRhsOtherSize_ More...
 
struct  STK::hidden::DiagonalRangeImpl< Lhs, Size_, use_ >
 Allow to disambiguate the call to range to use. More...
 
struct  STK::hidden::TransposeTraits< Structure_ >
 Helper Traits class for transposed operator. More...
 
struct  STK::hidden::Traits< BinaryOperator< FunctorOp, Lhs, Rhs > >
 Traits class for the BinaryOperator. More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, operatorType_ >
 helper defining the return type of the selector involving expressions of the form expr + number and expr + other_expr More...
 
struct  STK::hidden::OperatorImpl< Functor, Lhs, Rhs, isNumber >
 allow to disambiguate the case expr + number from the case expr + other_expr More...
 
struct  STK::hidden::OperatorHelper< Lhs, Rhs, UnaryFunctor, BinaryFunctor >
 allow to disambiguate the case expr + number from the case expr + other_expr More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::equalOp_ >
 specialization for operator== More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::notEqualOp_ >
 specialization for operator!= More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::greaterThanOp_ >
 specialization for operator> More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::lessThanOp_ >
 specialization for operator< More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::greaterThanOrEqualOp_ >
 specialization for operator>= More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::lessThanOrEqualOp_ >
 specialization for operator<= More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::sumOp_ >
 specialization for operator+ More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::differenceOp_ >
 specialization for operator- More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::productOp_ >
 specialization for operator* More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::divisionOp_ >
 specialization for operator/ More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::moduloOp_ >
 specialization for operator% More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::minOp_ >
 specialization for operator min More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::maxOp_ >
 specialization for operator max More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::logicalAndOp_ >
 specialization for operator&& More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::logicalOrOp_ >
 specialization for operator|| More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::bitwiseAndOp_ >
 specialization for operator& More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::bitwiseOrOp_ >
 specialization for operator| More...
 
struct  STK::hidden::OperatorSelector< Lhs, Rhs, Arrays::bitwiseXorOp_ >
 specialization for operator^ More...
 
struct  STK::hidden::Traits< DiagonalizeAccessor< Lhs > >
 Traits class for DiagonalizeAccessor operator. More...
 
struct  STK::hidden::Traits< DiagonalGetterAccessor< Lhs > >
 Traits class for DiagonalGetterAccessor operator. More...
 
struct  STK::hidden::Traits< UpperTriangularizeAccessor< Lhs > >
 Traits class for UpperTriangularizeAccessor operator. More...
 
struct  STK::hidden::Traits< LowerTriangularizeAccessor< Lhs > >
 Traits class for LowerTriangularizeAccessor operator. More...
 
struct  STK::hidden::Traits< SymmetrizeAccessor< Lhs > >
 Traits class for SymmetrizeAccessor operator. More...
 
struct  STK::hidden::Traits< UpperSymmetrizeAccessor< Lhs > >
 Traits class for UpperSymmetrizeAccessor operator. More...
 
struct  STK::hidden::Traits< LowerSymmetrizeAccessor< Lhs > >
 Traits class for LowerSymmetrizeAccessor operator. More...
 
struct  STK::hidden::Traits< DiagonalizeOperator< Lhs > >
 Traits class for DiagonalizeOperator operator. More...
 
struct  STK::hidden::Traits< DiagonalGetterOperator< Lhs > >
 Traits class for DiagonalGetterOperator operator. More...
 
struct  STK::hidden::Traits< UpperTriangularizeOperator< Lhs > >
 Traits class for UpperTriangularizeOperator operator. More...
 
struct  STK::hidden::Traits< LowerTriangularizeOperator< Lhs > >
 Traits class for UpperTriangularizeOperator operator. More...
 
struct  STK::hidden::Traits< SymmetrizeOperator< Lhs > >
 Traits class for SymmetrizeOperator operator. More...
 
struct  STK::hidden::Traits< UpperSymmetrizeOperator< Lhs > >
 Traits class for UpperSymmetrizeOperator operator. More...
 
struct  STK::hidden::Traits< LowerSymmetrizeOperator< Lhs > >
 Traits class for LowerSymmetrizeOperator operator. More...
 
struct  STK::hidden::Traits< RowAccessor< Lhs > >
 Traits class for the row accessor. More...
 
struct  STK::hidden::Traits< ColAccessor< Lhs > >
 Traits class for the column accessor operator. More...
 
struct  STK::hidden::Traits< SubVectorAccessor< Lhs, Size_ > >
 Traits class for the sub vector accessor. More...
 
struct  STK::hidden::Traits< SubAccessor< Lhs, SizeRows_, SizeCols_ > >
 Traits class for the sub accessor. More...
 
struct  STK::hidden::Traits< RowOperator< Lhs > >
 Traits class for the row operator. More...
 
struct  STK::hidden::Traits< ColOperator< Lhs > >
 Traits class for the column operator. More...
 
struct  STK::hidden::Traits< SubVectorOperator< Lhs, Size_ > >
 Traits class for the sub vector operator. More...
 
struct  STK::hidden::Traits< SubOperator< Lhs, SizeRows_, SizeCols_ > >
 Traits class for the sub operator. More...
 
struct  STK::hidden::Traits< TransposeAccessor< Lhs > >
 Traits class for the transposed operator. More...
 
struct  STK::hidden::Traits< TransposeOperator< Lhs > >
 Traits class for the transposed operator. More...
 
struct  STK::hidden::Traits< UnaryOperator< UnaryOp, Lhs > >
 Traits class for the unary operators. More...
 
struct  STK::hidden::BlockByPanel< Lhs, Rhs, Result >
 Methods to use for C=AB with A divided in blocks and B divided in panels. More...
 
struct  STK::hidden::PanelByBlock< Lhs, Rhs, Result >
 Methods to use for C=AB with A divided in panels and B divided in blocks. More...
 
struct  STK::hidden::BlockPanelProduct< Lhs, Rhs, Result >
 Methods to use for C=AB with A divided in blocks and B divided in panels. More...
 
struct  STK::hidden::PanelBlockProduct< Lhs, Rhs, Result >
 Methods to use for C=AB with A divided in panels and B divided in blocks. More...
 
struct  STK::hidden::MultImpl< Type >
 this structure regroup all the methods using only pointers on the Type More...
 
struct  STK::hidden::bv< Lhs, Rhs, Result >
 Methods to use for C=AV with A a general matrix and V a vector. More...
 
struct  STK::hidden::vb< Lhs, Rhs, Result >
 Methods to use for C=PB with P a point and B a matrix. More...
 
struct  STK::hidden::MultPointArray< Lhs, Rhs, Result >
 This structure regroup the products between a point and different kind of array. More...
 
struct  STK::hidden::Traits< DotProduct< Lhs, Rhs > >
 Traits class for the DotProduct class. More...
 
struct  STK::hidden::ProductDispatcher< Lhs, Rhs, Result, lhsStructure_, RhsStructure_ >
 Dispatcher allowing to choose th e way to multiply two expressions. More...
 
struct  STK::hidden::Traits< ArrayByDiagonalProduct< Lhs, Rhs > >
 Traits class for array2d by diagonal product. More...
 
struct  STK::hidden::Traits< DiagonalByArrayProduct< Lhs, Rhs > >
 Traits class for the DiagonalByArrayProduct class. More...
 
struct  STK::hidden::Traits< VectorByPointProduct< Lhs, Rhs > >
 Traits class for the VectorByPointProduct class. More...
 
struct  STK::hidden::Traits< PointByArrayProduct< Lhs, Rhs > >
 Traits class for the PointByArrayProduct. More...
 
struct  STK::hidden::Traits< ArrayByVectorProduct< Lhs, Rhs > >
 Traits class for the ArrayByVectorProduct class. More...
 
struct  STK::hidden::Traits< ArrayByArrayProduct< Lhs, Rhs > >
 Traits class for the ArrayByArrayProduct class. More...
 
struct  STK::hidden::Panel< Type >
 This structure encapsulate the data allocated for a panel. More...
 
struct  STK::hidden::Block< Type >
 This structure encapsulate the data allocated for a block. More...
 
struct  STK::hidden::RawVec< Type >
 This structure encapsulate the data allocated for a block. More...
 
struct  STK::hidden::MultCoefImpl< Lhs, Rhs, Result >
 This structure regroup the methods to used after block multiplication in order to perform the product of the remaining rows and columns. More...
 
struct  STK::hidden::CopySubArrayImpl< Array, Type >
 This structure regroup the methods to used for copying part of an array in a Block or a Panel. More...
 
struct  STK::hidden::Traits< Array1D< Type_, Size_ > >
 Specialization of the Traits class for Array1D class. More...
 
struct  STK::hidden::Traits< Array2D< Type_ > >
 Specialization of the Traits class for the Array2D class. More...
 
struct  STK::hidden::BinaryReturnArray2DType< Type, LhsStructure_, RhsStructure_ >
 Helper class to get the correct returned Structure of Functors. More...
 
struct  STK::hidden::ProductArray2DReturnType< Type, LStructure_, RStructure_ >
 Helper class to get the correct returned Type for Array2D* classes when a product is performed between two arrays. More...
 
struct  STK::hidden::Traits< Array2DDiagonal< Type_ > >
 Specialization of the Traits class for the Array2DDiagonal class. More...
 
struct  STK::hidden::Traits< Array2DLowerTriangular< Type_ > >
 Specialization of the Traits class for the Array2DLowerTriangular class. More...
 
struct  STK::hidden::Traits< Array2DNumber< Type_ > >
 Specialization of the Traits class for Array2DNumber class. More...
 
struct  STK::hidden::Traits< Array2DPoint< Type_ > >
 Specialization of the Traits class for Array2DPoint class. More...
 
struct  STK::hidden::Traits< Array2DSquare< Type_ > >
 Specialization of the Traits class for the Array2DSquare class. More...
 
struct  STK::hidden::Traits< Array2DUpperTriangular< Type_ > >
 Specialization of the Traits class for the Array2DUpperTriangular class. More...
 
struct  STK::hidden::Traits< Array2DVector< Type_ > >
 Specialization of the Traits class for the Array2DVector class. More...
 
struct  STK::hidden::Traits< Derived >
 , More...
 
struct  STK::hidden::ProductTraits< Lhs, Rhs, LStructure_, RStructure_ >
 , More...
 
struct  STK::hidden::FunctorTraits< Derived, Functor >
 , Utility class that will select the type of operator to apply. More...
 
struct  STK::hidden::Traits< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >
 Specialization of the Traits class for CArray class. More...
 
struct  STK::hidden::Traits< CArrayNumber< Type_, Orient_ > >
 Specialization of the Traits class for CArrayNumber class. More...
 
struct  STK::hidden::Traits< CArrayPoint< Type_, SizeCols_, Orient_ > >
 Specialization of the Traits class for CArray class. More...
 
struct  STK::hidden::Traits< CArraySquare< Type_, Size_, Orient_ > >
 Specialization of the Traits class for CArray class. More...
 
struct  STK::hidden::Traits< CArrayVector< Type_, SizeRows_, Orient_ > >
 Specialization of the Traits class for CArrayVector class. More...
 
struct  STK::hidden::Traits< Const::Identity< Type_, Size_ > >
 Traits class for the identity constant matrix. More...
 
struct  STK::hidden::Traits< Const::Vector< Type_, Size_ > >
 Traits class for the identity constant matrix. More...
 
struct  STK::hidden::Traits< Const::Point< Type_, Size_ > >
 Traits class for the constant vector_. More...
 
struct  STK::hidden::Traits< Const::Square< Type_, Size_ > >
 Traits class for the square constant matrix. More...
 
struct  STK::hidden::Traits< Const::Array< Type_, SizeRows_, SizeCols_ > >
 Traits class for the general constant matrix. More...
 
struct  STK::hidden::Traits< Const::UpperTriangular< Type_, SizeRows_, SizeCols_ > >
 Traits class for the upper triangular constant matrix. More...
 
struct  STK::hidden::Traits< Const::LowerTriangular< Type_, SizeRows_, SizeCols_ > >
 Traits class for the lower triangular constant matrix. More...
 
struct  STK::hidden::FunctorSelector< Derived, Functor, isVector_ >
 , More...
 
struct  STK::hidden::FunctorSelector< Derived, Functor, false >
 specialization for general arrays: apply functor to rows or columns of the Derived array More...
 
struct  STK::hidden::FunctorSelector< Derived, Functor, true >
 specialization for vectors and points. More...
 
struct  STK::hidden::ProductSelector< Lhs, Rhs, LStructure_, RStructure_ >
 Helper class to select the correct ProductReturnType. More...
 
struct  STK::hidden::CSlice< Derived, SizeRows, SizeCols >
 The traits struct CSlice allows to disambiguate return type of the col/row/sub operators for CArray family. More...
 
struct  STK::hidden::CSliceDispatcher< Derived, Size >
 helper allowing to disambiguate SubVector access More...
 
class  STK::hidden::NoAssignOperator
 classes inheriting NoAssignOperator should not generate a default operator=. More...
 
struct  STK::hidden::Traits< SArray1D< Type_, Size_, NzMax_ > >
 Specialization of the Traits class for SArray1D class. More...
 
struct  STK::hidden::Traits< SArray2D< Type_ > >
 Specialization of the Traits class for the SArray2D class. More...
 
struct  STK::hidden::Traits< SArray2DDiagonal< Type_ > >
 Specialization of the Traits class for the SArray2DDiagonal class. More...
 
struct  STK::hidden::Traits< SArray2DLowerTriangular< Type_ > >
 Specialization of the Traits class for the SArray2DLowerTriangular class. More...
 
struct  STK::hidden::Traits< SArray2DNumber< Type_ > >
 Specialization of the Traits class for SArray2DNumber class. More...
 
struct  STK::hidden::Traits< SArray2DPoint< Type_ > >
 Specialization of the Traits class for SArray2DPoint class. More...
 
struct  STK::hidden::Traits< SArray2DSquare< Type_ > >
 Specialization of the Traits class for the SArray2DSquare class. More...
 
struct  STK::hidden::Traits< SArray2DUpperTriangular< Type_ > >
 Specialization of the Traits class for the SArray2DUpperTriangular class. More...
 
struct  STK::hidden::Traits< SArray2DVector< Type_ > >
 Specialization of the Traits class for the SArray2DVector class. More...
 
struct  STK::hidden::RandUnifApplier< Type >
 Applier setting uniform random numbers. More...
 
struct  STK::hidden::RandGaussApplier< Type >
 Visitor setting Gaussian random variables. More...
 
struct  STK::hidden::RandApplier< Type >
 Visitor putting a choosen random variable. More...
 
struct  STK::hidden::ValueApplier< Type >
 visitor putting a constant value More...
 
struct  STK::hidden::Traits< VisitorByCol< Derived, Visitor > >
 Traits class for the unary operators. More...
 
struct  STK::hidden::Traits< VisitorByRow< Derived, Visitor > >
 Traits class for the VisitorByRow class. More...
 
struct  STK::hidden::SliceVisitorSelector< Derived, Visitor, byCol >
 Utility class that will select the type of operator to apply. More...
 
struct  STK::hidden::SliceVisitorSelector< Derived, Visitor, true >
 Specialization if the visitor has to be applied by col. More...
 
struct  STK::hidden::SliceVisitorSelector< Derived, Visitor, false >
 Specialization if the visitor has to be applied by row. More...
 
struct  STK::hidden::GetIdx< Visitor, Structure_ >
 utility class for getting the result from a visitor acting on a vector or a point. More...
 
struct  STK::hidden::EltVisitor2DBase< Type_ >
 Base class to implement min, max, sum,... visitors for 2D containers. More...
 
struct  STK::hidden::MinEltVisitor< Type >
 Visitor computing the min coefficient with its value and coordinates. More...
 
struct  STK::hidden::MinEltSafeVisitor< Type >
 Visitor computing safely the minimal coefficient with its value and indexes. More...
 
struct  STK::hidden::MaxEltVisitor< Type >
 Visitor computing the maximal coefficient of the Array. More...
 
struct  STK::hidden::MaxEltSafeVisitor< Type >
 Visitor computing safely the maximal coefficient of the Array. More...
 
struct  STK::hidden::MinVisitor< Type_ >
 Visitor computing the min of all the coefficients of the Array. More...
 
struct  STK::hidden::MinSafeVisitor< Type_ >
 Visitor computing safely the min of all the coefficients of the Array. More...
 
struct  STK::hidden::MaxVisitor< Type_ >
 Visitor computing the max of all the coefficients of the Array. More...
 
struct  STK::hidden::MaxSafeVisitor< Type_ >
 Visitor computing safely the max of all the coefficients of the Array. More...
 
struct  STK::hidden::SumVisitor< Type_ >
 Visitor computing the sum of all the coefficients of the Array. More...
 
struct  STK::hidden::MeanVisitor< Type_ >
 Visitor computing the mean of all the coefficients of the Array. More...
 
struct  STK::hidden::MeanSafeVisitor< Type_ >
 Visitor computing safely the mean of all the coefficients of the Array. More...
 
struct  STK::hidden::CountVisitor< Type_ >
 Visitor counting the number of not-zero element in an array This visitor can be used in conjunction with the comparison operators in order to get the number of element matching a condition. More...
 
struct  STK::hidden::AllVisitor< Type_ >
 Visitor checking if all the elements of an array are different from zero. More...
 
struct  STK::hidden::AnyVisitor< Type_ >
 Visitor checking if at least, one element of an array is different from zero. More...
 
struct  STK::hidden::VisitorSelector< Visitor, Derived >
 visitor selector. More...
 
struct  STK::hidden::VisitorSelectorHelper< Visitor, Derived, Structure_ >
 Helper for the Visitor selector: allow to select the correct implementation to instantiate for arrays and square arrays when only one dimension (rows or columns but not both). More...
 
struct  STK::hidden::VisitorSelectorHelper< Visitor, Derived, Arrays::diagonal_ >
 specialization for the diagonal arrays More...
 
struct  STK::hidden::VisitorSelectorHelper< Visitor, Derived, Arrays::vector_ >
 specialization for the vectors More...
 
struct  STK::hidden::VisitorSelectorHelper< Visitor, Derived, Arrays::point_ >
 specialization for the row vectors More...
 
struct  STK::hidden::VisitorSelectorHelper< Visitor, Derived, Arrays::upper_triangular_ >
 specialization for the upper triangular arrays More...
 
struct  STK::hidden::VisitorSelectorHelper< Visitor, Derived, Arrays::lower_triangular_ >
 specialization for the lower triangular arrays More...
 
struct  STK::hidden::VisitorSelectorHelper< Visitor, Derived, Arrays::number_ >
 specialization for the numbers More...
 
struct  STK::hidden::VisitorArrayNoUnrollImpl< Visitor, Derived, Arrays::by_col_, UnknownSize, UnknownSize >
 Specialization for general 2D arrays, data stored by column and dimensions not known at compile time. More...
 
struct  STK::hidden::VisitorArrayNoUnrollImpl< Visitor, Derived, Arrays::by_row_, UnknownSize, UnknownSize >
 Specialization for general 2D arrays, data stored by rows and dimensions are not known at compile time. More...
 
struct  STK::hidden::VisitorArrayUnrollImpl< Visitor, Derived, Arrays::by_col_, SizeRows_, SizeCols_ >
 specialization for the general case when we unroll the rows and the and the columns with a column oriented arrays More...
 
struct  STK::hidden::VisitorArrayUnrollImpl< Visitor, Derived, Arrays::by_row_, SizeRows_, SizeCols_ >
 specialization for the general case when we unroll the rows and the columns with a row oriented arrays More...
 
struct  STK::hidden::VisitorArrayUnrollImpl< Visitor, Derived, Arrays::by_col_, SizeRows_, 1 >
 specialization for the Arrays with 1 column. More...
 
struct  STK::hidden::VisitorArrayUnrollImpl< Visitor, Derived, Arrays::by_row_, 1, SizeCols_ >
 specialization for the arrays with 1 column (Vector) More...
 
struct  STK::hidden::VisitorArrayUnrollImpl< Visitor, Derived, Arrays::by_col_, 1, 1 >
 specialization for the general case with 1 row and 1 column arrays. More...
 
struct  STK::hidden::VisitorArrayUnrollImpl< Visitor, Derived, Arrays::by_row_, 1, 1 >
 specialization for the general case with 1 row and 1 column arrays. More...
 
struct  STK::hidden::VisitorArrayImpl< Visitor, Derived, SizeRows_, UnknownSize >
 Specialization of VisitorArrayImpl when the number of rows is less than MaxUnrollSlice and the number of column is unknown or greater than MaxUnrollSlice. More...
 
struct  STK::hidden::VisitorArrayImpl< Visitor, Derived, 1, UnknownSize >
 Specialization of VisitorArrayImpl when the number of rows is 1 and the number of column is unknown or greater than MaxUnrollSlice. More...
 
struct  STK::hidden::VisitorArrayImpl< Visitor, Derived, UnknownSize, SizeCols_ >
 Specialization of VisitorArrayImpl when the number of columns is less than MaxUnrollSlice and the number of rows is unknown. More...
 
struct  STK::hidden::VisitorArrayImpl< Visitor, Derived, UnknownSize, 1 >
 Specialization of VisitorArrayImpl when the number of columns is one and the number of rows is unknown. More...
 
struct  STK::hidden::VisitorUnrollCol< Visitor, Derived, SizeRows_, SizeCols_ >
 unroll the column baseIdx + SizeCols_ -1 More...
 
struct  STK::hidden::VisitorUnrollCol< Visitor, Derived, 1, SizeCols_ >
 specialization for the arrays with 1 row (Point) More...
 
struct  STK::hidden::VisitorUnrollRow< Visitor, Derived, SizeRows_, SizeCols_ >
 unroll the row baseIdx + SizeRows_ -1
More...
 
struct  STK::hidden::VisitorUnrollRow< Visitor, Derived, SizeRows_, 1 >
 specialization for the arrays with 1 column More...
 
struct  STK::hidden::VisitorVectorImpl< Visitor, Derived, UnknownSize >
 Specialization when the size is unknown. More...
 
struct  STK::hidden::VisitorVectorImpl< Visitor, Derived, Size_ >
 A visitor Vector allow to unroll the visit of a vector if possible. More...
 
struct  STK::hidden::VisitorVectorImpl< Visitor, Derived, 1 >
 specialization for the vectors with 1 row More...
 
struct  STK::hidden::VisitorPointImpl< Visitor, Derived, UnknownSize >
 Specialization when the size is unknown. More...
 
struct  STK::hidden::VisitorPointImpl< Visitor, Derived, Size_ >
 A VisitorPointImpl allow to unroll the visit of a row-vector if possible. More...
 
struct  STK::hidden::VisitorPointImpl< Visitor, Derived, 1 >
 specialization for the RowVectors with one columns More...
 
struct  STK::hidden::VisitorDiagonalImpl< Visitor, Derived, UnknownSize >
 Specialization when the size is unknown. More...
 
struct  STK::hidden::VisitorDiagonalImpl< Visitor, Derived, Size_ >
 A VisitorDiagonalImpl allow to unroll the visit of a Diagonal tab if possible. More...
 
struct  STK::hidden::VisitorDiagonalImpl< Visitor, Derived, 1 >
 specialization for diagonal tab of size one More...
 
struct  STK::hidden::VisitorUpperImpl< Visitor, Derived, Arrays::by_col_ >
 specialization for the general case with column oriented arrays More...
 
struct  STK::hidden::VisitorUpperImpl< Visitor, Derived, Arrays::by_row_ >
 specialization for the general case with row oriented arrays More...
 
struct  STK::hidden::VisitorLowerImpl< Visitor, Derived, Arrays::by_col_ >
 specialization for the general case with column oriented arrays More...
 
struct  STK::hidden::VisitorLowerImpl< Visitor, Derived, Arrays::by_row_ >
 specialization for the general case with row oriented arrays More...
 
struct  STK::hidden::VisitorNumberImpl< Visitor, Derived >
 specialization for the general case with 1 row and 1 column arrays. More...
 
struct  STK::hidden::MixtureBridgeTraits< CategoricalBridge< Clust::Categorical_pjk_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the Categorical_pjk model. More...
 
struct  STK::hidden::MixtureBridgeTraits< CategoricalBridge< Clust::Categorical_pk_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the Categorical_pk model. More...
 
struct  STK::hidden::MixtureManagerTraits< CategoricalMixtureManager< DataHandler_ > >
 Partial specialization for CategoricalMixtureManager. More...
 
struct  STK::hidden::MixtureTraits< DiagGaussian_s< Array_ > >
 Traits class for the DiagGaussian_s traits policy. More...
 
struct  STK::hidden::MixtureTraits< DiagGaussian_sj< Array_ > >
 Traits class for the Gaussian_s traits policy. More...
 
struct  STK::hidden::MixtureBridgeTraits< DiagGaussianBridge< Clust::Gaussian_sjk_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the DiagGaussian_sjk model. More...
 
struct  STK::hidden::MixtureBridgeTraits< DiagGaussianBridge< Clust::Gaussian_sk_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the DiagGaussian_sk model. More...
 
struct  STK::hidden::MixtureBridgeTraits< DiagGaussianBridge< Clust::Gaussian_sj_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the DiagGaussian_sj model. More...
 
struct  STK::hidden::MixtureBridgeTraits< DiagGaussianBridge< Clust::Gaussian_sjsk_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the DiagGaussian_sjsk model. More...
 
struct  STK::hidden::MixtureBridgeTraits< DiagGaussianBridge< Clust::Gaussian_s_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the DiagGaussian_s model. More...
 
struct  STK::hidden::MixtureManagerTraits< DiagGaussianMixtureManager< DataHandler_ > >
 Specialization for Clust::Categorical_ mixtures. More...
 
class  STK::hidden::invPsiMLog
 Functor computing the derivative of the lnLikelihood of a gamma_ajk_bjk model. More...
 
class  STK::hidden::invPsi
 Functor computing the difference between the psi function and a fixed value. More...
 
struct  STK::hidden::MixtureBridgeTraits< GammaBridge< Clust::Gamma_ajk_bjk_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the Gamma_ajk_bjk_ model. More...
 
struct  STK::hidden::MixtureBridgeTraits< GammaBridge< Clust::Gamma_ajk_bk_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the Gamma_ajk_bk_ model. More...
 
struct  STK::hidden::MixtureBridgeTraits< GammaBridge< Clust::Gamma_ajk_bj_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the Gamma_ajk_bj_ model. More...
 
struct  STK::hidden::MixtureBridgeTraits< GammaBridge< Clust::Gamma_ajk_b_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the Gamma_ajk_b_ model. More...
 
struct  STK::hidden::MixtureBridgeTraits< GammaBridge< Clust::Gamma_ak_bjk_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the Gamma_ak_bjk_ model. More...
 
struct  STK::hidden::MixtureBridgeTraits< GammaBridge< Clust::Gamma_ak_bk_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the Gamma_ak_bk_ model. More...
 
struct  STK::hidden::MixtureBridgeTraits< GammaBridge< Clust::Gamma_ak_bj_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the Gamma_ak_bj_ model. More...
 
struct  STK::hidden::MixtureBridgeTraits< GammaBridge< Clust::Gamma_ak_b_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the Gamma_ak_b_ model. More...
 
struct  STK::hidden::MixtureBridgeTraits< GammaBridge< Clust::Gamma_aj_bjk_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the Gamma_aj_bjk_ model. More...
 
struct  STK::hidden::MixtureBridgeTraits< GammaBridge< Clust::Gamma_aj_bk_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the Gamma_aj_bk_ model. More...
 
struct  STK::hidden::MixtureBridgeTraits< GammaBridge< Clust::Gamma_a_bjk_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the Gamma_a_bjk_ model. More...
 
struct  STK::hidden::MixtureBridgeTraits< GammaBridge< Clust::Gamma_a_bk_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the Gamma_a_bk_ model. More...
 
struct  STK::hidden::MixtureManagerTraits< GammaMixtureManager< DataHandler_ > >
 Specialization for GammaMixtureManager. More...
 
struct  STK::hidden::MixtureBridgeTraits< HDMatrixGaussianBridge< IdRow_, IdCol_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the HDCovariance_AjkBkQkDk model. More...
 
struct  STK::hidden::MixtureBridgeTraits< HDGaussianBridge< Clust::HDGaussian_AjkBkQkD_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the HDGaussian_ajk_bk_qk_d_ model. More...
 
struct  STK::hidden::DataHandlerTraits< KernelHandler, Type >
 Specialization of the DataHandlerTraits struct for KernelHandler. More...
 
struct  STK::hidden::MixtureManagerTraits< KernelMixtureManager >
 Specialization for KernelMixtureManager. More...
 
struct  STK::hidden::MixtureBridgeTraits< KmmBridge< Clust::Kmm_sk_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the Kmm_sk_ model. More...
 
struct  STK::hidden::MixtureBridgeTraits< KmmBridge< Clust::Kmm_s_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the Kmm_s_ model. More...
 
struct  STK::hidden::MixtureBridgeTraits< PoissonBridge< Clust::Poisson_ljk_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the STK::Poisson_ljk mixture model. More...
 
struct  STK::hidden::MixtureBridgeTraits< PoissonBridge< Clust::Poisson_lk_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the STK::Poisson_lk mixture model. More...
 
struct  STK::hidden::MixtureBridgeTraits< PoissonBridge< Clust::Poisson_ljlk_, Data_ > >
 Partial specialization of the MixtureBridgeTraits for the STK::Poisson_ljlk mixture model. More...
 
struct  STK::hidden::MixtureManagerTraits< PoissonMixtureManager< DataHandler_ > >
 Partial specialization for PoissonMixtureManager. More...
 
struct  STK::hidden::MixtureBridgeTraits< Derived >
 MixtureBridgeTraits struct for bridged mixtures The traits struct MixtureBridgeTraits must be specialized for any Mixture deriving from the Interface IMixtureBridge. More...
 
struct  STK::hidden::MixtureTraits< Mixture >
 Main class for the mixtures traits policy. More...
 
struct  STK::hidden::MixtureManagerTraits< Manager >
 Main class for the mixture managers traits policy. More...
 
struct  STK::hidden::DataHandlerTraits< DataHandler, Type >
 Specialization of the DataHandlerTraits for DataHandler. More...
 
struct  STK::hidden::DataHandlerTraits< DataHandler, Type >
 The DataHandlerTraits will give the type of container furnished by the concrete implementations of the DataHandlerBase class. More...
 
struct  STK::hidden::Traits< List1D< Type_ > >
 Specialization of the Traits class for List1D class. More...
 
struct  STK::hidden::Traits< Variable< Type_ > >
 Specialization of the Traits struct for Variable class. More...
 
struct  STK::hidden::Promote< Type1, Type2 >
 Convenient struct to Promote the result Type of some binary functors. More...
 
struct  STK::hidden::ProductSizeRowsBySizeCols< Size1, Size2 >
 Convenient structure for computing the product of two template integer parameters without overflow. More...
 
struct  STK::hidden::StatModelTraits< ModelBernoulli_pj< Data_, WColVector_ > >
 Partial specialization of the StatModelTraits for the ModelBernoulli_pj model. More...
 
struct  STK::hidden::StatModelTraits< ModelDiagGaussian_muj_sj< Data_, WColVector_ > >
 Partial specialization of the StatModelTraits for the ModelDiagGaussian_muj_sj model. More...
 
struct  STK::hidden::StatModelTraits< ModelGamma_aj_bj< Data_, WColVector_ > >
 Partial specialization of the StatModelTraits for the ModelGamma_aj_bj model. More...
 
struct  STK::hidden::UsedFunctor< Functor, NbParam_ >
 The functor to use. More...
 
struct  STK::hidden::FunctorParamTraits< Functor, NbParam_ >
 produce the Nth parameter type of Functor. More...
 
struct  STK::hidden::FunctorReturnTypeTraits< Functor >
 produce the return type of the Functor. More...
 

Functions

static Type STK::hidden::InvertMatrixImpl< Matrix, Size_ >::invertMatrix11 (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the 1x1 matrix and store the result in inv.
 
static Type STK::hidden::InvertMatrixImpl< Matrix, Size_ >::invertMatrix22 (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the 2x2 matrix m and store the result in inv.
 
static Type STK::hidden::InvertMatrixImpl< Matrix, Size_ >::invertMatrix33 (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the 3x3 matrix m and store the result in inv.
 
static Type STK::hidden::InvertMatrixImpl< Matrix, Size_ >::invertMatrix44 (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the 4x4 matrix m and store the result in inv.
 
static Type STK::hidden::InvertMatrixImpl< Matrix, Size_ >::invertMatrixXX (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the matrix m and store the result in inv.
 
static Type STK::hidden::InvertLowerSymMatrixImpl< Matrix, Size_ >::invertLowerSymMatrix11 (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the lower symmetric matrix m of size 1x1 and store the result in inv.
 
static Type STK::hidden::InvertLowerSymMatrixImpl< Matrix, Size_ >::invertLowerSymMatrix22 (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the lower symmetric 2x2 matrix m using only its lower part and store the result in inv.
 
static Type STK::hidden::InvertLowerSymMatrixImpl< Matrix, Size_ >::invertLowerSymMatrix33 (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the symmetric 3x3 matrix m using only its lower part and store the result in inv.
 
static Type STK::hidden::InvertLowerSymMatrixImpl< Matrix, Size_ >::invertLowerSymMatrix44 (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the symmetric 4x4 matrix m using only its lower part and store the result in inv.
 
static Type STK::hidden::InvertLowerSymMatrixImpl< Matrix, Size_ >::invertLowerSymMatrixXX (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the lower symmetric 4x4 matrix m using only its lower part and store the result in inv.
 
static Type STK::hidden::InvertLowerTriangularImpl< Matrix, Size_ >::invertLowerTriangular11 (Matrix const &m, Array2DLowerTriangular< Type > &inv)
 compute the inverse of the 1x1 matrix and store the result in inv.
 
static Type STK::hidden::InvertLowerTriangularImpl< Matrix, Size_ >::invertLowerTriangular22 (Matrix const &m, Array2DLowerTriangular< Type > &inv)
 compute the inverse of the 2x2 matrix m and store the result in inv.
 
static Type STK::hidden::InvertLowerTriangularImpl< Matrix, Size_ >::invertLowerTriangular33 (Matrix const &m, Array2DLowerTriangular< Type > &inv)
 compute the inverse of the 3x3 matrix m and store the result in inv.
 
static Type STK::hidden::InvertLowerTriangularImpl< Matrix, Size_ >::invertLowerTriangular44 (Matrix const &m, Array2DLowerTriangular< Type > &inv)
 compute the inverse of the 4x4 matrix m and store the result in inv.
 
static Type STK::hidden::InvertLowerTriangularImpl< Matrix, Size_ >::invertLowerTriangularXX (Matrix const &m, Array2DLowerTriangular< Type > &inv)
 compute the inverse of the lower triangular matrix m and store the result in inv.
 
static Type STK::hidden::InvertSymImpl< Matrix, Size_ >::invertSymMatrix11 (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the symmetric matrix m of size 1x1 and store the result in inv.
 
static Type STK::hidden::InvertSymImpl< Matrix, Size_ >::invertSymMatrix22 (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the symmetric 2x2 matrix m using only its lower part and store the result in inv.
 
static Type STK::hidden::InvertSymImpl< Matrix, Size_ >::invertSymMatrix33 (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the symmetric 3x3 matrix m using only its lower part and store the result in inv.
 
static Type STK::hidden::InvertSymImpl< Matrix, Size_ >::invertSymMatrix44 (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the symmetric 4x4 matrix m using only its lower part and store the result in inv.
 
static Type STK::hidden::InvertSymImpl< Matrix, Size_ >::invertSymMatrixXX (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the symmetric 4x4 matrix m using only its lower part and store the result in inv.
 
static Type STK::hidden::InvertUpperSymMatrixImpl< Matrix, Size_ >::invertUpperSymMatrix11 (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the symmetric matrix m of size 1x1 and store the result in inv.
 
static Type STK::hidden::InvertUpperSymMatrixImpl< Matrix, Size_ >::invertUpperSymMatrix22 (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the symmetric 2x2 matrix m using only its upper part and store the result in inv.
 
static Type STK::hidden::InvertUpperSymMatrixImpl< Matrix, Size_ >::invertUpperSymMatrix33 (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the symmetric 3x3 matrix m using only its upper part and store the result in inv.
 
static Type STK::hidden::InvertUpperSymMatrixImpl< Matrix, Size_ >::invertUpperSymMatrix44 (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the symmetric 4x4 matrix m using only its upper part and store the result in inv.
 
static Type STK::hidden::InvertUpperSymMatrixImpl< Matrix, Size_ >::invertUpperSymMatrixXX (Matrix const &m, CArraySquare< Type, Size_ > &inv)
 compute the inverse of the symmetric 4x4 matrix m using only its upper part and store the result in inv.
 
static Type STK::hidden::InvertUpperTriangularImpl< Matrix, Size_ >::invertUpperTriangular11 (Matrix const &m, Array2DUpperTriangular< Type > &inv)
 compute the inverse of the 1x1 matrix and store the result in inv.
 
static Type STK::hidden::InvertUpperTriangularImpl< Matrix, Size_ >::invertUpperTriangular22 (Matrix const &m, Array2DUpperTriangular< Type > &inv)
 compute the inverse of the 2x2 matrix m and store the result in inv.
 
static Type STK::hidden::InvertUpperTriangularImpl< Matrix, Size_ >::invertUpperTriangular33 (Matrix const &m, Array2DUpperTriangular< Type > &inv)
 compute the inverse of the 3x3 matrix m and store the result in inv.
 
static Type STK::hidden::InvertUpperTriangularImpl< Matrix, Size_ >::invertUpperTriangular44 (Matrix const &m, Array2DUpperTriangular< Type > &inv)
 compute the inverse of the 4x4 matrix m and store the result in inv.
 
static Type STK::hidden::InvertUpperTriangularImpl< Matrix, Size_ >::invertUpperTriangularXX (Matrix const &m, Array2DUpperTriangular< Type > &inv)
 compute the inverse of the upper triangular matrix m and store the result in inv.
 

Detailed Description

Function Documentation

◆ invertLowerSymMatrix11()

template<class Matrix , int Size_>
static Type STK::hidden::InvertLowerSymMatrixImpl< Matrix, Size_ >::invertLowerSymMatrix11 ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the lower symmetric matrix m of size 1x1 and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 62 of file STK_InvertLowerSym.h.

63 {
64 const int iShift = m.beginRows(), jShift = m.beginCols();
65 inv.resize(TRange<Size_>(0, 1));
66 // cofactor (0,0) [0]
67 inv(0, 0) = Type(1);
68 // compute determinant
69 Type det = m(iShift+0, jShift+0);
70 if (det == Type(0)) return Type(0);
71 // compute inverse matrix
72 inv /= det;
73 return det;
74 }

Referenced by STK::hidden::InvertLowerSymMatrixDispatcher< Matrix, 1 >::run(), and STK::hidden::InvertLowerSymMatrixDispatcher< Matrix, Size_ >::run().

◆ invertLowerSymMatrix22()

template<class Matrix , int Size_>
static Type STK::hidden::InvertLowerSymMatrixImpl< Matrix, Size_ >::invertLowerSymMatrix22 ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the lower symmetric 2x2 matrix m using only its lower part and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 82 of file STK_InvertLowerSym.h.

83 {
84 const int iShift = m.beginRows(), jShift = m.beginCols();
85 inv.resize(TRange<Size_>(0, 1));
86 // cofactor (0,0) [0]
87 inv(0, 0) = m(iShift+1, jShift+1);
88 // cofactor (1,0) [1]
89 inv(1, 0) = - m(iShift+1, jShift+0);
90 // cofactor (1,1) [3]
91 inv(1, 1) = m(iShift+0, jShift+0);
92 // symmetry
93 inv(0, 1) = inv(1, 0);
94 // determinant
95 Type det = m(iShift+0, jShift+0) * inv(0, 0)
96 + m(iShift+1, jShift+0) * inv(1, 0);
97 if (det == Type(0)) return Type(0);
98 // inverse matrix
99 inv /= det;
100 return det;
101 }

Referenced by STK::hidden::InvertLowerSymMatrixDispatcher< Matrix, 2 >::run(), and STK::hidden::InvertLowerSymMatrixDispatcher< Matrix, Size_ >::run().

◆ invertLowerSymMatrix33()

template<class Matrix , int Size_>
static Type STK::hidden::InvertLowerSymMatrixImpl< Matrix, Size_ >::invertLowerSymMatrix33 ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the symmetric 3x3 matrix m using only its lower part and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 108 of file STK_InvertLowerSym.h.

109 {
110 const int iShift = m.beginRows(), jShift = m.beginCols();
111 inv.resize(TRange<Size_>(0, 2));
112 // cofactor (0,0) [0]
113 inv(0, 0) = m(iShift+1, jShift+1) * m(iShift+2, jShift+2)
114 - m(iShift+2, jShift+1) * m(iShift+2, jShift+1);
115 // cofactor (1,0) [1]
116 inv(1, 0) = m(iShift+1, jShift+2) * m(iShift+2, jShift+0)
117 - m(iShift+1, jShift+0) * m(iShift+2, jShift+2);
118 inv(2, 0) = m(iShift+1, jShift+0) * m(iShift+2, jShift+1)
119 - m(iShift+2, jShift+0) * m(iShift+1, jShift+1);
120 inv(1, 1) = m(iShift+0, jShift+0) * m(iShift+2, jShift+2)
121 - m(iShift+0, jShift+2) * m(iShift+2, jShift+0);
122 inv(2, 1) = m(iShift+2, jShift+0) * m(iShift+1, jShift+0)
123 - m(iShift+0, jShift+0) * m(iShift+2, jShift+1);
124 inv(2, 2) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1)
125 - m(iShift+1, jShift+0) * m(iShift+0, jShift+1);
126 // symmetry
127 inv(0,1) = inv(1,0); inv(0,2) = inv(2,0);
128 inv(1,2) = inv(2,1);
129
130 // compute determinant and inverse matrix
131 Type det = m(iShift+0, jShift+0) * inv(0, 0)
132 + m(iShift+1, jShift+0) * inv(1, 0)
133 + m(iShift+2, jShift+0) * inv(2,0);
134 if (det == Type(0)) return Type(0);
135 // inverse matrix
136 inv /= det;
137 return det;
138 }

Referenced by STK::hidden::InvertLowerSymMatrixDispatcher< Matrix, 3 >::run(), and STK::hidden::InvertLowerSymMatrixDispatcher< Matrix, Size_ >::run().

◆ invertLowerSymMatrix44()

template<class Matrix , int Size_>
static Type STK::hidden::InvertLowerSymMatrixImpl< Matrix, Size_ >::invertLowerSymMatrix44 ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the symmetric 4x4 matrix m using only its lower part and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 145 of file STK_InvertLowerSym.h.

146 {
147 const int iShift = m.beginRows(), jShift = m.beginCols();
148 inv.resize(TRange<Size_>(0, jShift+3));
149 // cofactor (0,0) [0]
150 inv(0,0) = m(iShift+1, jShift+1) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3)
151 - m(iShift+1, jShift+1) * m(iShift+3, jShift+2) * m(iShift+3, jShift+2)
152 - m(iShift+2, jShift+1) * m(iShift+2, jShift+1) * m(iShift+3, jShift+3)
153 + m(iShift+2, jShift+1) * m(iShift+3, jShift+1) * m(iShift+3, jShift+2)
154 + m(iShift+3, jShift+1) * m(iShift+2, jShift+1) * m(iShift+3, jShift+2)
155 - m(iShift+3, jShift+1) * m(iShift+3, jShift+1) * m(iShift+2, jShift+2);
156 // cofactor (1,0) [1]
157 inv(1,0) = -m(iShift+1, jShift+0) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3)
158 + m(iShift+1, jShift+0) * m(iShift+3, jShift+2) * m(iShift+3, jShift+2)
159 + m(iShift+2, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+3)
160 - m(iShift+2, jShift+1) * m(iShift+3, jShift+0) * m(iShift+3, jShift+2)
161 - m(iShift+3, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+2)
162 + m(iShift+3, jShift+1) * m(iShift+3, jShift+0) * m(iShift+2, jShift+2);
163 // cofactor (2,0) [2]
164 inv(2,0) = m(iShift+1, jShift+0) * m(iShift+2, jShift+1) * m(iShift+3, jShift+3)
165 - m(iShift+1, jShift+0) * m(iShift+3, jShift+1) * m(iShift+3, jShift+2)
166 - m(iShift+1, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+3)
167 + m(iShift+1, jShift+1) * m(iShift+3, jShift+0) * m(iShift+3, jShift+2)
168 + m(iShift+3, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+1)
169 - m(iShift+3, jShift+1) * m(iShift+3, jShift+0) * m(iShift+2, jShift+1);
170 // cofactor (3,0) [3]
171 inv(3,0) = -m(iShift+1, jShift+0) * m(iShift+2, jShift+1) * m(iShift+3, jShift+2)
172 + m(iShift+1, jShift+0) * m(iShift+3, jShift+1) * m(iShift+2, jShift+2)
173 + m(iShift+1, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+2)
174 - m(iShift+1, jShift+1) * m(iShift+3, jShift+0) * m(iShift+2, jShift+2)
175 - m(iShift+2, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+1)
176 + m(iShift+2, jShift+1) * m(iShift+3, jShift+0) * m(iShift+2, jShift+1);
177 // cofactor (1,1) [5]
178 inv(1,1) = m(iShift+0, jShift+0) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3)
179 - m(iShift+0, jShift+0) * m(iShift+3, jShift+2) * m(iShift+3, jShift+2)
180 - m(iShift+2, jShift+0) * m(iShift+2, jShift+0) * m(iShift+3, jShift+3)
181 + m(iShift+2, jShift+0) * m(iShift+3, jShift+0) * m(iShift+3, jShift+2)
182 + m(iShift+3, jShift+0) * m(iShift+2, jShift+0) * m(iShift+3, jShift+2)
183 - m(iShift+3, jShift+0) * m(iShift+3, jShift+0) * m(iShift+2, jShift+2);
184 // cofactor (2,1) [6]
185 inv(2,1) = -m(iShift+0, jShift+0) * m(iShift+2, jShift+1) * m(iShift+3, jShift+3)
186 + m(iShift+0, jShift+0) * m(iShift+3, jShift+1) * m(iShift+3, jShift+2)
187 + m(iShift+1, jShift+0) * m(iShift+2, jShift+0) * m(iShift+3, jShift+3)
188 - m(iShift+1, jShift+0) * m(iShift+3, jShift+0) * m(iShift+3, jShift+2)
189 - m(iShift+3, jShift+0) * m(iShift+2, jShift+0) * m(iShift+3, jShift+1)
190 + m(iShift+3, jShift+0) * m(iShift+3, jShift+0) * m(iShift+2, jShift+1);
191 // cofactor (3,1) [7]
192 inv(3,1) = m(iShift+0, jShift+0) * m(iShift+2, jShift+1) * m(iShift+3, jShift+2)
193 - m(iShift+0, jShift+0) * m(iShift+3, jShift+1) * m(iShift+2, jShift+2)
194 - m(iShift+1, jShift+0) * m(iShift+2, jShift+0) * m(iShift+3, jShift+2)
195 + m(iShift+1, jShift+0) * m(iShift+3, jShift+0) * m(iShift+2, jShift+2)
196 + m(iShift+2, jShift+0) * m(iShift+2, jShift+0) * m(iShift+3, jShift+1)
197 - m(iShift+2, jShift+0) * m(iShift+3, jShift+0) * m(iShift+2, jShift+1);
198 // cofactor (2,2) [10]
199 inv(2,2) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+3, jShift+3)
200 - m(iShift+0, jShift+0) * m(iShift+3, jShift+1) * m(iShift+3, jShift+1)
201 - m(iShift+1, jShift+0) * m(iShift+1, jShift+0) * m(iShift+3, jShift+3)
202 + m(iShift+1, jShift+0) * m(iShift+3, jShift+0) * m(iShift+3, jShift+1)
203 + m(iShift+3, jShift+0) * m(iShift+1, jShift+0) * m(iShift+3, jShift+1)
204 - m(iShift+3, jShift+0) * m(iShift+3, jShift+0) * m(iShift+1, jShift+1);
205 // cofactor (3,2) [11]
206 inv(3,2) = -m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+3, jShift+2)
207 + m(iShift+0, jShift+0) * m(iShift+3, jShift+1) * m(iShift+2, jShift+1)
208 + m(iShift+1, jShift+0) * m(iShift+1, jShift+0) * m(iShift+3, jShift+2)
209 - m(iShift+1, jShift+0) * m(iShift+3, jShift+0) * m(iShift+2, jShift+1)
210 - m(iShift+2, jShift+0) * m(iShift+1, jShift+0) * m(iShift+3, jShift+1)
211 + m(iShift+2, jShift+0) * m(iShift+3, jShift+0) * m(iShift+1, jShift+1);
212 // cofactor (3,3) [15]
213 inv(3,3) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+2, jShift+2)
214 - m(iShift+0, jShift+0) * m(iShift+2, jShift+1) * m(iShift+2, jShift+1)
215 - m(iShift+1, jShift+0) * m(iShift+1, jShift+0) * m(iShift+2, jShift+2)
216 + m(iShift+1, jShift+0) * m(iShift+2, jShift+0) * m(iShift+2, jShift+1)
217 + m(iShift+2, jShift+0) * m(iShift+1, jShift+0) * m(iShift+2, jShift+1)
218 - m(iShift+2, jShift+0) * m(iShift+2, jShift+0) * m(iShift+1, jShift+1);
219 // symmetric
220 inv(0,1) = inv(1,0); inv(0,2) = inv(2,0); inv(0,3) = inv(3,0);
221 inv(1,2) = inv(2,1); inv(1,3) = inv(3,1);
222 inv(2,3) = inv(3,2);
223 // compute determinant
224 Type det = m(iShift+0, jShift+0) * inv(0,0)
225 + m(iShift+1, jShift+0) * inv(1,0)
226 + m(iShift+2, jShift+0) * inv(2,0)
227 + m(iShift+3, jShift+0) * inv(3,0);
228 if (det == Type(0)) return Type(0);
229 // inverse matrix
230 inv /= det;
231 return det;
232 }

Referenced by STK::hidden::InvertLowerSymMatrixDispatcher< Matrix, 4 >::run(), and STK::hidden::InvertLowerSymMatrixDispatcher< Matrix, Size_ >::run().

◆ invertLowerSymMatrixXX()

template<class Matrix , int Size_>
static Type STK::hidden::InvertLowerSymMatrixImpl< Matrix, Size_ >::invertLowerSymMatrixXX ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the lower symmetric 4x4 matrix m using only its lower part and store the result in inv.

Note
if the matrix is not invertible, the result will be a generalized inverse.
Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 241 of file STK_InvertLowerSym.h.

242 {
243#ifdef STKUSELAPACK
244 lapack::SymEigen<Matrix> decomp(m);
245 decomp.setUplo('L'); // default is U
246#else
247 SymEigen< LowerSymmetrizeOperator<Matrix> > decomp(m.lowerSymmetrize());
248#endif
249 if (!decomp.run()) return Type(0);
250 decomp.ginv(inv);
251 return decomp.det();
252 }

References STK::ISymEigen< Derived >::det(), STK::ISymEigen< Derived >::ginv(), STK::ISymEigen< Derived >::run(), and STK::lapack::SymEigen< SquareArray >::setUplo().

Referenced by STK::hidden::InvertLowerSymMatrixDispatcher< Matrix, Size_ >::run().

◆ invertLowerTriangular11()

template<class Matrix , int Size_>
static Type STK::hidden::InvertLowerTriangularImpl< Matrix, Size_ >::invertLowerTriangular11 ( Matrix const m,
Array2DLowerTriangular< Type > &  inv 
)
inlinestatic

compute the inverse of the 1x1 matrix and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
true if m is invertible, false otherwise

Definition at line 55 of file STK_InvertLowerTriangular.h.

56 {
57 const int iShift = m.beginRows(), jShift = m.beginCols();
58 inv.resize(TRange<Size_>(0, 1), TRange<Size_>(0, 1));
59 // cofactor (0,0) [0]
60 inv(0, 0) = Type(1);
61 // compute determinant
62 Type det = m(iShift+0, jShift+0);
63 if (det == Type(0)) return Type(0);
64 // compute inverse matrix
65 inv /= det;
66 return det;
67 }

Referenced by STK::hidden::InvertLowerTriangularDispatcher< Matrix, Size_ >::run(), and STK::hidden::InvertLowerTriangularDispatcher< Matrix, 1 >::run().

◆ invertLowerTriangular22()

template<class Matrix , int Size_>
static Type STK::hidden::InvertLowerTriangularImpl< Matrix, Size_ >::invertLowerTriangular22 ( Matrix const m,
Array2DLowerTriangular< Type > &  inv 
)
inlinestatic

compute the inverse of the 2x2 matrix m and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
true if m is invertible, false otherwise

Definition at line 73 of file STK_InvertLowerTriangular.h.

74 {
75 const int iShift = m.beginRows(), jShift = m.beginCols();
76 inv.resize(TRange<Size_>(0, 2), TRange<Size_>(0, 2));
77 // cofactor (0,0) [0]
78 inv(0, 0) = m(iShift+1, jShift+1);
79 // cofactor (1,0) [1]
80 inv(1, 0) = - m(iShift+1, jShift+0);
81 // cofactor (1,1) [3]
82 inv(1, 1) = m(iShift+0, jShift+0);
83 // compute determinant
84 Type det = m(iShift+0, jShift+0) * m(iShift+1, jShift+1);
85 if (det == Type(0)) return Type(0);
86 // compute inverse matrix
87 inv /= det;
88 return det;
89 }

Referenced by STK::hidden::InvertLowerTriangularDispatcher< Matrix, Size_ >::run(), and STK::hidden::InvertLowerTriangularDispatcher< Matrix, 2 >::run().

◆ invertLowerTriangular33()

template<class Matrix , int Size_>
static Type STK::hidden::InvertLowerTriangularImpl< Matrix, Size_ >::invertLowerTriangular33 ( Matrix const m,
Array2DLowerTriangular< Type > &  inv 
)
inlinestatic

compute the inverse of the 3x3 matrix m and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
true if m is invertible, false otherwise

Definition at line 95 of file STK_InvertLowerTriangular.h.

96 {
97 const int iShift = m.beginRows(), jShift = m.beginCols();
98 inv.resize(TRange<Size_>(0, 3), TRange<Size_>(0, 3));
99 // cofactor
100 inv(0,0) = m(iShift+1, jShift+1) * m(iShift+2, jShift+2);
101 inv(1,0) = -m(iShift+1, jShift+0) * m(iShift+2, jShift+2);
102 inv(1,1) = m(iShift+0, jShift+0) * m(iShift+2, jShift+2);
103 inv(2,0) = m(iShift+1, jShift+0) * m(iShift+2, jShift+1)
104 -m(iShift+2, jShift+0) * m(iShift+1, jShift+1);
105 inv(2,1) = -m(iShift+0, jShift+0) * m(iShift+2, jShift+1);
106 inv(2,2) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1);
107 // computes determinant
108 Type det = m(iShift+0, jShift+0) * inv(0,0) ;
109 if (det == Type(0)) return Type(0);
110 // compute inverse matrix
111 inv /= det;
112 return det;
113 }

Referenced by STK::hidden::InvertLowerTriangularDispatcher< Matrix, Size_ >::run(), and STK::hidden::InvertLowerTriangularDispatcher< Matrix, 3 >::run().

◆ invertLowerTriangular44()

template<class Matrix , int Size_>
static Type STK::hidden::InvertLowerTriangularImpl< Matrix, Size_ >::invertLowerTriangular44 ( Matrix const m,
Array2DLowerTriangular< Type > &  inv 
)
inlinestatic

compute the inverse of the 4x4 matrix m and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
true if m is invertible, false otherwise

Definition at line 119 of file STK_InvertLowerTriangular.h.

120 {
121 const int iShift = m.beginRows(), jShift = m.beginCols();
122 inv.resize(TRange<Size_>(0, 4), TRange<Size_>(0, 4));
123 // cofactor (0,0) [0]
124 inv(0,0) = m(iShift+1, jShift+1) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3);
125 // cofactor (1,0) [1]
126 inv(1,0) = -m(iShift+1, jShift+0) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3);
127 // cofactor (1,1) [5]
128 inv(1,1) = m(iShift+0, jShift+0) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3);
129 // cofactor (2,0) [2]
130 inv(2,0) = m(iShift+1, jShift+0) * m(iShift+2, jShift+1) * m(iShift+3, jShift+3)
131 - m(iShift+1, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+3);
132 // cofactor (2,1)
133 inv(2,1) = -m(iShift+0, jShift+0) * m(iShift+2, jShift+1) * m(iShift+3, jShift+3);
134 // cofactor (2,2)
135 inv(2,2) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+3, jShift+3);
136 // cofactor (3,0)
137 inv(3,0) = -m(iShift+1, jShift+0) * m(iShift+2, jShift+1) * m(iShift+3, jShift+2)
138 + m(iShift+1, jShift+0) * m(iShift+3, jShift+1) * m(iShift+2, jShift+2)
139 + m(iShift+1, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+2)
140 - m(iShift+1, jShift+1) * m(iShift+3, jShift+0) * m(iShift+2, jShift+2);
141 // cofactor (3,1) [7]
142 inv(3,1) = m(iShift+0, jShift+0) * m(iShift+2, jShift+1) * m(iShift+3, jShift+2)
143 - m(iShift+0, jShift+0) * m(iShift+3, jShift+1) * m(iShift+2, jShift+2);
144 // cofactor (3,2) [11]
145 inv(3,2) = -m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+3, jShift+2);
146 // cofactor (3,3) [15]
147 inv(3,3) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+2, jShift+2);
148 // compute determinant
149 Type det = m(iShift+0, jShift+0) * inv(0,0);
150 if (det == Type(0)) return Type(0);
151 // compute inverse matrix
152 inv /= det;
153 return det;
154 }

Referenced by STK::hidden::InvertLowerTriangularDispatcher< Matrix, Size_ >::run(), and STK::hidden::InvertLowerTriangularDispatcher< Matrix, 4 >::run().

◆ invertLowerTriangularXX()

template<class Matrix , int Size_>
static Type STK::hidden::InvertLowerTriangularImpl< Matrix, Size_ >::invertLowerTriangularXX ( Matrix const m,
Array2DLowerTriangular< Type > &  inv 
)
inlinestatic

compute the inverse of the lower triangular matrix m and store the result in inv.

Note
if the matrix is not invertible, the result will be a generalized inverse.
Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 161 of file STK_InvertLowerTriangular.h.

162 {
163 inv.resize(m.rows(), m.cols());
164 Real det = Type(1);
165 for(int j = m.beginCols(); j < m.endCols(); ++j)
166 {
167 det *= m(j,j);
168 inv(j, j) = m(j, j) ? Type(1)/m(j, j) : Type(0);
169 for(int i = j+1; i < m.endRows(); ++i)
170 {
171 Type sum = Type(0);
172 if (m(i, i))
173 {
174 for (int k = j; k < i; ++k)
175 { sum -= m(i, k) * inv(k, j);}
176 sum /= m(i,i);
177 }
178 inv(i, j) = sum;
179 }
180 }
181 return det;
182 }
Arrays::SumOp< Lhs, Rhs >::result_type sum(Lhs const &lhs, Rhs const &rhs)
convenience function for summing two arrays
double Real
STK fundamental type of Real values.

References STK::sum().

Referenced by STK::hidden::InvertLowerTriangularDispatcher< Matrix, Size_ >::run().

◆ invertMatrix11()

template<class Matrix , int Size_>
static Type STK::hidden::InvertMatrixImpl< Matrix, Size_ >::invertMatrix11 ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the 1x1 matrix and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
true if m is invertible, false otherwise

Definition at line 61 of file STK_Invert.h.

62 {
63 const int iShift = m.beginRows(), jShift = m.beginCols();
64 inv.resize(TRange<Size_>(0, 1));
65 // cofactor (0, jShift+0) [0]
66 inv(0, 0) = Type(1);
67 // compute determinant
68 Type det = m(iShift+0, jShift+0);
69 if (det == Type(0)) return Type(0);
70 // compute inverse matrix
71 inv /= det;
72 return det;
73 }

Referenced by STK::hidden::InvertMatrixDispatcher< Matrix, 1 >::run(), and STK::hidden::InvertMatrixDispatcher< Matrix, Size_ >::run().

◆ invertMatrix22()

template<class Matrix , int Size_>
static Type STK::hidden::InvertMatrixImpl< Matrix, Size_ >::invertMatrix22 ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the 2x2 matrix m and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
true if m is invertible, false otherwise

Definition at line 79 of file STK_Invert.h.

80 {
81 const int iShift = m.beginRows(), jShift = m.beginCols();
82 inv.resize(TRange<Size_>(0, 2));
83 // cofactor (0, jShift+0) [0]
84 inv(0, 0) = m(iShift+1, jShift+1);
85 // cofactor (1, jShift+0) [1]
86 inv(1, 0) = - m(iShift+1, jShift+0);
87 // cofactor (1, jShift+1) [2]
88 inv(0, 1) = - m(iShift+0, jShift+1);
89 // cofactor (1, jShift+1) [3]
90 inv(1, 1) = m(iShift+0, jShift+0);
91
92 // determinant
93 Type det = m(iShift+0, jShift+0) * inv(0, 0)
94 + m(iShift+0, jShift+1) * inv(1, 0);
95 if (det == Type(0)) return Type(0);
96 // compute inverse matrix
97 inv /= det;
98 return det;
99 }

Referenced by STK::hidden::InvertMatrixDispatcher< Matrix, 2 >::run(), and STK::hidden::InvertMatrixDispatcher< Matrix, Size_ >::run().

◆ invertMatrix33()

template<class Matrix , int Size_>
static Type STK::hidden::InvertMatrixImpl< Matrix, Size_ >::invertMatrix33 ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the 3x3 matrix m and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
true if m is invertible, false otherwise

Definition at line 105 of file STK_Invert.h.

106 {
107 const int iShift = m.beginRows(), jShift = m.beginCols();
108 inv.resize(TRange<Size_>(0, 3));
109 // cofactor
110 inv(0, 0) = m(iShift+1, jShift+1) * m(iShift+2, jShift+2)
111 - m(iShift+2, jShift+1) * m(iShift+1, jShift+2);
112 inv(0, 1) = m(iShift+0, jShift+2) * m(iShift+2, jShift+1)
113 - m(iShift+0, jShift+1) * m(iShift+2, jShift+2);
114 inv(0, 2) = m(iShift+0, jShift+1) * m(iShift+1, jShift+2)
115 - m(iShift+0, jShift+2) * m(iShift+1, jShift+1);
116 inv(1, 0) = m(iShift+1, jShift+2) * m(iShift+2, jShift+0)
117 - m(iShift+1, jShift+0) * m(iShift+2, jShift+2);
118 inv(1, 1) = m(iShift+0, jShift+0) * m(iShift+2, jShift+2)
119 - m(iShift+0, jShift+2) * m(iShift+2, jShift+0);
120 inv(1, 2) = m(iShift+1, jShift+0) * m(iShift+0, jShift+2)
121 - m(iShift+0, jShift+0) * m(iShift+1, jShift+2);
122 inv(2, 0) = m(iShift+1, jShift+0) * m(iShift+2, jShift+1)
123 - m(iShift+2, jShift+0) * m(iShift+1, jShift+1);
124 inv(2, 1) = m(iShift+2, jShift+0) * m(iShift+0, jShift+1)
125 - m(iShift+0, jShift+0) * m(iShift+2, jShift+1);
126 inv(2, 2) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1)
127 - m(iShift+1, jShift+0) * m(iShift+0, jShift+1);
128
129 // computes the inverse of a matrix m
130 Type det = m(iShift+0, jShift+0) * inv(0, 0)
131 + m(iShift+0, jShift+1) * inv(1, 0)
132 + m(iShift+0, jShift+2) * inv(2, 0);
133 if (det == Type(0)) return Type(0);
134 // compute inverse matrix
135 inv /= det;
136 return det;
137 }

Referenced by STK::hidden::InvertMatrixDispatcher< Matrix, 3 >::run(), and STK::hidden::InvertMatrixDispatcher< Matrix, Size_ >::run().

◆ invertMatrix44()

template<class Matrix , int Size_>
static Type STK::hidden::InvertMatrixImpl< Matrix, Size_ >::invertMatrix44 ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the 4x4 matrix m and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
true if m is invertible, false otherwise

Definition at line 143 of file STK_Invert.h.

144 {
145 const int iShift = m.beginRows(), jShift = m.beginCols();
146 inv.resize(TRange<Size_>(0, 4));
147 // cofactor (0, 0) [0]
148 inv(0, 0) = m(iShift+1, jShift+1) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3)
149 - m(iShift+1, jShift+1) * m(iShift+3, jShift+2) * m(iShift+2, jShift+3)
150 - m(iShift+1, jShift+2) * m(iShift+2, jShift+1) * m(iShift+3, jShift+3)
151 + m(iShift+1, jShift+2) * m(iShift+3, jShift+1) * m(iShift+2, jShift+3)
152 + m(iShift+1, jShift+3) * m(iShift+2, jShift+1) * m(iShift+3, jShift+2)
153 - m(iShift+1, jShift+3) * m(iShift+3, jShift+1) * m(iShift+2, jShift+2);
154 // cofactor (0, 1) [4]
155 inv(0, 1) = -m(iShift+0, jShift+1) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3)
156 + m(iShift+0, jShift+1) * m(iShift+3, jShift+2) * m(iShift+2, jShift+3)
157 + m(iShift+0, jShift+2) * m(iShift+2, jShift+1) * m(iShift+3, jShift+3)
158 - m(iShift+0, jShift+2) * m(iShift+3, jShift+1) * m(iShift+2, jShift+3)
159 - m(iShift+0, jShift+3) * m(iShift+2, jShift+1) * m(iShift+3, jShift+2)
160 + m(iShift+0, jShift+3) * m(iShift+3, jShift+1) * m(iShift+2, jShift+2);
161 // cofactor (0, 2) [8]
162 inv(0, 2) = m(iShift+0, jShift+1) * m(iShift+1, jShift+2) * m(iShift+3, jShift+3)
163 - m(iShift+0, jShift+1) * m(iShift+3, jShift+2) * m(iShift+1, jShift+3)
164 - m(iShift+0, jShift+2) * m(iShift+1, jShift+1) * m(iShift+3, jShift+3)
165 + m(iShift+0, jShift+2) * m(iShift+3, jShift+1) * m(iShift+1, jShift+3)
166 + m(iShift+0, jShift+3) * m(iShift+1, jShift+1) * m(iShift+3, jShift+2)
167 - m(iShift+0, jShift+3) * m(iShift+3, jShift+1) * m(iShift+1, jShift+2);
168 // cofactor (0, 3) [12]
169 inv(0, 3) = -m(iShift+0, jShift+1) * m(iShift+1, jShift+2) * m(iShift+2, jShift+3)
170 + m(iShift+0, jShift+1) * m(iShift+2, jShift+2) * m(iShift+1, jShift+3)
171 + m(iShift+0, jShift+2) * m(iShift+1, jShift+1) * m(iShift+2, jShift+3)
172 - m(iShift+0, jShift+2) * m(iShift+2, jShift+1) * m(iShift+1, jShift+3)
173 - m(iShift+0, jShift+3) * m(iShift+1, jShift+1) * m(iShift+2, jShift+2)
174 + m(iShift+0, jShift+3) * m(iShift+2, jShift+1) * m(iShift+1, jShift+2);
175 // cofactor (1, 0) [1]
176 inv(1, 0) = -m(iShift+1, jShift+0) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3)
177 + m(iShift+1, jShift+0) * m(iShift+3, jShift+2) * m(iShift+2, jShift+3)
178 + m(iShift+1, jShift+2) * m(iShift+2, jShift+0) * m(iShift+3, jShift+3)
179 - m(iShift+1, jShift+2) * m(iShift+3, jShift+0) * m(iShift+2, jShift+3)
180 - m(iShift+1, jShift+3) * m(iShift+2, jShift+0) * m(iShift+3, jShift+2)
181 + m(iShift+1, jShift+3) * m(iShift+3, jShift+0) * m(iShift+2, jShift+2);
182 // cofactor (1, 1) [5]
183 inv(1, 1) = m(iShift+0, jShift+0) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3)
184 - m(iShift+0, jShift+0) * m(iShift+3, jShift+2) * m(iShift+2, jShift+3)
185 - m(iShift+0, jShift+2) * m(iShift+2, jShift+0) * m(iShift+3, jShift+3)
186 + m(iShift+0, jShift+2) * m(iShift+3, jShift+0) * m(iShift+2, jShift+3)
187 + m(iShift+0, jShift+3) * m(iShift+2, jShift+0) * m(iShift+3, jShift+2)
188 - m(iShift+0, jShift+3) * m(iShift+3, jShift+0) * m(iShift+2, jShift+2);
189 // cofactor (1, 2) [9]
190 inv(1, 2) = -m(iShift+0, jShift+0) * m(iShift+1, jShift+2) * m(iShift+3, jShift+3)
191 + m(iShift+0, jShift+0) * m(iShift+3, jShift+2) * m(iShift+1, jShift+3)
192 + m(iShift+0, jShift+2) * m(iShift+1, jShift+0) * m(iShift+3, jShift+3)
193 - m(iShift+0, jShift+2) * m(iShift+3, jShift+0) * m(iShift+1, jShift+3)
194 - m(iShift+0, jShift+3) * m(iShift+1, jShift+0) * m(iShift+3, jShift+2)
195 + m(iShift+0, jShift+3) * m(iShift+3, jShift+0) * m(iShift+1, jShift+2);
196 // cofactor (1, 3) [13]
197 inv(1, 3) = m(iShift+0, jShift+0) * m(iShift+1, jShift+2) * m(iShift+2, jShift+3)
198 - m(iShift+0, jShift+0) * m(iShift+2, jShift+2) * m(iShift+1, jShift+3)
199 - m(iShift+0, jShift+2) * m(iShift+1, jShift+0) * m(iShift+2, jShift+3)
200 + m(iShift+0, jShift+2) * m(iShift+2, jShift+0) * m(iShift+1, jShift+3)
201 + m(iShift+0, jShift+3) * m(iShift+1, jShift+0) * m(iShift+2, jShift+2)
202 - m(iShift+0, jShift+3) * m(iShift+2, jShift+0) * m(iShift+1, jShift+2);
203 // cofactor (2, 0) [2]
204 inv(2, 0) = m(iShift+1, jShift+0) * m(iShift+2, jShift+1) * m(iShift+3, jShift+3)
205 - m(iShift+1, jShift+0) * m(iShift+3, jShift+1) * m(iShift+2, jShift+3)
206 - m(iShift+1, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+3)
207 + m(iShift+1, jShift+1) * m(iShift+3, jShift+0) * m(iShift+2, jShift+3)
208 + m(iShift+1, jShift+3) * m(iShift+2, jShift+0) * m(iShift+3, jShift+1)
209 - m(iShift+1, jShift+3) * m(iShift+3, jShift+0) * m(iShift+2, jShift+1);
210 // cofactor (2, 1)
211 inv(2, 1) = -m(iShift+0, jShift+0) * m(iShift+2, jShift+1) * m(iShift+3, jShift+3)
212 + m(iShift+0, jShift+0) * m(iShift+3, jShift+1) * m(iShift+2, jShift+3)
213 + m(iShift+0, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+3)
214 - m(iShift+0, jShift+1) * m(iShift+3, jShift+0) * m(iShift+2, jShift+3)
215 - m(iShift+0, jShift+3) * m(iShift+2, jShift+0) * m(iShift+3, jShift+1)
216 + m(iShift+0, jShift+3) * m(iShift+3, jShift+0) * m(iShift+2, jShift+1);
217 // cofactor (2, 2)
218 inv(2, 2) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+3, jShift+3)
219 - m(iShift+0, jShift+0) * m(iShift+3, jShift+1) * m(iShift+1, jShift+3)
220 - m(iShift+0, jShift+1) * m(iShift+1, jShift+0) * m(iShift+3, jShift+3)
221 + m(iShift+0, jShift+1) * m(iShift+3, jShift+0) * m(iShift+1, jShift+3)
222 + m(iShift+0, jShift+3) * m(iShift+1, jShift+0) * m(iShift+3, jShift+1)
223 - m(iShift+0, jShift+3) * m(iShift+3, jShift+0) * m(iShift+1, jShift+1);
224 // cofactor (2, 3)
225 inv(2, 3) = -m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+2, jShift+3)
226 + m(iShift+0, jShift+0) * m(iShift+2, jShift+1) * m(iShift+1, jShift+3)
227 + m(iShift+0, jShift+1) * m(iShift+1, jShift+0) * m(iShift+2, jShift+3)
228 - m(iShift+0, jShift+1) * m(iShift+2, jShift+0) * m(iShift+1, jShift+3)
229 - m(iShift+0, jShift+3) * m(iShift+1, jShift+0) * m(iShift+2, jShift+1)
230 + m(iShift+0, jShift+3) * m(iShift+2, jShift+0) * m(iShift+1, jShift+1);
231 // cofactor (3, 0)
232 inv(3, 0) = -m(iShift+1, jShift+0) * m(iShift+2, jShift+1) * m(iShift+3, jShift+2)
233 + m(iShift+1, jShift+0) * m(iShift+3, jShift+1) * m(iShift+2, jShift+2)
234 + m(iShift+1, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+2)
235 - m(iShift+1, jShift+1) * m(iShift+3, jShift+0) * m(iShift+2, jShift+2)
236 - m(iShift+1, jShift+2) * m(iShift+2, jShift+0) * m(iShift+3, jShift+1)
237 + m(iShift+1, jShift+2) * m(iShift+3, jShift+0) * m(iShift+2, jShift+1);
238 // cofactor (3, 1) [7]
239 inv(3, 1) = m(iShift+0, jShift+0) * m(iShift+2, jShift+1) * m(iShift+3, jShift+2)
240 - m(iShift+0, jShift+0) * m(iShift+3, jShift+1) * m(iShift+2, jShift+2)
241 - m(iShift+0, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+2)
242 + m(iShift+0, jShift+1) * m(iShift+3, jShift+0) * m(iShift+2, jShift+2)
243 + m(iShift+0, jShift+2) * m(iShift+2, jShift+0) * m(iShift+3, jShift+1)
244 - m(iShift+0, jShift+2) * m(iShift+3, jShift+0) * m(iShift+2, jShift+1);
245 // cofactor (3, 2) [11]
246 inv(3, 2) = -m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+3, jShift+2)
247 + m(iShift+0, jShift+0) * m(iShift+3, jShift+1) * m(iShift+1, jShift+2)
248 + m(iShift+0, jShift+1) * m(iShift+1, jShift+0) * m(iShift+3, jShift+2)
249 - m(iShift+0, jShift+1) * m(iShift+3, jShift+0) * m(iShift+1, jShift+2)
250 - m(iShift+0, jShift+2) * m(iShift+1, jShift+0) * m(iShift+3, jShift+1)
251 + m(iShift+0, jShift+2) * m(iShift+3, jShift+0) * m(iShift+1, jShift+1);
252 // cofactor (3, 3) [15]
253 inv(3, 3) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+2, jShift+2)
254 - m(iShift+0, jShift+0) * m(iShift+2, jShift+1) * m(iShift+1, jShift+2)
255 - m(iShift+0, jShift+1) * m(iShift+1, jShift+0) * m(iShift+2, jShift+2)
256 + m(iShift+0, jShift+1) * m(iShift+2, jShift+0) * m(iShift+1, jShift+2)
257 + m(iShift+0, jShift+2) * m(iShift+1, jShift+0) * m(iShift+2, jShift+1)
258 - m(iShift+0, jShift+2) * m(iShift+2, jShift+0) * m(iShift+1, jShift+1);
259 // compute determinant and inverse matrix
260 Type det = m(iShift+0, jShift+0) * inv(0, 0)
261 + m(iShift+1, jShift+0) * inv(0, 1)
262 + m(iShift+2, jShift+0) * inv(0, 2)
263 + m(iShift+3, jShift+0) * inv(0, 3);
264 if (det == Type(0)) return Type(0);
265 // compute inverse matrix
266 inv /= det;
267 return det;
268 }

Referenced by STK::hidden::InvertMatrixDispatcher< Matrix, 4 >::run(), and STK::hidden::InvertMatrixDispatcher< Matrix, Size_ >::run().

◆ invertMatrixXX()

template<class Matrix , int Size_>
static Type STK::hidden::InvertMatrixImpl< Matrix, Size_ >::invertMatrixXX ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the matrix m and store the result in inv.

Note
if the matrix is not invertible, the result will be a generalized inverse.
Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 276 of file STK_Invert.h.

277 {
278 inv.resize(TRange<Size_>(0, m.sizeRows()));
279#ifdef STKUSELAPACK
280 lapack::Svd decomp(m);
281#else
282 Svd<Matrix> decomp(m);
283#endif
284 if (!decomp.run()) return Type(0);
285 // compute (generalized) inverse matrix
286 decomp.ginv(inv);
287 return decomp.det();
288 }

References STK::ISvd< Derived >::det(), STK::ISvd< Derived >::ginv(), and STK::ISvd< Derived >::run().

Referenced by STK::hidden::InvertMatrixDispatcher< Matrix, Size_ >::run().

◆ invertSymMatrix11()

template<class Matrix , int Size_>
static Type STK::hidden::InvertSymImpl< Matrix, Size_ >::invertSymMatrix11 ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the symmetric matrix m of size 1x1 and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 62 of file STK_InvertSym.h.

63 {
64 const int iShift = m.beginRows(), jShift = m.beginCols();
65 inv.resize(TRange<Size_>(0, 1));
66 // cofactor (0,0) [0]
67 inv(0, 0) = Type(1);
68 // compute determinant
69 Type det = m(iShift+0, jShift+0);
70 if (det == Type(0)) return Type(0);
71 // compute inverse matrix
72 inv /= det;
73 return det;
74 }

Referenced by STK::hidden::InvertSymMatrixDispatcher< Matrix, 1 >::run(), and STK::hidden::InvertSymMatrixDispatcher< Matrix, Size_ >::run().

◆ invertSymMatrix22()

template<class Matrix , int Size_>
static Type STK::hidden::InvertSymImpl< Matrix, Size_ >::invertSymMatrix22 ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the symmetric 2x2 matrix m using only its lower part and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 82 of file STK_InvertSym.h.

83 {
84 const int iShift = m.beginRows(), jShift = m.beginCols();
85 inv.resize(TRange<Size_>(0, 2));
86 // cofactor (0,0) [0]
87 inv(0, 0) = m(iShift+1, jShift+1);
88 // cofactor (1,0) [1]
89 inv(1, 0) = - m(iShift+1, jShift+0);
90 // cofactor (1,1) [3]
91 inv(1, 1) = m(iShift+0, jShift+0);
92 // symmetry
93 inv(0, 1) = inv(1,0);
94 // compute determinant
95 Type det = m(iShift+0, jShift+0) * inv(0,0)
96 + m(iShift+1, jShift+0) * inv(1,0);
97 if (det == Type(0)) return Type(0);
98 // inverse matrix
99 inv /= det;
100 return det;
101 }

Referenced by STK::hidden::InvertSymMatrixDispatcher< Matrix, 2 >::run(), and STK::hidden::InvertSymMatrixDispatcher< Matrix, Size_ >::run().

◆ invertSymMatrix33()

template<class Matrix , int Size_>
static Type STK::hidden::InvertSymImpl< Matrix, Size_ >::invertSymMatrix33 ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the symmetric 3x3 matrix m using only its lower part and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 108 of file STK_InvertSym.h.

109 {
110 const int iShift = m.beginRows(), jShift = m.beginCols();
111 inv.resize(TRange<Size_>(0, 3));
112 // cofactor (0,0) [0]
113 inv(0, 0) = m(iShift+1, jShift+1) * m(iShift+2, jShift+2)
114 - m(iShift+2, jShift+1) * m(iShift+2, jShift+1);
115 // cofactor (1,0) [1]
116 inv(1, 0) = m(iShift+1, jShift+2) * m(iShift+2, jShift+0)
117 - m(iShift+1, jShift+0) * m(iShift+2, jShift+2);
118 inv(2, 0) = m(iShift+1, jShift+0) * m(iShift+2, jShift+1)
119 - m(iShift+2, jShift+0) * m(iShift+1, jShift+1);
120 inv(1, 1) = m(iShift+0, jShift+0) * m(iShift+2, jShift+2)
121 - m(iShift+0, jShift+2) * m(iShift+2, jShift+0);
122 inv(2, 1) = m(iShift+2, jShift+0) * m(iShift+1, jShift+0)
123 - m(iShift+0, jShift+0) * m(iShift+2, jShift+1);
124 inv(2, 2) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1)
125 - m(iShift+1, jShift+0) * m(iShift+0, jShift+1);
126 // symmetric
127 inv(0,1) = inv(1,0); inv(0,2) = inv(2,0);
128 inv(1,2) = inv(2,1);
129 // compute determinant
130 Type det = m(iShift+0, jShift+0) * inv(0,0)
131 + m(iShift+1, jShift+0) * inv(1,0)
132 + m(iShift+2, jShift+0) * inv(2,0);
133 if (det == Type(0)) return Type(0);
134 // inverse matrix
135 inv /= det;
136 return det;
137 }

Referenced by STK::hidden::InvertSymMatrixDispatcher< Matrix, 3 >::run(), and STK::hidden::InvertSymMatrixDispatcher< Matrix, Size_ >::run().

◆ invertSymMatrix44()

template<class Matrix , int Size_>
static Type STK::hidden::InvertSymImpl< Matrix, Size_ >::invertSymMatrix44 ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the symmetric 4x4 matrix m using only its lower part and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 144 of file STK_InvertSym.h.

145 {
146 const int iShift = m.beginRows(), jShift = m.beginCols();
147 inv.resize(TRange<Size_>(0, 4));
148 // cofactor (0,0) [0]
149 inv(0,0) = m(iShift+1, jShift+1) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3)
150 - m(iShift+1, jShift+1) * m(iShift+3, jShift+2) * m(iShift+3, jShift+2)
151 - m(iShift+2, jShift+1) * m(iShift+2, jShift+1) * m(iShift+3, jShift+3)
152 + m(iShift+2, jShift+1) * m(iShift+3, jShift+1) * m(iShift+3, jShift+2)
153 + m(iShift+3, jShift+1) * m(iShift+2, jShift+1) * m(iShift+3, jShift+2)
154 - m(iShift+3, jShift+1) * m(iShift+3, jShift+1) * m(iShift+2, jShift+2);
155 // cofactor (1,0) [1]
156 inv(1,0) = -m(iShift+1, jShift+0) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3)
157 + m(iShift+1, jShift+0) * m(iShift+3, jShift+2) * m(iShift+3, jShift+2)
158 + m(iShift+2, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+3)
159 - m(iShift+2, jShift+1) * m(iShift+3, jShift+0) * m(iShift+3, jShift+2)
160 - m(iShift+3, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+2)
161 + m(iShift+3, jShift+1) * m(iShift+3, jShift+0) * m(iShift+2, jShift+2);
162 // cofactor (2,0) [2]
163 inv(2,0) = m(iShift+1, jShift+0) * m(iShift+2, jShift+1) * m(iShift+3, jShift+3)
164 - m(iShift+1, jShift+0) * m(iShift+3, jShift+1) * m(iShift+3, jShift+2)
165 - m(iShift+1, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+3)
166 + m(iShift+1, jShift+1) * m(iShift+3, jShift+0) * m(iShift+3, jShift+2)
167 + m(iShift+3, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+1)
168 - m(iShift+3, jShift+1) * m(iShift+3, jShift+0) * m(iShift+2, jShift+1);
169 // cofactor (3,0) [3]
170 inv(3,0) = -m(iShift+1, jShift+0) * m(iShift+2, jShift+1) * m(iShift+3, jShift+2)
171 + m(iShift+1, jShift+0) * m(iShift+3, jShift+1) * m(iShift+2, jShift+2)
172 + m(iShift+1, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+2)
173 - m(iShift+1, jShift+1) * m(iShift+3, jShift+0) * m(iShift+2, jShift+2)
174 - m(iShift+2, jShift+1) * m(iShift+2, jShift+0) * m(iShift+3, jShift+1)
175 + m(iShift+2, jShift+1) * m(iShift+3, jShift+0) * m(iShift+2, jShift+1);
176 // cofactor (1,1) [5]
177 inv(1,1) = m(iShift+0, jShift+0) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3)
178 - m(iShift+0, jShift+0) * m(iShift+3, jShift+2) * m(iShift+3, jShift+2)
179 - m(iShift+2, jShift+0) * m(iShift+2, jShift+0) * m(iShift+3, jShift+3)
180 + m(iShift+2, jShift+0) * m(iShift+3, jShift+0) * m(iShift+3, jShift+2)
181 + m(iShift+3, jShift+0) * m(iShift+2, jShift+0) * m(iShift+3, jShift+2)
182 - m(iShift+3, jShift+0) * m(iShift+3, jShift+0) * m(iShift+2, jShift+2);
183 // cofactor (2,1) [6]
184 inv(2,1) = -m(iShift+0, jShift+0) * m(iShift+2, jShift+1) * m(iShift+3, jShift+3)
185 + m(iShift+0, jShift+0) * m(iShift+3, jShift+1) * m(iShift+3, jShift+2)
186 + m(iShift+1, jShift+0) * m(iShift+2, jShift+0) * m(iShift+3, jShift+3)
187 - m(iShift+1, jShift+0) * m(iShift+3, jShift+0) * m(iShift+3, jShift+2)
188 - m(iShift+3, jShift+0) * m(iShift+2, jShift+0) * m(iShift+3, jShift+1)
189 + m(iShift+3, jShift+0) * m(iShift+3, jShift+0) * m(iShift+2, jShift+1);
190 // cofactor (3,1) [7]
191 inv(3,1) = m(iShift+0, jShift+0) * m(iShift+2, jShift+1) * m(iShift+3, jShift+2)
192 - m(iShift+0, jShift+0) * m(iShift+3, jShift+1) * m(iShift+2, jShift+2)
193 - m(iShift+1, jShift+0) * m(iShift+2, jShift+0) * m(iShift+3, jShift+2)
194 + m(iShift+1, jShift+0) * m(iShift+3, jShift+0) * m(iShift+2, jShift+2)
195 + m(iShift+2, jShift+0) * m(iShift+2, jShift+0) * m(iShift+3, jShift+1)
196 - m(iShift+2, jShift+0) * m(iShift+3, jShift+0) * m(iShift+2, jShift+1);
197 // cofactor (2,2) [10]
198 inv(2,2) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+3, jShift+3)
199 - m(iShift+0, jShift+0) * m(iShift+3, jShift+1) * m(iShift+3, jShift+1)
200 - m(iShift+1, jShift+0) * m(iShift+1, jShift+0) * m(iShift+3, jShift+3)
201 + m(iShift+1, jShift+0) * m(iShift+3, jShift+0) * m(iShift+3, jShift+1)
202 + m(iShift+3, jShift+0) * m(iShift+1, jShift+0) * m(iShift+3, jShift+1)
203 - m(iShift+3, jShift+0) * m(iShift+3, jShift+0) * m(iShift+1, jShift+1);
204 // cofactor (3,2) [11]
205 inv(3,2) = -m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+3, jShift+2)
206 + m(iShift+0, jShift+0) * m(iShift+3, jShift+1) * m(iShift+2, jShift+1)
207 + m(iShift+1, jShift+0) * m(iShift+1, jShift+0) * m(iShift+3, jShift+2)
208 - m(iShift+1, jShift+0) * m(iShift+3, jShift+0) * m(iShift+2, jShift+1)
209 - m(iShift+2, jShift+0) * m(iShift+1, jShift+0) * m(iShift+3, jShift+1)
210 + m(iShift+2, jShift+0) * m(iShift+3, jShift+0) * m(iShift+1, jShift+1);
211 // cofactor (3,3) [15]
212 inv(3,3) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+2, jShift+2)
213 - m(iShift+0, jShift+0) * m(iShift+2, jShift+1) * m(iShift+2, jShift+1)
214 - m(iShift+1, jShift+0) * m(iShift+1, jShift+0) * m(iShift+2, jShift+2)
215 + m(iShift+1, jShift+0) * m(iShift+2, jShift+0) * m(iShift+2, jShift+1)
216 + m(iShift+2, jShift+0) * m(iShift+1, jShift+0) * m(iShift+2, jShift+1)
217 - m(iShift+2, jShift+0) * m(iShift+2, jShift+0) * m(iShift+1, jShift+1);
218 // symmetric
219 inv(0,1) = inv(1,0); inv(0,2) = inv(2,0); inv(0,3) = inv(3,0);
220 inv(1,2) = inv(2,1); inv(1,3) = inv(3,1);
221 inv(2,3) = inv(3,2);
222 // compute determinant
223 Type det = m(iShift+0, jShift+0) * inv(0,0)
224 + m(iShift+1, jShift+0) * inv(1,0)
225 + m(iShift+2, jShift+0) * inv(2,0)
226 + m(iShift+3, jShift+0) * inv(3,0);
227 if (det == Type(0)) return Type(0);
228 // inverse matrix
229 inv /= det;
230 return det;
231 }

Referenced by STK::hidden::InvertSymMatrixDispatcher< Matrix, 4 >::run(), and STK::hidden::InvertSymMatrixDispatcher< Matrix, Size_ >::run().

◆ invertSymMatrixXX()

template<class Matrix , int Size_>
static Type STK::hidden::InvertSymImpl< Matrix, Size_ >::invertSymMatrixXX ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the symmetric 4x4 matrix m using only its lower part and store the result in inv.

Note
if the matrix is not invertible, the result will be a generalized inverse.
Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 239 of file STK_InvertSym.h.

240 {
241#ifdef STKUSELAPACK
242 lapack::SymEigen<Matrix> decomp(m);
243#else
244 SymEigen<Matrix> decomp(m);
245#endif
246 if (!decomp.run()) return Type(0);
247 // compute (generalized) inverse matrix
248 decomp.ginv(inv);
249 return decomp.det();
250 }

References STK::ISymEigen< Derived >::det(), STK::ISymEigen< Derived >::ginv(), and STK::ISymEigen< Derived >::run().

Referenced by STK::hidden::InvertSymMatrixDispatcher< Matrix, Size_ >::run().

◆ invertUpperSymMatrix11()

template<class Matrix , int Size_>
static Type STK::hidden::InvertUpperSymMatrixImpl< Matrix, Size_ >::invertUpperSymMatrix11 ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the symmetric matrix m of size 1x1 and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 62 of file STK_InvertUpperSym.h.

63 {
64 const int iShift = m.beginRows(), jShift = m.beginCols();
65 inv.resize(TRange<Size_>(0, 1));
66 // cofactor (0,0) [0]
67 inv(0, 0) = Type(1);
68 // compute determinant
69 Type det = m(iShift+0, jShift+0);
70 if (det == Type(0)) return Type(0);
71 // compute inverse matrix
72 inv /= det;
73 return det;
74 }

Referenced by STK::hidden::InvertUpperSymMatrixDispatcher< Matrix, 1 >::run(), and STK::hidden::InvertUpperSymMatrixDispatcher< Matrix, Size_ >::run().

◆ invertUpperSymMatrix22()

template<class Matrix , int Size_>
static Type STK::hidden::InvertUpperSymMatrixImpl< Matrix, Size_ >::invertUpperSymMatrix22 ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the symmetric 2x2 matrix m using only its upper part and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 82 of file STK_InvertUpperSym.h.

83 {
84 const int iShift = m.beginRows(), jShift = m.beginCols();
85 inv.resize(TRange<Size_>(0, 2));
86 // cofactor (0,0) [0]
87 inv(0, 0) = m(iShift+1, jShift+1);
88 // cofactor (1,0) [1]
89 inv(0, 1) = - m(iShift+0, jShift+1);
90 // cofactor (1,1) [3]
91 inv(1, 1) = m(iShift+0, jShift+0);
92 // symmetry
93 inv(1, 0) = inv(0, 1);
94 // determinant
95 Type det = m(iShift+0, jShift+0) * inv(0, 0)
96 + m(iShift+0, jShift+1) * inv(0, 1);
97 if (det == Type(0)) return Type(0);
98 // inverse matrix
99 inv /= det;
100 return det;
101 }

Referenced by STK::hidden::InvertUpperSymMatrixDispatcher< Matrix, 2 >::run(), and STK::hidden::InvertUpperSymMatrixDispatcher< Matrix, Size_ >::run().

◆ invertUpperSymMatrix33()

template<class Matrix , int Size_>
static Type STK::hidden::InvertUpperSymMatrixImpl< Matrix, Size_ >::invertUpperSymMatrix33 ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the symmetric 3x3 matrix m using only its upper part and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 108 of file STK_InvertUpperSym.h.

109 {
110 const int iShift = m.beginRows(), jShift = m.beginCols();
111 inv.resize(TRange<Size_>(0, 3));
112 // cofactor (0,0) [0]
113 inv(0, 0) = m(iShift+1, jShift+1) * m(iShift+2, jShift+2)
114 - m(iShift+1, jShift+2) * m(iShift+1, jShift+2);
115 // cofactor (1,0) [1]
116 inv(0, 1) = m(iShift+1, jShift+2) * m(iShift+0, jShift+2)
117 - m(iShift+0, jShift+1) * m(iShift+2, jShift+2);
118 inv(0, 2) = m(iShift+0, jShift+1) * m(iShift+1, jShift+2)
119 - m(iShift+0, jShift+2) * m(iShift+1, jShift+1);
120 inv(1, 1) = m(iShift+0, jShift+0) * m(iShift+2, jShift+2)
121 - m(iShift+0, jShift+2) * m(iShift+0, jShift+2);
122 inv(1, 2) = m(iShift+0, jShift+2) * m(iShift+0, jShift+1)
123 - m(iShift+0, jShift+0) * m(iShift+1, jShift+2);
124 inv(2, 2) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1)
125 - m(iShift+0, jShift+1) * m(iShift+0, jShift+1);
126 // solution symmetric
127 inv(1, 0) = inv(0, 1); inv(2, 0) = inv(0, 2); inv(2, 1) = inv(1, 2);
128 // compute determinant and inverse matrix
129 Type det = m(iShift+0, jShift+0) * inv(0, 0)
130 + m(iShift+0, jShift+1) * inv(0, 1)
131 + m(iShift+0, jShift+2) * inv(0, 2);
132 if (det == Type(0)) return Type(0);
133 // inverse matrix
134 inv /= det;
135 return det;
136 }

Referenced by STK::hidden::InvertUpperSymMatrixDispatcher< Matrix, 3 >::run(), and STK::hidden::InvertUpperSymMatrixDispatcher< Matrix, Size_ >::run().

◆ invertUpperSymMatrix44()

template<class Matrix , int Size_>
static Type STK::hidden::InvertUpperSymMatrixImpl< Matrix, Size_ >::invertUpperSymMatrix44 ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the symmetric 4x4 matrix m using only its upper part and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 143 of file STK_InvertUpperSym.h.

144 {
145 const int iShift = m.beginRows(), jShift = m.beginCols();
146 inv.resize(TRange<Size_>(0, 4));
147 // cofactor (0,0) [0]
148 inv(0, 0) = m(iShift+1, jShift+1) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3)
149 - m(iShift+1, jShift+1) * m(iShift+2, jShift+3) * m(iShift+2, jShift+3)
150 - m(iShift+1, jShift+2) * m(iShift+1, jShift+2) * m(iShift+3, jShift+3)
151 + m(iShift+1, jShift+2) * m(iShift+1, jShift+3) * m(iShift+2, jShift+3)
152 + m(iShift+1, jShift+3) * m(iShift+1, jShift+2) * m(iShift+2, jShift+3)
153 - m(iShift+1, jShift+3) * m(iShift+1, jShift+3) * m(iShift+2, jShift+2);
154 // cofactor (1,0) [1]
155 inv(0, 1) = -m(iShift+0, jShift+1) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3)
156 + m(iShift+0, jShift+1) * m(iShift+2, jShift+3) * m(iShift+2, jShift+3)
157 + m(iShift+1, jShift+2) * m(iShift+0, jShift+2) * m(iShift+3, jShift+3)
158 - m(iShift+1, jShift+2) * m(iShift+0, jShift+3) * m(iShift+2, jShift+3)
159 - m(iShift+1, jShift+3) * m(iShift+0, jShift+2) * m(iShift+2, jShift+3)
160 + m(iShift+1, jShift+3) * m(iShift+0, jShift+3) * m(iShift+2, jShift+2);
161 // cofactor (2,0) [2]
162 inv(0, 2) = m(iShift+0, jShift+1) * m(iShift+1, jShift+2) * m(iShift+3, jShift+3)
163 - m(iShift+0, jShift+1) * m(iShift+1, jShift+3) * m(iShift+2, jShift+3)
164 - m(iShift+1, jShift+1) * m(iShift+0, jShift+2) * m(iShift+3, jShift+3)
165 + m(iShift+1, jShift+1) * m(iShift+0, jShift+3) * m(iShift+2, jShift+3)
166 + m(iShift+1, jShift+3) * m(iShift+0, jShift+2) * m(iShift+1, jShift+3)
167 - m(iShift+1, jShift+3) * m(iShift+0, jShift+3) * m(iShift+1, jShift+2);
168 // cofactor (3,0) [3]
169 inv(0, 3) = -m(iShift+0, jShift+1) * m(iShift+1, jShift+2) * m(iShift+2, jShift+3)
170 + m(iShift+0, jShift+1) * m(iShift+1, jShift+3) * m(iShift+2, jShift+2)
171 + m(iShift+1, jShift+1) * m(iShift+0, jShift+2) * m(iShift+2, jShift+3)
172 - m(iShift+1, jShift+1) * m(iShift+0, jShift+3) * m(iShift+2, jShift+2)
173 - m(iShift+1, jShift+2) * m(iShift+0, jShift+2) * m(iShift+1, jShift+3)
174 + m(iShift+1, jShift+2) * m(iShift+0, jShift+3) * m(iShift+1, jShift+2);
175 // cofactor (1,1) [5]
176 inv(1, 1) = m(iShift+0, jShift+0) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3)
177 - m(iShift+0, jShift+0) * m(iShift+2, jShift+3) * m(iShift+2, jShift+3)
178 - m(iShift+0, jShift+2) * m(iShift+0, jShift+2) * m(iShift+3, jShift+3)
179 + m(iShift+0, jShift+2) * m(iShift+0, jShift+3) * m(iShift+2, jShift+3)
180 + m(iShift+0, jShift+3) * m(iShift+0, jShift+2) * m(iShift+2, jShift+3)
181 - m(iShift+0, jShift+3) * m(iShift+0, jShift+3) * m(iShift+2, jShift+2);
182 // cofactor (2,1) [6]
183 inv(1, 2) = -m(iShift+0, jShift+0) * m(iShift+1, jShift+2) * m(iShift+3, jShift+3)
184 + m(iShift+0, jShift+0) * m(iShift+1, jShift+3) * m(iShift+2, jShift+3)
185 + m(iShift+0, jShift+1) * m(iShift+0, jShift+2) * m(iShift+3, jShift+3)
186 - m(iShift+0, jShift+1) * m(iShift+0, jShift+3) * m(iShift+2, jShift+3)
187 - m(iShift+0, jShift+3) * m(iShift+0, jShift+2) * m(iShift+1, jShift+3)
188 + m(iShift+0, jShift+3) * m(iShift+0, jShift+3) * m(iShift+1, jShift+2);
189 // cofactor (3,1) [7]
190 inv(1, 3) = m(iShift+0, jShift+0) * m(iShift+1, jShift+2) * m(iShift+2, jShift+3)
191 - m(iShift+0, jShift+0) * m(iShift+1, jShift+3) * m(iShift+2, jShift+2)
192 - m(iShift+0, jShift+1) * m(iShift+0, jShift+2) * m(iShift+2, jShift+3)
193 + m(iShift+0, jShift+1) * m(iShift+0, jShift+3) * m(iShift+2, jShift+2)
194 + m(iShift+0, jShift+2) * m(iShift+0, jShift+2) * m(iShift+1, jShift+3)
195 - m(iShift+0, jShift+2) * m(iShift+0, jShift+3) * m(iShift+1, jShift+2);
196 // cofactor (2,2) [10]
197 inv(2, 2) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+3, jShift+3)
198 - m(iShift+0, jShift+0) * m(iShift+1, jShift+3) * m(iShift+1, jShift+3)
199 - m(iShift+0, jShift+1) * m(iShift+0, jShift+1) * m(iShift+3, jShift+3)
200 + m(iShift+0, jShift+1) * m(iShift+0, jShift+3) * m(iShift+1, jShift+3)
201 + m(iShift+0, jShift+3) * m(iShift+0, jShift+1) * m(iShift+1, jShift+3)
202 - m(iShift+0, jShift+3) * m(iShift+0, jShift+3) * m(iShift+1, jShift+1);
203 // cofactor (3,2) [11]
204 inv(2, 3) = -m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+2, jShift+3)
205 + m(iShift+0, jShift+0) * m(iShift+1, jShift+3) * m(iShift+1, jShift+2)
206 + m(iShift+0, jShift+1) * m(iShift+0, jShift+1) * m(iShift+2, jShift+3)
207 - m(iShift+0, jShift+1) * m(iShift+0, jShift+3) * m(iShift+1, jShift+2)
208 - m(iShift+0, jShift+2) * m(iShift+0, jShift+1) * m(iShift+1, jShift+3)
209 + m(iShift+0, jShift+2) * m(iShift+0, jShift+3) * m(iShift+1, jShift+1);
210 // cofactor (3,3) [15]
211 inv(3, 3) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+2, jShift+2)
212 - m(iShift+0, jShift+0) * m(iShift+1, jShift+2) * m(iShift+1, jShift+2)
213 - m(iShift+0, jShift+1) * m(iShift+0, jShift+1) * m(iShift+2, jShift+2)
214 + m(iShift+0, jShift+1) * m(iShift+0, jShift+2) * m(iShift+1, jShift+2)
215 + m(iShift+0, jShift+2) * m(iShift+0, jShift+1) * m(iShift+1, jShift+2)
216 - m(iShift+0, jShift+2) * m(iShift+0, jShift+2) * m(iShift+1, jShift+1);
217 // symmetric
218 inv(1, 0) = inv(0, 1); inv(2, 0) = inv(0, 2); inv(3, 0) = inv(0, 3);
219 inv(2, 1) = inv(1, 2); inv(3, 1) = inv(1, 3);
220 inv(3, 2) = inv(2, 3);
221 // compute determinant
222 Type det = m(iShift+0, jShift+0) * inv(0, 0)
223 + m(iShift+0, jShift+1) * inv(0, 1)
224 + m(iShift+0, jShift+2) * inv(0, 2)
225 + m(iShift+0, jShift+3) * inv(0, 3);
226 if (det == Type(0)) return Type(0);
227 // inverse matrix
228 inv /= det;
229 return det;
230 }

Referenced by STK::hidden::InvertUpperSymMatrixDispatcher< Matrix, 4 >::run(), and STK::hidden::InvertUpperSymMatrixDispatcher< Matrix, Size_ >::run().

◆ invertUpperSymMatrixXX()

template<class Matrix , int Size_>
static Type STK::hidden::InvertUpperSymMatrixImpl< Matrix, Size_ >::invertUpperSymMatrixXX ( Matrix const m,
CArraySquare< Type, Size_ > &  inv 
)
inlinestatic

compute the inverse of the symmetric 4x4 matrix m using only its upper part and store the result in inv.

Note
if the matrix is not invertible, the result will be a generalized inverse.
Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 238 of file STK_InvertUpperSym.h.

239 {
240#ifdef STKUSELAPACK
241 lapack::SymEigen<Matrix> decomp(m);
242#else
243 SymEigen< UpperSymmetrizeOperator<Matrix> > decomp(m.upperSymmetrize());
244#endif
245 if (!decomp.run()) return Type(0);
246 // compute (generalized) inverse matrix
247 decomp.ginv(inv);
248 return decomp.det();
249 }

References STK::ISymEigen< Derived >::det(), STK::ISymEigen< Derived >::ginv(), and STK::ISymEigen< Derived >::run().

Referenced by STK::hidden::InvertUpperSymMatrixDispatcher< Matrix, Size_ >::run().

◆ invertUpperTriangular11()

template<class Matrix , int Size_>
static Type STK::hidden::InvertUpperTriangularImpl< Matrix, Size_ >::invertUpperTriangular11 ( Matrix const m,
Array2DUpperTriangular< Type > &  inv 
)
inlinestatic

compute the inverse of the 1x1 matrix and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
true if m is invertible, false otherwise

Definition at line 56 of file STK_InvertUpperTriangular.h.

57 {
58 const int iShift = m.beginRows(), jShift = m.beginCols();
59 inv.resize(TRange<Size_>(0, 1), TRange<Size_>(0, 1));
60 // cofactor (0,0) [0]
61 inv(0, 0) = Type(1);
62 // compute determinant
63 Type det = m(iShift+0, jShift+0);
64 if (det == Type(0)) return Type(0);
65 // compute inverse matrix
66 inv /= det;
67 return det;
68 }

Referenced by STK::hidden::InvertUpperTriangularDispatcher< Matrix, Size_ >::run(), and STK::hidden::InvertUpperTriangularDispatcher< Matrix, 1 >::run().

◆ invertUpperTriangular22()

template<class Matrix , int Size_>
static Type STK::hidden::InvertUpperTriangularImpl< Matrix, Size_ >::invertUpperTriangular22 ( Matrix const m,
Array2DUpperTriangular< Type > &  inv 
)
inlinestatic

compute the inverse of the 2x2 matrix m and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
true if m is invertible, false otherwise

Definition at line 74 of file STK_InvertUpperTriangular.h.

75 {
76 const int iShift = m.beginRows(), jShift = m.beginCols();
77 inv.resize(TRange<Size_>(0, 2), TRange<Size_>(0, 2));
78 // cofactor (0,0) [0]
79 inv(0, 0) = m(iShift+1, jShift+1);
80 // cofactor (1,1) [2]
81 inv(0, 1) = - m(iShift+0, jShift+1);
82 // cofactor (1,1) [3]
83 inv(1, 1) = m(iShift+0, jShift+0);
84 // determinant
85 Type det = m(iShift+0, jShift+0) * inv(0,0);
86 if (det == Type(0)) return Type(0);
87 // compute inverse matrix
88 inv /= det;
89 return det;
90 }

Referenced by STK::hidden::InvertUpperTriangularDispatcher< Matrix, Size_ >::run(), and STK::hidden::InvertUpperTriangularDispatcher< Matrix, 2 >::run().

◆ invertUpperTriangular33()

template<class Matrix , int Size_>
static Type STK::hidden::InvertUpperTriangularImpl< Matrix, Size_ >::invertUpperTriangular33 ( Matrix const m,
Array2DUpperTriangular< Type > &  inv 
)
inlinestatic

compute the inverse of the 3x3 matrix m and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
true if m is invertible, false otherwise

Definition at line 96 of file STK_InvertUpperTriangular.h.

97 {
98 const int iShift = m.beginRows(), jShift = m.beginCols();
99 inv.resize(TRange<Size_>(0, 3), TRange<Size_>(0, 3));
100 // cofactor
101 inv(0, 0) = m(iShift+1, jShift+1) * m(iShift+2, jShift+2);
102 inv(0, 1) = -m(iShift+0, jShift+1) * m(iShift+2, jShift+2);
103 inv(0, 2) = m(iShift+0, jShift+1) * m(iShift+1, jShift+2)
104 -m(iShift+0, jShift+2) * m(iShift+1, jShift+1);
105 inv(1, 1) = m(iShift+0, jShift+0) * m(iShift+2, jShift+2);
106 inv(1, 2) = -m(iShift+0, jShift+0) * m(iShift+1, jShift+2);
107 inv(2, 2) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1);
108 // computes the inverse of a matrix m
109 Type det = m(iShift+0, jShift+0) * inv(0,0);
110 if (det == Type(0)) return Type(0);
111 // compute inverse matrix
112 inv /= det;
113 return det;
114 }

Referenced by STK::hidden::InvertUpperTriangularDispatcher< Matrix, Size_ >::run(), and STK::hidden::InvertUpperTriangularDispatcher< Matrix, 3 >::run().

◆ invertUpperTriangular44()

template<class Matrix , int Size_>
static Type STK::hidden::InvertUpperTriangularImpl< Matrix, Size_ >::invertUpperTriangular44 ( Matrix const m,
Array2DUpperTriangular< Type > &  inv 
)
inlinestatic

compute the inverse of the 4x4 matrix m and store the result in inv.

Parameters
m,invthe matrices to invert and its inverse
Returns
true if m is invertible, false otherwise

Definition at line 120 of file STK_InvertUpperTriangular.h.

121 {
122 const int iShift = m.beginRows(), jShift = m.beginCols();
123 inv.resize(TRange<Size_>(0, 4), TRange<Size_>(0, 4));
124 // cofactor (0,0) [0]
125 inv(0, 0) = m(iShift+1, jShift+1) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3);
126 // cofactor (0,1) [4]
127 inv(0, 1) = -m(iShift+0, jShift+1) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3);
128 // cofactor (0,2) [8]
129 inv(0, 2) = m(iShift+0, jShift+1) * m(iShift+1, jShift+2) * m(iShift+3, jShift+3)
130 - m(iShift+0, jShift+2) * m(iShift+1, jShift+1) * m(iShift+3, jShift+3);
131 // cofactor (0,3) [12]
132 inv(0, 3) = -m(iShift+0, jShift+1) * m(iShift+1, jShift+2) * m(iShift+2, jShift+3)
133 + m(iShift+0, jShift+1) * m(iShift+2, jShift+2) * m(iShift+1, jShift+3)
134 + m(iShift+0, jShift+2) * m(iShift+1, jShift+1) * m(iShift+2, jShift+3)
135 - m(iShift+0, jShift+3) * m(iShift+1, jShift+1) * m(iShift+2, jShift+2);
136 // cofactor (1,1) [5]
137 inv(1, 1) = m(iShift+0, jShift+0) * m(iShift+2, jShift+2) * m(iShift+3, jShift+3);
138 // cofactor (1,2) [9]
139 inv(1, 2) = -m(iShift+0, jShift+0) * m(iShift+1, jShift+2) * m(iShift+3, jShift+3);
140 // cofactor (1,3) [13]
141 inv(1, 3) = m(iShift+0, jShift+0) * m(iShift+1, jShift+2) * m(iShift+2, jShift+3)
142 - m(iShift+0, jShift+0) * m(iShift+2, jShift+2) * m(iShift+1, jShift+3);
143 // cofactor (2,2)
144 inv(2, 2) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+3, jShift+3);
145 // cofactor (2,3)
146 inv(2, 3) = -m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+2, jShift+3);
147 // cofactor (3,3) [15]
148 inv(3, 3) = m(iShift+0, jShift+0) * m(iShift+1, jShift+1) * m(iShift+2, jShift+2);
149 // compute determinant
150 Type det = m(iShift+0, jShift+0) * inv(0, 0);
151 if (det == Type(0)) return Type(0);
152 // compute inverse matrix
153 inv /= det;
154 return det;
155 }

Referenced by STK::hidden::InvertUpperTriangularDispatcher< Matrix, Size_ >::run(), and STK::hidden::InvertUpperTriangularDispatcher< Matrix, 4 >::run().

◆ invertUpperTriangularXX()

template<class Matrix , int Size_>
static Type STK::hidden::InvertUpperTriangularImpl< Matrix, Size_ >::invertUpperTriangularXX ( Matrix const m,
Array2DUpperTriangular< Type > &  inv 
)
inlinestatic

compute the inverse of the upper triangular matrix m and store the result in inv.

Note
if the matrix is not invertible, the result will be a generalized inverse.
Parameters
m,invthe matrices to invert and its inverse
Returns
The determinant value of m

Definition at line 162 of file STK_InvertUpperTriangular.h.

163 {
164 inv.resize(m.rows(), m.cols());
165 Real det = Type(1);
166 for(int j = m.beginRows(); j < m.endRows(); ++j)
167 {
168 det *= m(j,j);
169 inv(j,j) = m(j,j) ? Type(1)/m(j,j) : Type(0);
170 for(int i = j+1; i < m.endCols(); ++i)
171 {
172 Type sum = Type(0);
173 if (m(i,i))
174 {
175 for (int k = j; k < i; ++k)
176 { sum -= m(k, i) * inv(j, k);}
177 sum /= m(i,i);
178 }
179 inv(j,i) = sum;
180 }
181 }
182 return det;
183 }

References STK::sum().

Referenced by STK::hidden::InvertUpperTriangularDispatcher< Matrix, Size_ >::run().