#include <Friends.h>
Public Member Functions | |
SpTuples (int64_t size, IT nRow, IT nCol) | |
SpTuples (int64_t size, IT nRow, IT nCol, std::tuple< IT, IT, NT > *mytuples, bool sorted=false, bool isOpNew=false) | |
SpTuples (int64_t maxnnz, IT nRow, IT nCol, std::vector< IT > &edges, bool removeloops=true) | |
SpTuples (int64_t size, IT nRow, IT nCol, StackEntry< NT, std::pair< IT, IT > > *&multstack) | |
SpTuples (const SpTuples< IT, NT > &rhs) | |
SpTuples (const SpDCCols< IT, NT > &rhs) | |
Constructor for converting SpDCCols matrix -> SpTuples. More... | |
~SpTuples () | |
SpTuples< IT, NT > & | operator= (const SpTuples< IT, NT > &rhs) |
IT & | rowindex (IT i) |
IT & | colindex (IT i) |
NT & | numvalue (IT i) |
IT | rowindex (IT i) const |
IT | colindex (IT i) const |
NT | numvalue (IT i) const |
template<typename BINFUNC > | |
void | RemoveDuplicates (BINFUNC BinOp) |
void | SortRowBased () |
void | SortColBased () |
IT | AddLoops (NT loopval, bool replaceExisting=false) |
IT | AddLoops (std::vector< NT > loopvals, bool replaceExisting=false) |
IT | RemoveLoops () |
std::pair< IT, IT > | RowLimits () |
std::pair< IT, IT > | ColLimits () |
std::tuple< IT, IT, NT > | front () |
std::tuple< IT, IT, NT > | back () |
std::ofstream & | putstream (std::ofstream &outfile) const |
std::ofstream & | put (std::ofstream &outfile) const |
std::ifstream & | getstream (std::ifstream &infile) |
std::ifstream & | get (std::ifstream &infile) |
bool | isZero () const |
IT | getnrow () const |
IT | getncol () const |
int64_t | getnnz () const |
void | PrintInfo () |
![]() | |
void | Create (const std::vector< IT > &essentials) |
void | Create (IT size, IT nRow, IT nCol, std::tuple< IT, IT, NT > *mytuples) |
SpMat< IT, NT, SpTuples< IT, NT > > | operator() (const std::vector< IT > &ri, const std::vector< IT > &ci) const |
void | SpGEMM (SpMat< IT, NT, SpTuples< IT, NT > > &A, SpMat< IT, NT, SpTuples< IT, NT > > &B, bool isAT, bool isBT) |
void | Split (SpMat< IT, NT, SpTuples< IT, NT > > &partA, SpMat< IT, NT, SpTuples< IT, NT > > &partB) |
void | Merge (SpMat< IT, NT, SpTuples< IT, NT > > &partA, SpMat< IT, NT, SpTuples< IT, NT > > &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 | begcol (int i) |
auto | endcol () |
auto | endcol (int i) |
auto | begnz (const typename X::SpColIter &ccol) |
auto | begnz (const typename X::SpColIter &ccol, int i) |
auto | endnz (const typename X::SpColIter &ccol) |
auto | endnz (const typename X::SpColIter &ccol, int i) |
bool | operator== (const SpMat< IT, NT, SpTuples< IT, NT > > &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 |
Public Attributes | |
std::tuple< IT, IT, NT > * | tuples |
Friends | |
template<class IU , class NU > | |
class | SpDCCols |
template<class IU , class NU > | |
class | SpCCols |
template<typename SR , typename IU , typename NU > | |
SpTuples< IU, NU > | MergeAll (const std::vector< SpTuples< IU, NU > *> &ArrSpTups, IU mstar, IU nstar, bool delarrs) |
template<typename SR , typename IU , typename NU > | |
SpTuples< IU, NU > * | MergeAllRec (const std::vector< SpTuples< IU, NU > *> &ArrSpTups, IU mstar, IU nstar) |
Triplets are represented using the boost::tuple class of the Boost library Number of entries are 64-bit addressible, but each entry is only <class it>=""> addressible Therefore, size is int64_t but nrows/ncols (representing range of first two entries in tuple) is of type IT
combblas::SpTuples< IT, NT >::SpTuples | ( | int64_t | size, |
IT | nRow, | ||
IT | nCol | ||
) |
Definition at line 37 of file SpTuples.cpp.
combblas::SpTuples< IT, NT >::SpTuples | ( | int64_t | size, |
IT | nRow, | ||
IT | nCol, | ||
std::tuple< IT, IT, NT > * | mytuples, | ||
bool | sorted = false , |
||
bool | isOpNew = false |
||
) |
Definition at line 52 of file SpTuples.cpp.
combblas::SpTuples< IT, NT >::SpTuples | ( | int64_t | maxnnz, |
IT | nRow, | ||
IT | nCol, | ||
std::vector< IT > & | edges, | ||
bool | removeloops = true |
||
) |
Generate a SpTuples object from an edge list
[in,out] | edges | edge list that might contain duplicate edges. freed upon return Semantics differ depending on the object created: NT=bool: duplicates are ignored NT='countable' (such as short,int): duplicated as summed to keep count |
Definition at line 70 of file SpTuples.cpp.
combblas::SpTuples< IT, NT >::SpTuples | ( | int64_t | size, |
IT | nRow, | ||
IT | nCol, | ||
StackEntry< NT, std::pair< IT, IT > > *& | multstack | ||
) |
Generate a SpTuples object from StackEntry array, then delete that array
[in] | multstack | {value-key pairs where keys are pair<col_ind, row_ind> sorted lexicographically} |
Definition at line 132 of file SpTuples.cpp.
combblas::SpTuples< IT, NT >::SpTuples | ( | const SpTuples< IT, NT > & | rhs | ) |
Hint1: copy constructor (constructs a new object. i.e. this is NEVER called on an existing object) Hint2: Base's default constructor is called under the covers Normally Base's copy constructor should be invoked but it doesn't matter here as Base has no data members
Definition at line 168 of file SpTuples.cpp.
combblas::SpTuples< IT, NT >::SpTuples | ( | const SpDCCols< IT, NT > & | rhs | ) |
Constructor for converting SpDCCols matrix -> SpTuples.
Definition at line 180 of file SpTuples.cpp.
combblas::SpTuples< IT, NT >::~SpTuples | ( | ) |
Definition at line 151 of file SpTuples.cpp.
|
inline |
Definition at line 107 of file SpTuples.h.
|
inline |
Definition at line 154 of file SpTuples.h.
|
inline |
Definition at line 249 of file SpTuples.h.
|
inline |
Definition at line 75 of file SpTuples.h.
|
inline |
Definition at line 79 of file SpTuples.h.
|
inline |
Definition at line 236 of file SpTuples.h.
|
inline |
Definition at line 248 of file SpTuples.h.
|
inline |
Definition at line 263 of file SpTuples.h.
|
inline |
Definition at line 268 of file SpTuples.h.
|
inline |
Definition at line 269 of file SpTuples.h.
|
inline |
Definition at line 267 of file SpTuples.h.
std::ifstream & combblas::SpTuples< IT, NT >::getstream | ( | std::ifstream & | infile | ) |
Loads a triplet matrix from infile
Definition at line 278 of file SpTuples.cpp.
|
inline |
Definition at line 266 of file SpTuples.h.
|
inline |
Definition at line 76 of file SpTuples.h.
|
inline |
Definition at line 80 of file SpTuples.h.
SpTuples< IT, NT > & combblas::SpTuples< IT, NT >::operator= | ( | const SpTuples< IT, NT > & | rhs | ) |
Definition at line 210 of file SpTuples.cpp.
void combblas::SpTuples< IT, NT >::PrintInfo | ( | ) |
Definition at line 321 of file SpTuples.cpp.
|
inline |
Definition at line 259 of file SpTuples.h.
std::ofstream & combblas::SpTuples< IT, NT >::putstream | ( | std::ofstream & | outfile | ) | const |
Output to a triplets file
Definition at line 309 of file SpTuples.cpp.
void combblas::SpTuples< IT, NT >::RemoveDuplicates | ( | BINFUNC | BinOp | ) |
Definition at line 244 of file SpTuples.cpp.
|
inline |
Definition at line 197 of file SpTuples.h.
|
inline |
Definition at line 74 of file SpTuples.h.
|
inline |
Definition at line 78 of file SpTuples.h.
|
inline |
Definition at line 224 of file SpTuples.h.
|
inline |
Definition at line 96 of file SpTuples.h.
|
inline |
Definition at line 86 of file SpTuples.h.
|
friend |
Definition at line 289 of file SpTuples.h.
Definition at line 286 of file SpTuples.h.
std::tuple<IT, IT, NT>* combblas::SpTuples< IT, NT >::tuples |
Definition at line 272 of file SpTuples.h.