Owning sparse matrix container in coordinate-format.
More...
#include <sparsematrix.h>
Owning sparse matrix container in coordinate-format.
SparseMatrix stores the recovered nonzeros of a sparse matrix as a contiguous array of CoordinateFormatTripled entries. The C++ sparse drivers use this representation directly, while the legacy C drivers adapt it back to separate rind, cind, and values arrays.
◆ storage_type
◆ value_type
◆ ~SparseMatrix()
| ADOLC::Sparse::SparseMatrix::~SparseMatrix |
( |
| ) |
|
|
default |
◆ SparseMatrix() [1/6]
| ADOLC::Sparse::SparseMatrix::SparseMatrix |
( |
| ) |
|
|
default |
Construct an empty sparse matrix.
◆ SparseMatrix() [2/6]
| ADOLC::Sparse::SparseMatrix::SparseMatrix |
( |
storage_type && |
entries | ) |
|
|
inlineexplicitnoexcept |
Construct from already prepared coordinate-format entries.
Ownership of the entry vector is transferred into the sparse matrix.
- Parameters
-
| entries | Coordinate-format entries. |
◆ SparseMatrix() [3/6]
Construct from an already prepared array of coordinate-format entries.
The entries of the array are copied.
- Parameters
-
| entries | Array of size N with coordinate-format entries. |
◆ SparseMatrix() [4/6]
| ADOLC::Sparse::SparseMatrix::SparseMatrix |
( |
size_t |
size | ) |
|
|
inlineexplicit |
Construct a sparse matrix with storage for size entries.
Entries are value-initialized and may later be overwritten through operator[].
- Parameters
-
| size | Number of coordinate-format entries to allocate. |
◆ SparseMatrix() [5/6]
| ADOLC::Sparse::SparseMatrix::SparseMatrix |
( |
const SparseMatrix & |
other | ) |
|
|
default |
◆ SparseMatrix() [6/6]
| ADOLC::Sparse::SparseMatrix::SparseMatrix |
( |
SparseMatrix && |
other | ) |
|
|
defaultnoexcept |
◆ clear()
| void ADOLC::Sparse::SparseMatrix::clear |
( |
| ) |
|
|
inline |
Remove all entries while keeping vector ownership.
◆ colIndex()
| unsigned int ADOLC::Sparse::SparseMatrix::colIndex |
( |
size_t |
idx | ) |
const |
|
inline |
Get the column index of one stored entry.
- Parameters
-
◆ empty()
| bool ADOLC::Sparse::SparseMatrix::empty |
( |
| ) |
const |
|
inline |
Check whether no entries are stored.
◆ entries() [1/2]
Get mutable access to the underlying entry storage.
◆ entries() [2/2]
| const storage_type & ADOLC::Sparse::SparseMatrix::entries |
( |
| ) |
const |
|
inline |
Get read-only access to the underlying entry storage.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ operator[]() [1/2]
| value_type & ADOLC::Sparse::SparseMatrix::operator[] |
( |
size_t |
idx | ) |
|
|
inline |
Mutable indexed access to one sparse entry.
- Parameters
-
◆ operator[]() [2/2]
| const value_type & ADOLC::Sparse::SparseMatrix::operator[] |
( |
size_t |
idx | ) |
const |
|
inline |
Read-only indexed access to one sparse entry.
- Parameters
-
◆ push_back()
Append one entry at the end of the sparse matrix.
- Parameters
-
◆ resize()
| void ADOLC::Sparse::SparseMatrix::resize |
( |
size_t |
size | ) |
|
|
inline |
Resize the number of stored entries.
- Parameters
-
| size | New number of coordinate-format entries. |
◆ rowIndex()
| unsigned int ADOLC::Sparse::SparseMatrix::rowIndex |
( |
size_t |
idx | ) |
const |
|
inline |
Get the row index of one stored entry.
- Parameters
-
◆ size()
| size_t ADOLC::Sparse::SparseMatrix::size |
( |
| ) |
const |
|
inline |
Get the number of stored nonzeros.
◆ value()
| double ADOLC::Sparse::SparseMatrix::value |
( |
size_t |
idx | ) |
const |
|
inline |
Get the numerical value of one stored entry.
- Parameters
-
The documentation for this class was generated from the following file: