OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
SparseMatrix< T, id_t, DEFAULT_MATRIX > Class Template Reference

Sparse Matrix implementation. More...

Detailed Description

template<typename T, typename id_t, unsigned int Mi DEFAULT_MATRIX>
class SparseMatrix< T, id_t, DEFAULT_MATRIX >

Sparse Matrix implementation.

Template Parameters
TType of the sparse Matrix store on each row,colums
id_ttype of id
Miimplementation

Definition at line 78 of file SparseMatrix.hpp.

#include <SparseMatrix.hpp>

Public Types

typedef boost::mpl::int_<-1 > triplet_impl
 Triplet implementation id.
 
typedef triplet< T,-1 > triplet_type
 Triplet type.
 

Public Member Functions

 SparseMatrix (size_t N1, size_t N2)
 
 SparseMatrix (size_t N1, size_t N2, size_t loc)
 
openfpm::vector< triplet_type > & getMatrixTriplets ()
 
const int & getMat () const
 
int & getMat ()
 
void resize (size_t row, size_t col, size_t row_n, size_t col_n)
 
operator() (id_t i, id_t j)
 
bool save (const std::string &file) const
 
bool load (const std::string &file)
 
getValue (size_t r, size_t c)
 

Data Fields

openfpm::vector< triplet_typestub_vt
 
int stub_i
 
stub_t
 

Member Typedef Documentation

◆ triplet_impl

template<typename T , typename id_t , unsigned int Mi DEFAULT_MATRIX>
typedef boost::mpl::int_<-1> SparseMatrix< T, id_t, DEFAULT_MATRIX >::triplet_impl

Triplet implementation id.

Definition at line 83 of file SparseMatrix.hpp.

◆ triplet_type

template<typename T , typename id_t , unsigned int Mi DEFAULT_MATRIX>
typedef triplet<T,-1> SparseMatrix< T, id_t, DEFAULT_MATRIX >::triplet_type

Triplet type.

Definition at line 86 of file SparseMatrix.hpp.

Constructor & Destructor Documentation

◆ SparseMatrix() [1/3]

template<typename T , typename id_t , unsigned int Mi DEFAULT_MATRIX>
SparseMatrix< T, id_t, DEFAULT_MATRIX >::SparseMatrix ( size_t  N1,
size_t  N2 
)
inline

Definition at line 95 of file SparseMatrix.hpp.

◆ SparseMatrix() [2/3]

template<typename T , typename id_t , unsigned int Mi DEFAULT_MATRIX>
SparseMatrix< T, id_t, DEFAULT_MATRIX >::SparseMatrix ( size_t  N1,
size_t  N2,
size_t  loc 
)
inline

Definition at line 96 of file SparseMatrix.hpp.

◆ SparseMatrix() [3/3]

template<typename T , typename id_t , unsigned int Mi DEFAULT_MATRIX>
SparseMatrix< T, id_t, DEFAULT_MATRIX >::SparseMatrix ( )
inline

Definition at line 97 of file SparseMatrix.hpp.

Member Function Documentation

◆ getMat() [1/2]

template<typename T , typename id_t , unsigned int Mi DEFAULT_MATRIX>
int & SparseMatrix< T, id_t, DEFAULT_MATRIX >::getMat ( )
inline

Definition at line 100 of file SparseMatrix.hpp.

◆ getMat() [2/2]

template<typename T , typename id_t , unsigned int Mi DEFAULT_MATRIX>
const int & SparseMatrix< T, id_t, DEFAULT_MATRIX >::getMat ( ) const
inline

Definition at line 99 of file SparseMatrix.hpp.

◆ getMatrixTriplets()

template<typename T , typename id_t , unsigned int Mi DEFAULT_MATRIX>
openfpm::vector< triplet_type > & SparseMatrix< T, id_t, DEFAULT_MATRIX >::getMatrixTriplets ( )
inline

Definition at line 98 of file SparseMatrix.hpp.

◆ getValue()

template<typename T , typename id_t , unsigned int Mi DEFAULT_MATRIX>
T SparseMatrix< T, id_t, DEFAULT_MATRIX >::getValue ( size_t  r,
size_t  c 
)
inline

Definition at line 105 of file SparseMatrix.hpp.

◆ load()

template<typename T , typename id_t , unsigned int Mi DEFAULT_MATRIX>
bool SparseMatrix< T, id_t, DEFAULT_MATRIX >::load ( const std::string &  file)
inline

Definition at line 104 of file SparseMatrix.hpp.

◆ operator()()

template<typename T , typename id_t , unsigned int Mi DEFAULT_MATRIX>
T SparseMatrix< T, id_t, DEFAULT_MATRIX >::operator() ( id_t  i,
id_t  j 
)
inline

Definition at line 102 of file SparseMatrix.hpp.

◆ resize()

template<typename T , typename id_t , unsigned int Mi DEFAULT_MATRIX>
void SparseMatrix< T, id_t, DEFAULT_MATRIX >::resize ( size_t  row,
size_t  col,
size_t  row_n,
size_t  col_n 
)
inline

Definition at line 101 of file SparseMatrix.hpp.

◆ save()

template<typename T , typename id_t , unsigned int Mi DEFAULT_MATRIX>
bool SparseMatrix< T, id_t, DEFAULT_MATRIX >::save ( const std::string &  file) const
inline

Definition at line 103 of file SparseMatrix.hpp.

Field Documentation

◆ stub_i

template<typename T , typename id_t , unsigned int Mi DEFAULT_MATRIX>
int SparseMatrix< T, id_t, DEFAULT_MATRIX >::stub_i

Definition at line 89 of file SparseMatrix.hpp.

◆ stub_t

template<typename T , typename id_t , unsigned int Mi DEFAULT_MATRIX>
T SparseMatrix< T, id_t, DEFAULT_MATRIX >::stub_t

Definition at line 90 of file SparseMatrix.hpp.

◆ stub_vt

template<typename T , typename id_t , unsigned int Mi DEFAULT_MATRIX>
openfpm::vector<triplet_type> SparseMatrix< T, id_t, DEFAULT_MATRIX >::stub_vt

Definition at line 88 of file SparseMatrix.hpp.


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