COMBINATORIAL_BLAS  1.6
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 ()
 
auto begcol ()
 
auto endcol ()
 
auto begcol (int i)
 
auto endcol (int i)
 
template<typename X = DER>
auto begnz (const typename X::SpColIter &ccol)
 
template<typename X = DER>
auto endnz (const typename X::SpColIter &ccol)
 
template<typename X = DER>
auto begnz (const typename X::SpColIter &ccol, int i)
 
template<typename X = DER>
auto endnz (const typename X::SpColIter &ccol, int i)
 
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 54 of file SpMat.h.

Member Function Documentation

◆ begcol() [1/2]

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

Definition at line 107 of file SpMat.h.

◆ begcol() [2/2]

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

Definition at line 115 of file SpMat.h.

◆ begnz() [1/2]

template<class IT, class NT, class DER>
template<typename X = DER>
auto SpMat< IT, NT, DER >::begnz ( const typename X::SpColIter &  ccol)
inline
Parameters
ccolReturn the beginning iterator for the nonzeros of the current column

Definition at line 125 of file SpMat.h.

◆ begnz() [2/2]

template<class IT, class NT, class DER>
template<typename X = DER>
auto SpMat< IT, NT, DER >::begnz ( const typename X::SpColIter &  ccol,
int  i 
)
inline
Parameters
imultithreaded version

Definition at line 137 of file SpMat.h.

◆ Create() [1/2]

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 60 of file SpMat.h.

◆ Create() [2/2]

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 65 of file SpMat.h.

◆ endcol() [1/2]

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

Definition at line 111 of file SpMat.h.

◆ endcol() [2/2]

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

Definition at line 119 of file SpMat.h.

◆ endnz() [1/2]

template<class IT, class NT, class DER>
template<typename X = DER>
auto SpMat< IT, NT, DER >::endnz ( const typename X::SpColIter &  ccol)
inline
Parameters
ccolReturn the ending iterator for the nonzeros of the current column

Definition at line 131 of file SpMat.h.

◆ endnz() [2/2]

template<class IT, class NT, class DER>
template<typename X = DER>
auto SpMat< IT, NT, DER >::endnz ( const typename X::SpColIter &  ccol,
int  i 
)
inline
Parameters
imultithreaded version

Definition at line 143 of file SpMat.h.

◆ get()

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

Definition at line 192 of file SpMat.cpp.

◆ GetArrays()

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

Definition at line 81 of file SpMat.h.

◆ GetEssentials()

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

Definition at line 85 of file SpMat.h.

◆ GetInternal() [1/2]

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

Definition at line 90 of file SpMat.h.

◆ GetInternal() [2/2]

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

Definition at line 94 of file SpMat.h.

◆ getncol()

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

Definition at line 156 of file SpMat.h.

◆ getnnz()

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

Definition at line 157 of file SpMat.h.

◆ getnrow()

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

Definition at line 155 of file SpMat.h.

◆ getnsplit()

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

Definition at line 98 of file SpMat.h.

◆ isZero()

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

Definition at line 154 of file SpMat.h.

◆ Merge()

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 65 of file SpMat.cpp.

◆ operator()()

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 36 of file SpMat.cpp.

◆ operator==()

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

Definition at line 53 of file SpMat.cpp.

◆ put()

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

Definition at line 186 of file SpMat.cpp.

◆ SpGEMM()

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 73 of file SpMat.cpp.

◆ Split()

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 59 of file SpMat.cpp.

◆ Transpose()

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

Definition at line 103 of file SpMat.h.

Friends And Related Function Documentation

◆ MultiplyReturnTuples

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 134 of file SpMat.cpp.

◆ operator<<

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 200 of file SpMat.cpp.

◆ operator>>

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 206 of file SpMat.cpp.


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