tesseract++ 0.0.1
N-dimensional tensor library for embedded systems
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
FusedMatrix< T, Rows, Cols > Class Template Reference

#include <fused_matrix.h>

Inheritance diagram for FusedMatrix< T, Rows, Cols >:
Inheritance graph
[legend]
Collaboration diagram for FusedMatrix< T, Rows, Cols >:
Collaboration graph
[legend]

Public Member Functions

 DEFINE_TYPE_ALIAS (T, value_type)
 
 FusedMatrix ()
 
 FusedMatrix (T initValue)
 
 FusedMatrix (const FusedMatrix &other)
 
 FusedMatrix (const FusedTensorND< T, Rows, Cols > &baseTensor)
 
 FusedMatrix (FusedMatrix &&other) noexcept
 
 FusedMatrix (FusedTensorND< T, Rows, Cols > &&baseTensor) noexcept
 
 FusedMatrix (T(&initList)[Rows][Cols])
 
FusedTensorND< T, Rows, Cols > copyToTensor (void) const
 
FusedTensorND< T, Rows, Cols > moveToTensor (void)
 
template<typename Expr >
FusedMatrixoperator= (const BaseExpr< Expr > &expr)
 
FusedMatrixoperator= (const FusedTensorND< T, Rows, Cols > &other)
 
FusedMatrixoperator= (const FusedMatrix &other)
 
FusedMatrixoperator= (FusedTensorND< T, Rows, Cols > &&other) noexcept
 
FusedMatrixoperator= (FusedMatrix< T, Rows, Cols > &&other) noexcept
 
FusedMatrixoperator= (T(&initList)[Rows][Cols])
 
T & operator() (my_size_t i, my_size_t j)
 
const T & operator() (my_size_t i, my_size_t j) const
 
FusedMatrixsetToZero (void)
 
FusedMatrixsetHomogen (T _val)
 
FusedMatrixsetRandom (my_size_t _maxRand, my_size_t _minRand)
 
FusedMatrixsetDiagonal (T _val)
 
FusedMatrixsetIdentity (void)
 
FusedMatrixsetSequencial (void)
 
bool isIdentity (void) const
 
bool isSymmetric (void) const
 
bool isUpperTriangular (void) const
 
bool isLowerTriangular (void) const
 
FusedMatrix upperTriangular (bool inplace=false)
 
FusedMatrix lowerTriangular (bool inplace=false)
 
FusedMatrix inverse (void) const
 
bool isOrthogonal (void)
 
matrix_traits::Definiteness isPositiveDefinite () const
 Determine if the matrix is positive definite, semi-definite, or neither.
 
- Public Member Functions inherited from FusedTensorND< T, Rows, Cols >
 FusedTensorND () noexcept=default
 
 FusedTensorND (T initValue) noexcept
 
 FusedTensorND (const FusedTensorND &other) noexcept
 
 FusedTensorND (FusedTensorND &&other) noexcept
 
bool may_alias (const Output &output) const noexcept
 
FusedTensorNDoperator= (const BaseExpr< Expr > &expr)
 
FusedTensorNDoperator= (const FusedTensorND &other) noexcept
 
FusedTensorNDoperator= (FusedTensorND &&other) noexcept
 
Microkernel< T_, Bits, Arch >::VecType evalu (my_size_t flat) const noexcept
 
FORCE_INLINE Microkernel< T_, Bits, Arch >::VecType logical_evalu (my_size_t logical_flat) const noexcept
 Evaluate at a LOGICAL flat index.
 
T & operator() (Indices... indices) TESSERACT_CONDITIONAL_NOEXCEPT
 
const T & operator() (Indices... indices) const TESSERACT_CONDITIONAL_NOEXCEPT
 
T & operator() (const my_size_t *indices) TESSERACT_CONDITIONAL_NOEXCEPT
 
const T & operator() (const my_size_t *indices) const TESSERACT_CONDITIONAL_NOEXCEPT
 
T & operator() (my_size_t(&indices)[NumDims]) TESSERACT_CONDITIONAL_NOEXCEPT
 
const T & operator() (my_size_t(&indices)[NumDims]) const TESSERACT_CONDITIONAL_NOEXCEPT
 
bool isIdentity () const
 
FORCE_INLINE auto transpose_view () const noexcept
 
FORCE_INLINE auto transpose_view (void) const noexcept
 
std::string getShape () const
 
FusedTensorNDsetToZero (void) noexcept
 
FusedTensorNDsetHomogen (T _val) noexcept
 
FusedTensorNDsetRandom (T _maxRand, T _minRand)
 
FusedTensorNDsetDiagonal (T _val)
 
FusedTensorNDsetIdentity (void)
 
FusedTensorNDsetSequencial (void)
 
void getDiagonalEntries (FusedTensorND< T, DiagonalSize, 1 > &diagonalEntries) const
 
void print (bool with_padding=false) const
 
void printND (bool showPadding=false) const
 Print tensor of arbitrary dimensions.
 
void printLayoutInfo () const
 
void print_access_policy_info () const
 
void print_flat_data () const
 
FORCE_INLINE constexpr const T * data () const noexcept
 
FORCE_INLINE constexpr T * data () noexcept
 
- Public Member Functions inherited from BaseExpr< FusedTensorND< T, Dims... > >
const FusedTensorND< T, Dims... > & derived () const
 

Static Public Member Functions

static constexpr FusedMatrix moveFromTensor (FusedTensorND< T, Rows, Cols > &&tensor)
 
template<typename LeftExpr , typename RightExpr >
static FusedMatrix< T, Rows, Cols > matmul (const BaseExpr< LeftExpr > &mat1, const BaseExpr< RightExpr > &mat2)
 
- Static Public Member Functions inherited from FusedTensorND< T, Rows, Cols >
static constexpr bool areDimsEqual ()
 
static FORCE_INLINE constexpr my_size_t getTotalSize () noexcept
 
static FORCE_INLINE constexpr my_size_t getNumDims () noexcept
 
static FusedTensorND einsum (const BaseExpr< LeftExpr > &_tensor1, const BaseExpr< RightExpr > &_tensor2, const my_size_t a, const my_size_t b)
 Contract two tensors along specified axes using SIMD dot products.
 
static FORCE_INLINE constexpr my_size_t getDim (my_size_t i) TESSERACT_CONDITIONAL_NOEXCEPT
 
static FORCE_INLINE constexpr my_size_t getStride (my_size_t i) TESSERACT_CONDITIONAL_NOEXCEPT
 

Additional Inherited Members

- Public Types inherited from FusedTensorND< T, Rows, Cols >
using value_type = T
 
using Self = FusedTensorND< T, Dims... >
 
using Layout = StridedLayoutConstExpr< typename AccessPolicy::PadPolicy >
 
- Static Public Attributes inherited from FusedTensorND< T, Rows, Cols >
static constexpr my_size_t NumDims
 
static constexpr my_size_t Dim []
 
static constexpr my_size_t TotalSize
 

Constructor & Destructor Documentation

◆ FusedMatrix() [1/7]

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix< T, Rows, Cols >::FusedMatrix ( )
inline

◆ FusedMatrix() [2/7]

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix< T, Rows, Cols >::FusedMatrix ( initValue)
inline

◆ FusedMatrix() [3/7]

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix< T, Rows, Cols >::FusedMatrix ( const FusedMatrix< T, Rows, Cols > &  other)
inline
Here is the call graph for this function:

◆ FusedMatrix() [4/7]

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix< T, Rows, Cols >::FusedMatrix ( const FusedTensorND< T, Rows, Cols > &  baseTensor)
inline
Here is the call graph for this function:

◆ FusedMatrix() [5/7]

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix< T, Rows, Cols >::FusedMatrix ( FusedMatrix< T, Rows, Cols > &&  other)
inlinenoexcept
Here is the call graph for this function:

◆ FusedMatrix() [6/7]

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix< T, Rows, Cols >::FusedMatrix ( FusedTensorND< T, Rows, Cols > &&  baseTensor)
inlinenoexcept
Here is the call graph for this function:

◆ FusedMatrix() [7/7]

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix< T, Rows, Cols >::FusedMatrix ( T(&)  initList[Rows][Cols])
inline
Here is the call graph for this function:

Member Function Documentation

◆ copyToTensor()

template<typename T , my_size_t Rows, my_size_t Cols>
FusedTensorND< T, Rows, Cols > FusedMatrix< T, Rows, Cols >::copyToTensor ( void  ) const
inline
Here is the call graph for this function:

◆ DEFINE_TYPE_ALIAS()

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix< T, Rows, Cols >::DEFINE_TYPE_ALIAS ( ,
value_type   
)

◆ inverse()

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix FusedMatrix< T, Rows, Cols >::inverse ( void  ) const
inline
Here is the call graph for this function:

◆ isIdentity()

template<typename T , my_size_t Rows, my_size_t Cols>
bool FusedMatrix< T, Rows, Cols >::isIdentity ( void  ) const
inline
Here is the call graph for this function:

◆ isLowerTriangular()

template<typename T , my_size_t Rows, my_size_t Cols>
bool FusedMatrix< T, Rows, Cols >::isLowerTriangular ( void  ) const
inline
Here is the call graph for this function:

◆ isOrthogonal()

template<typename T , my_size_t Rows, my_size_t Cols>
bool FusedMatrix< T, Rows, Cols >::isOrthogonal ( void  )
inline
Here is the call graph for this function:

◆ isPositiveDefinite()

template<typename T , my_size_t Rows, my_size_t Cols>
matrix_traits::Definiteness FusedMatrix< T, Rows, Cols >::isPositiveDefinite ( ) const
inline

Determine if the matrix is positive definite, semi-definite, or neither.

Uses a two-pass Cholesky approach:

  1. Strict pass (tol = PRECISION_TOLERANCE): if it succeeds, matrix is positive definite.
  2. Relaxed pass (tol = -PRECISION_TOLERANCE): if it succeeds, matrix is positive semi-definite (zero diagonals allowed, truly negative rejected).
  3. Both fail: matrix is not positive definite.
Returns
Definiteness::PositiveDefinite, Definiteness::PositiveSemiDefinite, or Definiteness::NotPositiveDefinite.
Here is the call graph for this function:

◆ isSymmetric()

template<typename T , my_size_t Rows, my_size_t Cols>
bool FusedMatrix< T, Rows, Cols >::isSymmetric ( void  ) const
inline
Here is the call graph for this function:

◆ isUpperTriangular()

template<typename T , my_size_t Rows, my_size_t Cols>
bool FusedMatrix< T, Rows, Cols >::isUpperTriangular ( void  ) const
inline
Here is the call graph for this function:

◆ lowerTriangular()

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix FusedMatrix< T, Rows, Cols >::lowerTriangular ( bool  inplace = false)
inline
Here is the call graph for this function:

◆ matmul()

template<typename T , my_size_t Rows, my_size_t Cols>
template<typename LeftExpr , typename RightExpr >
static FusedMatrix< T, Rows, Cols > FusedMatrix< T, Rows, Cols >::matmul ( const BaseExpr< LeftExpr > &  mat1,
const BaseExpr< RightExpr > &  mat2 
)
inlinestatic
Here is the call graph for this function:

◆ moveFromTensor()

template<typename T , my_size_t Rows, my_size_t Cols>
static constexpr FusedMatrix FusedMatrix< T, Rows, Cols >::moveFromTensor ( FusedTensorND< T, Rows, Cols > &&  tensor)
inlinestaticconstexpr
Here is the call graph for this function:

◆ moveToTensor()

template<typename T , my_size_t Rows, my_size_t Cols>
FusedTensorND< T, Rows, Cols > FusedMatrix< T, Rows, Cols >::moveToTensor ( void  )
inline
Here is the call graph for this function:

◆ operator()() [1/2]

template<typename T , my_size_t Rows, my_size_t Cols>
T & FusedMatrix< T, Rows, Cols >::operator() ( my_size_t  i,
my_size_t  j 
)
inline
Here is the call graph for this function:

◆ operator()() [2/2]

template<typename T , my_size_t Rows, my_size_t Cols>
const T & FusedMatrix< T, Rows, Cols >::operator() ( my_size_t  i,
my_size_t  j 
) const
inline
Here is the call graph for this function:

◆ operator=() [1/6]

template<typename T , my_size_t Rows, my_size_t Cols>
template<typename Expr >
FusedMatrix & FusedMatrix< T, Rows, Cols >::operator= ( const BaseExpr< Expr > &  expr)
inline
Here is the call graph for this function:

◆ operator=() [2/6]

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix & FusedMatrix< T, Rows, Cols >::operator= ( const FusedMatrix< T, Rows, Cols > &  other)
inline
Here is the call graph for this function:

◆ operator=() [3/6]

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix & FusedMatrix< T, Rows, Cols >::operator= ( const FusedTensorND< T, Rows, Cols > &  other)
inline
Here is the call graph for this function:

◆ operator=() [4/6]

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix & FusedMatrix< T, Rows, Cols >::operator= ( FusedMatrix< T, Rows, Cols > &&  other)
inlinenoexcept
Here is the call graph for this function:

◆ operator=() [5/6]

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix & FusedMatrix< T, Rows, Cols >::operator= ( FusedTensorND< T, Rows, Cols > &&  other)
inlinenoexcept
Here is the call graph for this function:

◆ operator=() [6/6]

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix & FusedMatrix< T, Rows, Cols >::operator= ( T(&)  initList[Rows][Cols])
inline
Here is the call graph for this function:

◆ setDiagonal()

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix & FusedMatrix< T, Rows, Cols >::setDiagonal ( _val)
inline
Here is the call graph for this function:

◆ setHomogen()

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix & FusedMatrix< T, Rows, Cols >::setHomogen ( _val)
inline
Here is the call graph for this function:

◆ setIdentity()

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix & FusedMatrix< T, Rows, Cols >::setIdentity ( void  )
inline
Here is the call graph for this function:

◆ setRandom()

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix & FusedMatrix< T, Rows, Cols >::setRandom ( my_size_t  _maxRand,
my_size_t  _minRand 
)
inline
Here is the call graph for this function:

◆ setSequencial()

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix & FusedMatrix< T, Rows, Cols >::setSequencial ( void  )
inline
Here is the call graph for this function:

◆ setToZero()

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix & FusedMatrix< T, Rows, Cols >::setToZero ( void  )
inline
Here is the call graph for this function:

◆ upperTriangular()

template<typename T , my_size_t Rows, my_size_t Cols>
FusedMatrix FusedMatrix< T, Rows, Cols >::upperTriangular ( bool  inplace = false)
inline
Here is the call graph for this function:

The documentation for this class was generated from the following files: