suanPan
MetaMat< T > Class Template Referenceabstract

A MetaMat class that holds matrices. More...

#include <MetaMat.hpp>

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

Public Member Functions

 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
 

Public Attributes

triplet_form< T, uword > triplet_mat
 
const uword n_rows
 
const uword n_cols
 
const uword n_elem
 

Protected Member Functions

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

bool factored = false
 
SolverSetting< Tsetting {}
 

Detailed Description

template<sp_d T>
class MetaMat< T >

A MetaMat class that holds matrices.

Author
tlc
Date
08/09/2017
Version
0.2.0

Constructor & Destructor Documentation

◆ MetaMat() [1/3]

template<sp_d T>
MetaMat< T >::MetaMat ( const uword  in_rows,
const uword  in_cols,
const uword  in_elem 
)
inline

◆ MetaMat() [2/3]

template<sp_d T>
MetaMat< T >::MetaMat ( const MetaMat< T > &  )
default

◆ MetaMat() [3/3]

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

◆ ~MetaMat()

template<sp_d T>
virtual MetaMat< T >::~MetaMat ( )
virtualdefault

Member Function Documentation

◆ at()

template<sp_d T>
virtual T & MetaMat< T >::at ( uword  ,
uword   
)
pure virtual

Access element with bound check.

Returns
value

Implemented in BandMat< T >, BandMatSpike< T >, BandSymmMat< T >, FullMat< T >, SparseMat< T >, and SymmPackMat< T >.

Here is the caller graph for this function:

◆ csc_condense()

template<sp_d T>
virtual void MetaMat< T >::csc_condense ( )
inlinevirtual

Reimplemented in SparseMat< T >.

◆ csr_condense()

template<sp_d T>
virtual void MetaMat< T >::csr_condense ( )
inlinevirtual

Reimplemented in SparseMat< T >.

◆ diag()

template<sp_d T>
virtual Col< T > MetaMat< T >::diag ( ) const
pure virtual

Implemented in DenseMat< T >, and SparseMat< T >.

◆ direct_solve() [1/4]

template<sp_d T>
virtual int MetaMat< T >::direct_solve ( Mat< T > &  ,
const Mat< T > &   
)
protectedpure virtual

Implemented in SparseMatLis< T >, SparseMatSuperLU< T >, DenseMat< T >, and SparseMatBaseMUMPS< T >.

Here is the caller graph for this function:

◆ direct_solve() [2/4]

template<sp_d T>
virtual int MetaMat< T >::direct_solve ( Mat< T > &  ,
Mat< T > &&   
)
protectedpure virtual

◆ direct_solve() [3/4]

template<sp_d T>
int MetaMat< T >::direct_solve ( Mat< T > &  X,
const SpMat< T > &  B 
)
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ direct_solve() [4/4]

template<sp_d T>
int MetaMat< T >::direct_solve ( Mat< T > &  X,
SpMat< T > &&  B 
)
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ evaluate()

template<sp_d T>
Col< T > MetaMat< T >::evaluate ( const Col< T > &  X) const
inline
Here is the call graph for this function:

◆ get_solver_setting()

template<sp_d T>
SolverSetting< T > & MetaMat< T >::get_solver_setting ( )
inline

◆ is_empty()

template<sp_d T>
virtual bool MetaMat< T >::is_empty ( ) const
pure virtual

Implemented in DenseMat< T >, and SparseMat< T >.

◆ iterative_solve()

template<sp_d T>
int MetaMat< T >::iterative_solve ( Mat< T > &  X,
const SpMat< T > &  B 
)
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_copy()

◆ max()

template<sp_d T>
virtual T MetaMat< T >::max ( ) const
pure virtual

Implemented in DenseMat< T >, and SparseMat< T >.

◆ memptr() [1/2]

template<sp_d T>
virtual const T * MetaMat< T >::memptr ( ) const
pure virtual

Implemented in DenseMat< T >, and SparseMat< T >.

◆ memptr() [2/2]

template<sp_d T>
virtual T * MetaMat< T >::memptr ( )
pure virtual

Implemented in DenseMat< T >, and SparseMat< T >.

◆ mixed_trs()

template<sp_d T>
template<std::invocable< fmat & > F>
int MetaMat< T >::mixed_trs ( mat &  X,
mat &&  B,
trs 
)
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ nullify()

template<sp_d T>
virtual void MetaMat< T >::nullify ( uword  )
pure virtual

Implemented in SparseMat< T >, BandMat< T >, BandMatSpike< T >, BandSymmMat< T >, FullMat< T >, and SymmPackMat< T >.

Here is the caller graph for this function:

◆ operator()()

template<sp_d T>
virtual T MetaMat< T >::operator() ( uword  ,
uword   
) const
pure virtual

Access element (read-only), returns zero if out-of-bound.

Returns
value

Implemented in BandMat< T >, BandMatSpike< T >, BandSymmMat< T >, FullMat< T >, SparseMat< T >, and SymmPackMat< T >.

◆ operator*()

template<sp_d T>
virtual Mat< T > MetaMat< T >::operator* ( const Mat< T > &  ) const
pure virtual

Implemented in BandMat< T >, BandMatSpike< T >, BandSymmMat< T >, FullMat< T >, SymmPackMat< T >, and SparseMat< T >.

Here is the caller graph for this function:

◆ operator*=()

template<sp_d T>
virtual void MetaMat< T >::operator*= ( T  )
pure virtual

Implemented in SparseMat< T >, and DenseMat< T >.

◆ operator+=() [1/3]

template<sp_d T>
void MetaMat< T >::operator+= ( const op_scale< T > &  M)
inline
Here is the call graph for this function:

◆ operator+=() [2/3]

template<sp_d T>
void MetaMat< T >::operator+= ( const shared_ptr< MetaMat< T > > &  M)
inline
Here is the call graph for this function:

◆ operator+=() [3/3]

template<sp_d T>
void MetaMat< T >::operator+= ( const triplet_form< T, uword > &  M)
inline
Here is the call graph for this function:

◆ operator-=() [1/3]

template<sp_d T>
void MetaMat< T >::operator-= ( const op_scale< T > &  M)
inline
Here is the call graph for this function:

◆ operator-=() [2/3]

template<sp_d T>
void MetaMat< T >::operator-= ( const shared_ptr< MetaMat< T > > &  M)
inline
Here is the call graph for this function:

◆ operator-=() [3/3]

template<sp_d T>
void MetaMat< T >::operator-= ( const triplet_form< T, uword > &  M)
inline
Here is the call graph for this function:

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ save()

template<sp_d T>
void MetaMat< T >::save ( const char *  name)
inline
Here is the call graph for this function:

◆ scale_accu() [1/2]

template<sp_d T>
virtual void MetaMat< T >::scale_accu ( T  ,
const shared_ptr< MetaMat< T > > &   
)
pure virtual

Implemented in SparseMat< T >, and DenseMat< T >.

Here is the caller graph for this function:

◆ scale_accu() [2/2]

template<sp_d T>
virtual void MetaMat< T >::scale_accu ( T  ,
const triplet_form< T, uword > &   
)
pure virtual

Implemented in SparseMat< T >, and DenseMat< T >.

◆ set_factored()

template<sp_d T>
void MetaMat< T >::set_factored ( const bool  F)
inline

◆ set_solver_setting()

template<sp_d T>
void MetaMat< T >::set_solver_setting ( const SolverSetting< T > &  SS)
inline

◆ sign_det()

template<sp_d T>
virtual int MetaMat< T >::sign_det ( ) const
pure virtual

◆ solve() [1/2]

template<sp_d T>
template<ArmaContainer< T > C>
Mat< T > MetaMat< T >::solve ( C &&  B)
inline
Here is the call graph for this function:

◆ solve() [2/2]

template<sp_d T>
template<ArmaContainer< T > C>
int MetaMat< T >::solve ( Mat< T > &  X,
C &&  B 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unify()

template<sp_d T>
void MetaMat< T >::unify ( const uword  K)
inline
Here is the call graph for this function:

◆ unsafe_at()

template<sp_d T>
virtual T & MetaMat< T >::unsafe_at ( const uword  I,
const uword  J 
)
inlinevirtual

Access element without bound check.

Returns
value

Reimplemented in BandMat< T >, BandMatSpike< T >, BandSymmMat< T >, and SymmPackMat< T >.

Here is the call graph for this function:

◆ zeros()

template<sp_d T>
virtual void MetaMat< T >::zeros ( )
pure virtual

Member Data Documentation

◆ factored

template<sp_d T>
bool MetaMat< T >::factored = false
protected

◆ n_cols

template<sp_d T>
const uword MetaMat< T >::n_cols

◆ n_elem

template<sp_d T>
const uword MetaMat< T >::n_elem

◆ n_rows

template<sp_d T>
const uword MetaMat< T >::n_rows

◆ setting

template<sp_d T>
SolverSetting<T> MetaMat< T >::setting {}
protected

◆ triplet_mat

template<sp_d T>
triplet_form<T, uword> MetaMat< T >::triplet_mat

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