suanPan
DenseMat< T > Class Template Reference

A DenseMat class that holds matrices. More...

#include <DenseMat.hpp>

Inheritance diagram for DenseMat< T >:
Collaboration diagram for DenseMat< T >:

Public Member Functions

 DenseMat (const uword in_rows, const uword in_cols, const uword in_elem)
 
 DenseMat (const DenseMat &old_mat)
 
 DenseMat (DenseMat &&) noexcept=delete
 
DenseMatoperator= (const DenseMat &)=delete
 
DenseMatoperator= (DenseMat &&) noexcept=delete
 
 ~DenseMat () override=default
 
bool is_empty () const override
 
void zeros () override
 
T max () const override
 
Col< Tdiag () const override
 
const Tmemptr () const override
 
Tmemptr () override
 
void scale_accu (const T scalar, const shared_ptr< MetaMat< T > > &M) override
 
void scale_accu (const T scalar, const triplet_form< T, uword > &M) override
 
void operator*= (const T value) override
 
int sign_det () const override
 
- Public Member Functions inherited from MetaMat< T >
 MetaMat (const uword in_rows, const uword in_cols, const uword in_elem)
 
 MetaMat (const MetaMat &)=default
 
 MetaMat (MetaMat &&) noexcept=delete
 
MetaMatoperator= (const MetaMat &)=delete
 
MetaMatoperator= (MetaMat &&) noexcept=delete
 
virtual ~MetaMat ()=default
 
void set_solver_setting (const SolverSetting< T > &SS)
 
SolverSetting< T > & get_solver_setting ()
 
void set_factored (const bool F)
 
virtual bool is_empty () const =0
 
virtual void zeros ()=0
 
virtual unique_ptr< MetaMatmake_copy ()=0
 
void unify (const uword K)
 
virtual void nullify (uword)=0
 
virtual T max () const =0
 
virtual Col< Tdiag () const =0
 
virtual T operator() (uword, uword) const =0
 Access element (read-only), returns zero if out-of-bound. More...
 
virtual Tunsafe_at (const uword I, const uword J)
 Access element without bound check. More...
 
virtual Tat (uword, uword)=0
 Access element with bound check. More...
 
virtual const Tmemptr () const =0
 
virtual Tmemptr ()=0
 
virtual void scale_accu (T, const shared_ptr< MetaMat > &)=0
 
virtual void scale_accu (T, const triplet_form< T, uword > &)=0
 
void operator+= (const shared_ptr< MetaMat > &M)
 
void operator-= (const shared_ptr< MetaMat > &M)
 
void operator+= (const op_scale< T > &M)
 
void operator-= (const op_scale< T > &M)
 
void operator+= (const triplet_form< T, uword > &M)
 
void operator-= (const triplet_form< T, uword > &M)
 
virtual Mat< Toperator* (const Mat< T > &) const =0
 
virtual void operator*= (T)=0
 
template<ArmaContainer< T > C>
int solve (Mat< T > &X, C &&B)
 
template<ArmaContainer< T > C>
Mat< Tsolve (C &&B)
 
virtual int sign_det () const =0
 
void save (const char *name)
 
virtual void csc_condense ()
 
virtual void csr_condense ()
 
Col< Tevaluate (const Col< T > &X) const
 

Protected Member Functions

int direct_solve (Mat< T > &X, const Mat< T > &B) override
 
podarray< float > to_float ()
 
- Protected Member Functions inherited from MetaMat< T >
virtual int direct_solve (Mat< T > &, const Mat< T > &)=0
 
virtual int direct_solve (Mat< T > &, Mat< T > &&)=0
 
int direct_solve (Mat< T > &X, const SpMat< T > &B)
 
int direct_solve (Mat< T > &X, SpMat< T > &&B)
 
int iterative_solve (Mat< T > &, const Mat< T > &)
 
int iterative_solve (Mat< T > &X, const SpMat< T > &B)
 
template<std::invocable< fmat & > F>
int mixed_trs (mat &X, mat &&B, F trs)
 

Protected Attributes

podarray< int > pivot
 
podarray< float > s_memory
 
std::unique_ptr< T[]> memory = nullptr
 
- Protected Attributes inherited from MetaMat< T >
bool factored = false
 
SolverSetting< Tsetting {}
 

Additional Inherited Members

- Public Attributes inherited from MetaMat< T >
triplet_form< T, uword > triplet_mat
 
const uword n_rows
 
const uword n_cols
 
const uword n_elem
 

Detailed Description

template<sp_d T>
class DenseMat< T >

A DenseMat class that holds matrices.

Author
tlc
Date
19/04/2021
Version
0.1.0

Constructor & Destructor Documentation

◆ DenseMat() [1/3]

template<sp_d T>
DenseMat< T >::DenseMat ( const uword  in_rows,
const uword  in_cols,
const uword  in_elem 
)
inline
Here is the call graph for this function:

◆ DenseMat() [2/3]

template<sp_d T>
DenseMat< T >::DenseMat ( const DenseMat< T > &  old_mat)
inline
Here is the call graph for this function:

◆ DenseMat() [3/3]

template<sp_d T>
DenseMat< T >::DenseMat ( DenseMat< T > &&  )
deletenoexcept

◆ ~DenseMat()

template<sp_d T>
DenseMat< T >::~DenseMat ( )
overridedefault

Member Function Documentation

◆ diag()

template<sp_d T>
Col< T > DenseMat< T >::diag ( ) const
inlineoverridevirtual

Implements MetaMat< T >.

Here is the call graph for this function:

◆ direct_solve()

template<sp_d T>
int DenseMat< T >::direct_solve ( Mat< T > &  X,
const Mat< T > &  B 
)
inlineoverrideprotectedvirtual

Implements MetaMat< T >.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_empty()

template<sp_d T>
bool DenseMat< T >::is_empty ( ) const
inlineoverridevirtual

Implements MetaMat< T >.

◆ max()

template<sp_d T>
T DenseMat< T >::max ( ) const
inlineoverridevirtual

Implements MetaMat< T >.

◆ memptr() [1/2]

template<sp_d T>
const T * DenseMat< T >::memptr ( ) const
inlineoverridevirtual

Implements MetaMat< T >.

Here is the caller graph for this function:

◆ memptr() [2/2]

template<sp_d T>
T * DenseMat< T >::memptr ( )
inlineoverridevirtual

Implements MetaMat< T >.

◆ operator*=()

template<sp_d T>
void DenseMat< T >::operator*= ( const T  value)
inlineoverridevirtual

Implements MetaMat< T >.

Here is the call graph for this function:

◆ operator=() [1/2]

template<sp_d T>
DenseMat & DenseMat< T >::operator= ( const DenseMat< T > &  )
delete

◆ operator=() [2/2]

template<sp_d T>
DenseMat & DenseMat< T >::operator= ( DenseMat< T > &&  )
deletenoexcept

◆ scale_accu() [1/2]

template<sp_d T>
void DenseMat< T >::scale_accu ( const T  scalar,
const shared_ptr< MetaMat< T > > &  M 
)
inlineoverridevirtual

Implements MetaMat< T >.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scale_accu() [2/2]

template<sp_d T>
void DenseMat< T >::scale_accu ( const T  scalar,
const triplet_form< T, uword > &  M 
)
inlineoverridevirtual

Implements MetaMat< T >.

Here is the call graph for this function:

◆ sign_det()

template<sp_d T>
int DenseMat< T >::sign_det ( ) const
inlineoverridevirtual

Implements MetaMat< T >.

◆ to_float()

template<sp_d T>
podarray< float > DenseMat< T >::to_float ( )
inlineprotected
Here is the call graph for this function:

◆ zeros()

template<sp_d T>
void DenseMat< T >::zeros ( )
inlineoverridevirtual

Implements MetaMat< T >.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ memory

template<sp_d T>
std::unique_ptr<T[]> DenseMat< T >::memory = nullptr
protected

◆ pivot

template<sp_d T>
podarray<int> DenseMat< T >::pivot
protected

◆ s_memory

template<sp_d T>
podarray<float> DenseMat< T >::s_memory
protected

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