COMBINATORIAL_BLAS  1.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Friends | List of all members
SpMat< IT, NT, DER > Class Template Reference

#include <SpMat.h>

Public Member Functions

void Create (const vector< IT > &essentials)
 
void Create (IT size, IT nRow, IT nCol, tuple< IT, IT, NT > *mytuples)
 
SpMat< IT, NT, DER > operator() (const vector< IT > &ri, const vector< IT > &ci) const
 
template<typename SR >
void SpGEMM (SpMat< IT, NT, DER > &A, SpMat< IT, NT, DER > &B, bool isAT, bool isBT)
 
void Split (SpMat< IT, NT, DER > &partA, SpMat< IT, NT, DER > &partB)
 
void Merge (SpMat< IT, NT, DER > &partA, SpMat< IT, NT, DER > &partB)
 
Arr< IT, NT > GetArrays () const
 
vector< IT > GetEssentials () const
 
auto GetInternal () const
 
auto GetInternal (int i) const
 
int getnsplit () const
 
void Transpose ()
 
bool operator== (const SpMat< IT, NT, DER > &rhs) const
 
ofstream & put (ofstream &outfile) const
 
ifstream & get (ifstream &infile)
 
bool isZero () const
 
IT getnrow () const
 
IT getncol () const
 
IT getnnz () const
 

Friends

template<typename UIT , typename UNT , typename UDER >
ofstream & operator<< (ofstream &outfile, const SpMat< UIT, UNT, UDER > &s)
 
template<typename UIT , typename UNT , typename UDER >
ifstream & operator>> (ifstream &infile, SpMat< UIT, UNT, UDER > &s)
 
template<class SR , class NUO , class IU , class NU1 , class NU2 , class DER1 , class DER2 >
SpTuples< IU, NUO > * MultiplyReturnTuples (const SpMat< IU, NU1, DER1 > &A, const SpMat< IU, NU2, DER2 > &B, bool isAT, bool isBT, bool clearA, bool clearB)
 

Detailed Description

template<class IT, class NT, class DER>
class SpMat< IT, NT, DER >

The abstract base class for all derived sequential sparse matrix classes Contains no data members, hence no copy constructor/assignment operator Uses static polymorphism through curiously recurring templates (CRTP) Template parameters: IT (index type), NT (numerical type), DER (derived class type)

Definition at line 53 of file SpMat.h.

Member Function Documentation

template<class IT, class NT, class DER>
void SpMat< IT, NT, DER >::Create ( const vector< IT > &  essentials)
inline

Standard destructor, copy ctor and assignment are generated by compiler, they all do nothing ! Default constructor also exists, and does nothing more than creating Base<Derived>() and Derived() objects One has to call one of the overloaded create functions to get an nonempty object

Definition at line 59 of file SpMat.h.

template<class IT, class NT, class DER>
void SpMat< IT, NT, DER >::Create ( IT  size,
IT  nRow,
IT  nCol,
tuple< IT, IT, NT > *  mytuples 
)
inline

Definition at line 64 of file SpMat.h.

template<class IT , class NT , class DER >
ifstream & SpMat< IT, NT, DER >::get ( ifstream &  infile)
inline

Definition at line 195 of file SpMat.cpp.

template<class IT, class NT, class DER>
Arr<IT,NT> SpMat< IT, NT, DER >::GetArrays ( ) const
inline

Definition at line 80 of file SpMat.h.

template<class IT, class NT, class DER>
vector<IT> SpMat< IT, NT, DER >::GetEssentials ( ) const
inline

Definition at line 84 of file SpMat.h.

template<class IT, class NT, class DER>
auto SpMat< IT, NT, DER >::GetInternal ( ) const
inline

Definition at line 89 of file SpMat.h.

template<class IT, class NT, class DER>
auto SpMat< IT, NT, DER >::GetInternal ( int  i) const
inline

Definition at line 93 of file SpMat.h.

template<class IT, class NT, class DER>
IT SpMat< IT, NT, DER >::getncol ( ) const
inline

Definition at line 114 of file SpMat.h.

template<class IT, class NT, class DER>
IT SpMat< IT, NT, DER >::getnnz ( ) const
inline

Definition at line 115 of file SpMat.h.

template<class IT, class NT, class DER>
IT SpMat< IT, NT, DER >::getnrow ( ) const
inline

Definition at line 113 of file SpMat.h.

template<class IT, class NT, class DER>
int SpMat< IT, NT, DER >::getnsplit ( ) const
inline

Definition at line 97 of file SpMat.h.

template<class IT, class NT, class DER>
bool SpMat< IT, NT, DER >::isZero ( ) const
inline

Definition at line 112 of file SpMat.h.

template<class IT, class NT, class DER>
void SpMat< IT, NT, DER >::Merge ( SpMat< IT, NT, DER > &  partA,
SpMat< IT, NT, DER > &  partB 
)

Definition at line 64 of file SpMat.cpp.

template<class IT, class NT , class DER >
SpMat< IT, NT, DER > SpMat< IT, NT, DER >::operator() ( const vector< IT > &  ri,
const vector< IT > &  ci 
) const

Definition at line 35 of file SpMat.cpp.

template<class IT, class NT, class DER>
bool SpMat< IT, NT, DER >::operator== ( const SpMat< IT, NT, DER > &  rhs) const

Definition at line 52 of file SpMat.cpp.

template<class IT , class NT , class DER >
ofstream & SpMat< IT, NT, DER >::put ( ofstream &  outfile) const
inline

Definition at line 189 of file SpMat.cpp.

template<class IT, class NT, class DER>
template<typename SR >
void SpMat< IT, NT, DER >::SpGEMM ( SpMat< IT, NT, DER > &  A,
SpMat< IT, NT, DER > &  B,
bool  isAT,
bool  isBT 
)

Definition at line 72 of file SpMat.cpp.

template<class IT, class NT, class DER>
void SpMat< IT, NT, DER >::Split ( SpMat< IT, NT, DER > &  partA,
SpMat< IT, NT, DER > &  partB 
)

Definition at line 58 of file SpMat.cpp.

template<class IT, class NT, class DER>
void SpMat< IT, NT, DER >::Transpose ( )
inline

Definition at line 102 of file SpMat.h.

Friends And Related Function Documentation

template<class IT, class NT, class DER>
template<class SR , class NUO , class IU , class NU1 , class NU2 , class DER1 , class DER2 >
SpTuples< IU, NUO >* MultiplyReturnTuples ( const SpMat< IU, NU1, DER1 > &  A,
const SpMat< IU, NU2, DER2 > &  B,
bool  isAT,
bool  isBT,
bool  clearA = false,
bool  clearB = false 
)
friend

Returns a pointer to SpTuples, in order to avoid temporaries It is the caller's responsibility to delete the returned pointer afterwards

Definition at line 133 of file SpMat.cpp.

template<class IT, class NT, class DER>
template<typename UIT , typename UNT , typename UDER >
ofstream& operator<< ( ofstream &  outfile,
const SpMat< UIT, UNT, UDER > &  s 
)
friend

Definition at line 203 of file SpMat.cpp.

template<class IT, class NT, class DER>
template<typename UIT , typename UNT , typename UDER >
ifstream& operator>> ( ifstream &  infile,
SpMat< UIT, UNT, UDER > &  s 
)
friend

Definition at line 209 of file SpMat.cpp.


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