44 template <
class IU,
class NU>
54 template <
class IT,
class NT,
class DER >
61 void Create(
const std::vector<IT> & essentials)
63 static_cast<DER*
>(
this)->CreateImpl(essentials);
66 void Create(IT
size, IT nRow, IT nCol, std::tuple<IT, IT, NT> * mytuples)
68 static_cast<DER*
>(
this)->CreateImpl(size, nRow, nCol, mytuples);
73 template <
typename SR>
84 return static_cast<const DER*
>(
this)->
GetArrays();
93 return static_cast<const DER*
>(
this)->
GetInternal();
97 return static_cast<const DER*
>(
this)->
GetInternal(i);
101 return static_cast<const DER*
>(
this)->
getnsplit();
110 return static_cast<DER*
>(
this)->
begcol();
114 return static_cast<DER*
>(
this)->
endcol();
118 return static_cast<DER*
>(
this)->
begcol(i);
122 return static_cast<DER*
>(
this)->
endcol(i);
125 template <
typename X = DER>
126 auto begnz(
const typename X::SpColIter & ccol)
128 return static_cast<DER*
>(
this)->
begnz(ccol);
131 template <
typename X = DER>
132 auto endnz(
const typename X::SpColIter & ccol)
134 return static_cast<DER*
>(
this)->
endnz(ccol);
137 template <
typename X = DER>
138 auto begnz(
const typename X::SpColIter & ccol,
int i)
140 return static_cast<DER*
>(
this)->
begnz(ccol, i);
143 template <
typename X = DER>
144 auto endnz(
const typename X::SpColIter & ccol,
int i)
146 return static_cast<DER*
>(
this)->
endnz(ccol, i);
152 std::ofstream&
put(std::ofstream& outfile)
const;
153 std::ifstream&
get(std::ifstream& infile);
155 bool isZero()
const {
return static_cast<const DER*
>(
this)->
isZero(); }
162 template <
typename UIT,
typename UNT,
typename UDER >
163 friend std::ofstream& operator<< (std::ofstream& outfile, const SpMat< UIT,UNT,UDER > & s);
165 template <
typename UIT,
typename UNT,
typename UDER >
170 template<
class SR,
class NUO,
class IU,
class NU1,
class NU2,
class DER1,
class DER2 >
auto begnz(const typename X::SpColIter &ccol)
std::vector< IT > GetEssentials() const
auto endnz(const typename X::SpColIter &ccol, int i)
bool operator==(const SpMat< IT, NT, DER > &rhs) const
void SpGEMM(SpMat< IT, NT, DER > &A, SpMat< IT, NT, DER > &B, bool isAT, bool isBT)
std::ofstream & put(std::ofstream &outfile) const
friend std::ifstream & operator>>(std::ifstream &infile, SpMat< UIT, UNT, UDER > &s)
void Create(const std::vector< IT > &essentials)
void Split(SpMat< IT, NT, DER > &partA, SpMat< IT, NT, DER > &partB)
auto begnz(const typename X::SpColIter &ccol, int i)
void Merge(SpMat< IT, NT, DER > &partA, SpMat< IT, NT, DER > &partB)
auto endnz(const typename X::SpColIter &ccol)
SpMat< IT, NT, DER > operator()(const std::vector< IT > &ri, const std::vector< IT > &ci) const
friend SpTuples< IU, NUO > * MultiplyReturnTuples(const SpMat< IU, NU1, DER1 > &A, const SpMat< IU, NU2, DER2 > &B, bool isAT, bool isBT, bool clearA, bool clearB)
auto GetInternal(int i) const
Arr< IT, NT > GetArrays() const
void Create(IT size, IT nRow, IT nCol, std::tuple< IT, IT, NT > *mytuples)