23 template <
typename T,
typename indexT,
bool columnMajor>
29 indexT *innerIdx =
nullptr;
30 indexT *outerPtr =
nullptr;
35 void encodeValueType();
38 void checkValueType();
44 void calculateCompSize();
50 inline void inPlaceScalarMultiply(T scalar);
53 inline Eigen::VectorXd vectorMultiply(Eigen::VectorXd &vec);
59 inline Eigen::Matrix<T, -1, -1> matrixMultiply(Eigen::Matrix<T, -1, -1> &mat);
99 SparseMatrix(Eigen::SparseMatrix<T, Eigen::RowMajor> &mat);
110 template <u
int8_t compressionLevel2>
126 template <
typename T2,
typename indexT2>
127 SparseMatrix(T2 *vals, indexT2 *innerIndices, indexT2 *outerPtr, uint32_t num_rows, uint32_t num_cols, uint32_t nnz);
136 template <
typename T2,
typename indexT2>
137 SparseMatrix(std::vector<std::tuple<indexT2, indexT2, T2>> &entries, uint32_t num_rows, uint32_t num_cols, uint32_t nnz);
183 T
coeff(uint32_t row, uint32_t col);
196 T *getValues(uint32_t vec)
const;
201 indexT *getInnerIndices(uint32_t vec)
const;
206 indexT *getOuterPointers()
const;
271 inline double norm();
295 void write(
const char *filename);
317 Eigen::SparseMatrix<T, columnMajor ? Eigen::ColMajor : Eigen::RowMajor>
toEigen();
347 std::vector<typename IVSparse::SparseMatrix<T, indexT, 1, columnMajor>::Vector>
slice(uint32_t start, uint32_t end);
363 T operator()(uint32_t row, uint32_t col);
372 void operator*=(T scalar);
375 Eigen::VectorXd operator*(Eigen::VectorXd &vec);
381 Eigen::Matrix<T, -1, -1> operator*(Eigen::Matrix<T, -1, -1> mat);
Definition: IVCSC_Vector.hpp:27
Definition: CSC_SparseMatrix.hpp:24
SparseMatrix()
Definition: CSC_SparseMatrix.hpp:83
Definition: VCSC_SparseMatrix.hpp:22
Definition: IVSparse_SparseMatrixBase.hpp:20
Definition: IVCSC_SparseMatrix.hpp:27
std::vector< T > maxRowCoeff()
Definition: IVCSC_BLAS.hpp:159
IVSparse::SparseMatrix< T, indexT, 2, columnMajor > toVCSC()
Definition: IVCSC_Methods.hpp:116
IVSparse::SparseMatrix< T, indexT, compressionLevel, columnMajor >::Vector getVector(uint32_t vec)
Definition: IVCSC_Methods.hpp:29
std::vector< T > minRowCoeff()
Definition: IVCSC_BLAS.hpp:189
IVSparse::SparseMatrix< T, indexT, compressionLevel, columnMajor > transpose()
Definition: IVCSC_Methods.hpp:269
void append(typename SparseMatrix< T, indexT, compressionLevel, columnMajor >::Vector &vec)
Definition: IVCSC_Methods.hpp:202
std::vector< T > innerSum()
Definition: IVCSC_BLAS.hpp:131
T coeff(uint32_t row, uint32_t col)
Definition: IVCSC_Methods.hpp:17
void write(const char *filename)
Definition: IVCSC_Methods.hpp:42
void print()
Definition: IVCSC_Methods.hpp:64
T sum()
Definition: IVCSC_BLAS.hpp:219
double norm()
Definition: IVCSC_BLAS.hpp:232
Eigen::SparseMatrix< T, columnMajor ? Eigen::ColMajor :Eigen::RowMajor > toEigen()
Definition: IVCSC_Methods.hpp:169
bool isColumnMajor() const
Definition: IVCSC_Methods.hpp:21
SparseMatrix()
Definition: IVCSC_SparseMatrix.hpp:93
std::vector< T > minColCoeff()
Definition: IVCSC_BLAS.hpp:174
std::vector< T > outerSum()
Definition: IVCSC_BLAS.hpp:118
double vectorLength(uint32_t vec)
Definition: IVCSC_BLAS.hpp:245
std::vector< typename IVSparse::SparseMatrix< T, indexT, compressionLevel, columnMajor >::Vector > slice(uint32_t start, uint32_t end)
Definition: IVCSC_Methods.hpp:350
std::vector< T > maxColCoeff()
Definition: IVCSC_BLAS.hpp:144
void inPlaceTranspose()
Definition: IVCSC_Methods.hpp:311
~SparseMatrix()
Destroy the Sparse Matrix object.
Definition: IVCSC_Constructors.hpp:15
T trace()
Definition: IVCSC_BLAS.hpp:205