75 const std::vector<Numeric> &
data ()
const {
return mdata;}
INDEX Index
The type to use for all integer numbers and indices.
Index nnz() const
Returns the number of nonzero elements.
Numeric operator()(Index r, Index c) const
Plain index operator.
Index mrr
Number of rows in the sparse matrix.
const std::vector< Index > & rowind() const
const std::vector< Numeric > & data() const
Index mcr
Number of rows in the sparse matrix.
Index ncols() const
Returns the number of columns.
Numeric & rw(Index r, Index c)
Read and write index operator.
void make_I(Index r, Index c)
Make Identity matrix.
Sparse()
Default constructor.
friend void transpose(Sparse &A, const Sparse &B)
Transpose of sparse matrix.
friend void abs(Sparse &A, const Sparse &B)
Absolute value of sparse matrix elements.
Index nrows() const
Returns the number of rows.
friend void mult(VectorView y, const Sparse &M, ConstVectorView x)
Sparse matrix - Vector multiplication.
std::vector< Index > mcolptr
Pointers to first data element for each column.
NUMERIC Numeric
The type to use for all floating point numbers.
friend void sub(Sparse &A, const Sparse &B, const Sparse &C)
Sparse - Sparse subtraction.
friend std::ostream & operator<<(std::ostream &os, const Sparse &v)
Output operator for Sparse.
const std::vector< Index > & colptr() const
std::vector< Index > mrowind
Row indices.
Numeric ro(Index r, Index c) const
Read only index operator.
A constant view of a Vector.
A constant view of a Matrix.
void resize(Index r, Index c)
Resize function.
std::vector< Numeric > mdata
The actual data values.
friend void add(Sparse &A, const Sparse &B, const Sparse &C)
Sparse - Sparse addition.
void insert_row(Index r, Vector v)
Insert row function.