23 template <
typename T,
typename indexT,
bool columnMajor>
28 indexT *innerIdx =
nullptr;
29 indexT *outerPtr =
nullptr;
34 void encodeValueType();
37 void checkValueType();
43 void calculateCompSize();
50 inline void inPlaceScalarMultiply(T scalar);
53 inline Eigen::VectorXd vectorMultiply(Eigen::VectorXd &vec);
56 inline Eigen::VectorXd vectorMultiply(
60 inline Eigen::Matrix<T, -1, -1> matrixMultiply(Eigen::Matrix<T, -1, -1> &mat);
102 SparseMatrix(Eigen::SparseMatrix<T, Eigen::RowMajor> &mat);
115 template <u
int8_t compressionLevel2>
133 template <
typename T2,
typename indexT2>
134 SparseMatrix(T2 *vals, indexT2 *innerIndices, indexT2 *outerPtr,
135 uint32_t num_rows, uint32_t num_cols, uint32_t nnz);
145 template <
typename T2,
typename indexT2>
146 SparseMatrix(std::vector<std::tuple<indexT2, indexT2, T2>> &entries,
147 uint32_t num_rows, uint32_t num_cols, uint32_t nnz);
167 T, indexT, 1, columnMajor>::Vector> &vecs);
199 T
coeff(uint32_t row, uint32_t col);
212 T *getValues(uint32_t vec)
const;
217 indexT *getInnerIndices(uint32_t vec)
const;
222 indexT *getOuterPointers()
const;
289 inline double norm();
313 void write(
const char *filename);
336 Eigen::SparseMatrix<T, columnMajor ? Eigen::ColMajor : Eigen::RowMajor>
371 slice(uint32_t start, uint32_t end);
388 T operator()(uint32_t row, uint32_t col);
398 void operator*=(T scalar);
401 Eigen::VectorXd operator*(Eigen::VectorXd &vec);
404 Eigen::VectorXd operator*(
408 Eigen::Matrix<T, -1, -1> operator*(Eigen::Matrix<T, -1, -1> mat);
Definition: IVCSC_Vector.hpp:25
Definition: CSC_SparseMatrix.hpp:24
SparseMatrix()
Definition: CSC_SparseMatrix.hpp:85
Definition: VCSC_SparseMatrix.hpp:21
Definition: IVSparse_SparseMatrixBase.hpp:20
Definition: IVCSC_SparseMatrix.hpp:29
std::vector< T > maxRowCoeff()
Definition: IVCSC_BLAS.hpp:161
IVSparse::SparseMatrix< T, indexT, 2, columnMajor > toVCSC()
Definition: IVCSC_Methods.hpp:153
IVSparse::SparseMatrix< T, indexT, compressionLevel, columnMajor >::Vector getVector(uint32_t vec)
Definition: IVCSC_Methods.hpp:47
std::vector< T > minRowCoeff()
Definition: IVCSC_BLAS.hpp:199
IVSparse::SparseMatrix< T, indexT, compressionLevel, columnMajor > transpose()
Definition: IVCSC_Methods.hpp:329
void append(typename SparseMatrix< T, indexT, compressionLevel, columnMajor >::Vector &vec)
Definition: IVCSC_Methods.hpp:245
std::vector< T > innerSum()
Definition: IVCSC_BLAS.hpp:126
T coeff(uint32_t row, uint32_t col)
Definition: IVCSC_Methods.hpp:17
void write(const char *filename)
Definition: IVCSC_Methods.hpp:72
void print()
Definition: IVCSC_Methods.hpp:97
T sum()
Definition: IVCSC_BLAS.hpp:239
double norm()
Definition: IVCSC_BLAS.hpp:256
Eigen::SparseMatrix< T, columnMajor ? Eigen::ColMajor :Eigen::RowMajor > toEigen()
Definition: IVCSC_Methods.hpp:210
bool isColumnMajor() const
Definition: IVCSC_Methods.hpp:30
SparseMatrix()
Definition: IVCSC_SparseMatrix.hpp:99
std::vector< T > minColCoeff()
Definition: IVCSC_BLAS.hpp:180
std::vector< T > outerSum()
Definition: IVCSC_BLAS.hpp:111
double vectorLength(uint32_t vec)
Definition: IVCSC_BLAS.hpp:272
std::vector< typename IVSparse::SparseMatrix< T, indexT, compressionLevel, columnMajor >::Vector > slice(uint32_t start, uint32_t end)
Definition: IVCSC_Methods.hpp:416
std::vector< T > maxColCoeff()
Definition: IVCSC_BLAS.hpp:142
void inPlaceTranspose()
Definition: IVCSC_Methods.hpp:374
~SparseMatrix()
Destroy the Sparse Matrix object.
Definition: IVCSC_Constructors.hpp:15
T trace()
Definition: IVCSC_BLAS.hpp:218