COMBINATORIAL_BLAS  1.6
combblas::SpMat< IT, NT, DER > Class Template Reference

#include <SpMat.h>

Public Member Functions

void Create (const std::vector< IT > &essentials)
 
void Create (IT size, IT nRow, IT nCol, std::tuple< IT, IT, NT > *mytuples)
 
SpMat< IT, NT, DER > operator() (const std::vector< IT > &ri, const std::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
 
std::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
 
std::ofstream & put (std::ofstream &outfile) const
 
std::ifstream & get (std::ifstream &infile)
 
bool isZero () const
 
IT getnrow () const
 
IT getncol () const
 
IT getnnz () const
 

Friends

template<typename UIT , typename UNT , typename UDER >
std::ofstream & operator<< (std::ofstream &outfile, const SpMat< UIT, UNT, UDER > &s)
 
template<typename UIT , typename UNT , typename UDER >
std::ifstream & operator>> (std::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 combblas::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 55 of file SpMat.h.

Member Function Documentation

◆ begcol() [1/2]

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

Definition at line 108 of file SpMat.h.

◆ begcol() [2/2]

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

Definition at line 116 of file SpMat.h.

◆ begnz() [1/2]

template<class IT, class NT, class DER>
template<typename X = DER>
auto combblas::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 126 of file SpMat.h.

◆ begnz() [2/2]

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

Definition at line 138 of file SpMat.h.

◆ Create() [1/2]

template<class IT, class NT, class DER>
void combblas::SpMat< IT, NT, DER >::Create ( const std::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 61 of file SpMat.h.

◆ Create() [2/2]

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

Definition at line 66 of file SpMat.h.

◆ endcol() [1/2]

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

Definition at line 112 of file SpMat.h.

◆ endcol() [2/2]

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

Definition at line 120 of file SpMat.h.

◆ endnz() [1/2]

template<class IT, class NT, class DER>
template<typename X = DER>
auto combblas::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 132 of file SpMat.h.

◆ endnz() [2/2]

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

Definition at line 144 of file SpMat.h.

◆ get()

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

Definition at line 193 of file SpMat.cpp.

◆ GetArrays()

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

Definition at line 82 of file SpMat.h.

◆ GetEssentials()

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

Definition at line 86 of file SpMat.h.

◆ GetInternal() [1/2]

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

Definition at line 91 of file SpMat.h.

◆ GetInternal() [2/2]

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

Definition at line 95 of file SpMat.h.

◆ getncol()

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

Definition at line 157 of file SpMat.h.

◆ getnnz()

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

Definition at line 158 of file SpMat.h.

◆ getnrow()

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

Definition at line 156 of file SpMat.h.

◆ getnsplit()

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

Definition at line 99 of file SpMat.h.

◆ isZero()

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

Definition at line 155 of file SpMat.h.

◆ Merge()

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

Definition at line 66 of file SpMat.cpp.

◆ operator()()

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

Definition at line 37 of file SpMat.cpp.

◆ operator==()

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

Definition at line 54 of file SpMat.cpp.

◆ put()

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

Definition at line 187 of file SpMat.cpp.

◆ SpGEMM()

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

Definition at line 74 of file SpMat.cpp.

◆ Split()

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

Definition at line 60 of file SpMat.cpp.

◆ Transpose()

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

Definition at line 104 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 135 of file SpMat.cpp.

◆ operator<<

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

Definition at line 201 of file SpMat.cpp.

◆ operator>>

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

Definition at line 207 of file SpMat.cpp.


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