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