suanPan
🧮 An Open Source, Parallel and Heterogeneous Finite Element Analysis Framework
Loading...
Searching...
No Matches
SparseMat< T > Class Template Reference

A SparseMat class that holds matrices. More...

#include <SparseMat.hpp>

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

Public Member Functions

 SparseMat (const uword in_row, const uword in_col, const uword in_elem=0)
 
bool is_empty () const override
 
void zeros () override
 
void nullify (const uword idx) override
 
max () const override
 
operator() (const uword in_row, const uword in_col) const override
 Access element (read-only), returns zero if out-of-bound.
 
T & at (const uword in_row, const uword in_col) override
 Access element with bound check.
 
const T * memptr () const override
 
T * memptr () override
 
void scale_accu (const T scalar, const shared_ptr< MetaMat< T > > &in_mat) override
 
void scale_accu (const T scalar, const triplet_form< T, uword > &in_mat) override
 
Mat< T > operator* (const Mat< T > &in_mat) const override
 
void operator*= (const T scalar) override
 
void allreduce () override
 
void csc_condense () override
 
void csr_condense () 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 &&)=delete
 
MetaMatoperator= (const MetaMat &)=delete
 
MetaMatoperator= (MetaMat &&)=delete
 
virtual ~MetaMat ()=default
 
void set_solver_setting (const SolverSetting< T > &SS)
 
SolverSetting< T > & get_solver_setting ()
 
void set_factored (const bool F)
 
virtual unique_ptr< MetaMatunique_copy ()=0
 
void unify (const uword K)
 
void unify (const uvec &list)
 
void nullify (const uvec &list)
 
virtual T & unsafe_at (const uword I, const uword J)
 Access element without bound check.
 
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)
 
template<typename C >
requires is_arma_mat<T, C>
int solve (Mat< T > &X, C &&B)
 
template<typename C >
requires is_arma_mat<T, C>
Mat< T > solve (C &&B)
 
virtual int sign_det () const
 
void save (const char *name)
 

Protected Member Functions

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

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
 
- Protected Attributes inherited from MetaMat< T >
bool factored = false
 
SolverSetting< T > setting {}
 

Detailed Description

template<sp_d T>
class SparseMat< T >

A SparseMat class that holds matrices.

Author
tlc
Date
06/05/2018
Version
0.1.0

Constructor & Destructor Documentation

◆ SparseMat()

template<sp_d T>
SparseMat< T >::SparseMat ( const uword  in_row,
const uword  in_col,
const uword  in_elem = 0 
)
inline
Here is the call graph for this function:

Member Function Documentation

◆ allreduce()

template<sp_d T>
void SparseMat< T >::allreduce ( )
inlineoverridevirtual

Implements MetaMat< T >.

Here is the call graph for this function:

◆ at()

template<sp_d T>
T & SparseMat< T >::at ( const uword  ,
const uword   
)
inlineoverridevirtual

Access element with bound check.

Returns
value

Implements MetaMat< T >.

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

◆ csc_condense()

template<sp_d T>
void SparseMat< T >::csc_condense ( )
inlineoverridevirtual

Reimplemented from MetaMat< T >.

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

◆ csr_condense()

template<sp_d T>
void SparseMat< T >::csr_condense ( )
inlineoverridevirtual

Reimplemented from MetaMat< T >.

Here is the call graph for this function:

◆ direct_solve()

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

Implements MetaMat< T >.

Reimplemented in SparseMatMAGMA< T >, SparseMatSuperLU< T >, SparseMatClusterLIS< T >, SparseMatBaseClusterMUMPS< T, sym >, and SparseMatBaseClusterPARDISO< T, mtype >.

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

◆ is_empty()

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

Implements MetaMat< T >.

Here is the call graph for this function:

◆ max()

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

Implements MetaMat< T >.

Here is the call graph for this function:

◆ memptr() [1/2]

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

Implements MetaMat< T >.

◆ memptr() [2/2]

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

Implements MetaMat< T >.

◆ nullify()

template<sp_d T>
void SparseMat< T >::nullify ( const uword  idx)
inlineoverridevirtual

Implements MetaMat< T >.

Here is the call graph for this function:

◆ operator()()

template<sp_d T>
T SparseMat< T >::operator() ( const uword  ,
const uword   
) const
inlineoverridevirtual

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

Returns
value

Implements MetaMat< T >.

◆ operator*()

template<sp_d T>
Mat< T > SparseMat< T >::operator* ( const Mat< T > &  in_mat) const
inlineoverridevirtual

Implements MetaMat< T >.

◆ operator*=()

template<sp_d T>
void SparseMat< T >::operator*= ( const T  scalar)
inlineoverridevirtual

Implements MetaMat< T >.

◆ scale_accu() [1/2]

template<sp_d T>
void SparseMat< T >::scale_accu ( const T  scalar,
const shared_ptr< MetaMat< T > > &  in_mat 
)
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 SparseMat< T >::scale_accu ( const T  scalar,
const triplet_form< T, uword > &  in_mat 
)
inlineoverridevirtual

Implements MetaMat< T >.

Here is the call graph for this function:

◆ zeros()

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

Implements MetaMat< T >.

Here is the call graph for this function:

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