![]() |
Eigen
3.3.3
|
a sparse vector class
_Scalar | the scalar type, i.e. the type of the coefficients |
See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme.
This class can be extended with the help of the plugin mechanism described on the page Extending MatrixBase (and other classes) by defining the preprocessor symbol EIGEN_SPARSEVECTOR_PLUGIN
.
Public Member Functions | |
Scalar & | coeffRef (Index i) |
Index | cols () const |
void | conservativeResize (Index newSize) |
const StorageIndex * | innerIndexPtr () const |
StorageIndex * | innerIndexPtr () |
const StorageIndex * | innerNonZeroPtr () const |
StorageIndex * | innerNonZeroPtr () |
Index | innerSize () const |
Index | nonZeros () const |
const StorageIndex * | outerIndexPtr () const |
StorageIndex * | outerIndexPtr () |
Index | outerSize () const |
void | prune (const Scalar &reference, const RealScalar &epsilon=NumTraits< RealScalar >::dummy_precision()) |
void | resize (Index rows, Index cols) |
void | resize (Index newSize) |
Index | rows () const |
Scalar | sum () const |
void | swap (SparseVector &other) |
const Scalar * | valuePtr () const |
Scalar * | valuePtr () |
~SparseVector () |
Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::~SparseVector | ( | ) | [inline] |
Destructor
Scalar& Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::coeffRef | ( | Index | i | ) | [inline] |
This insertion might be very costly if the number of nonzeros above i is large.
Index Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::cols | ( | void | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< SparseVector< _Scalar, _Options, _StorageIndex > >.
void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::conservativeResize | ( | Index | newSize | ) | [inline] |
Resizes the sparse vector to newSize, while leaving old values untouched.
If the size of the vector is decreased, then the storage of the out-of bounds coefficients is kept and reserved. Call .data().squeeze() to free extra memory.
const StorageIndex* Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::innerIndexPtr | ( | ) | const [inline] |
Reimplemented from Eigen::SparseCompressedBase< SparseVector< _Scalar, _Options, _StorageIndex > >.
StorageIndex* Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::innerIndexPtr | ( | ) | [inline] |
Reimplemented from Eigen::SparseCompressedBase< SparseVector< _Scalar, _Options, _StorageIndex > >.
const StorageIndex* Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::innerNonZeroPtr | ( | ) | const [inline] |
Reimplemented from Eigen::SparseCompressedBase< SparseVector< _Scalar, _Options, _StorageIndex > >.
StorageIndex* Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::innerNonZeroPtr | ( | ) | [inline] |
Reimplemented from Eigen::SparseCompressedBase< SparseVector< _Scalar, _Options, _StorageIndex > >.
Index Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::innerSize | ( | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< SparseVector< _Scalar, _Options, _StorageIndex > >.
Index Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::nonZeros | ( | ) | const [inline] |
Reimplemented from Eigen::SparseCompressedBase< SparseVector< _Scalar, _Options, _StorageIndex > >.
const StorageIndex* Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::outerIndexPtr | ( | ) | const [inline] |
Reimplemented from Eigen::SparseCompressedBase< SparseVector< _Scalar, _Options, _StorageIndex > >.
StorageIndex* Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::outerIndexPtr | ( | ) | [inline] |
Reimplemented from Eigen::SparseCompressedBase< SparseVector< _Scalar, _Options, _StorageIndex > >.
Index Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::outerSize | ( | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< SparseVector< _Scalar, _Options, _StorageIndex > >.
void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::prune | ( | const Scalar & | reference, |
const RealScalar & | epsilon = NumTraits<RealScalar>::dummy_precision() |
||
) | [inline] |
Suppresses all nonzeros which are much smaller than reference under the tolerence epsilon
void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::resize | ( | Index | rows, |
Index | cols | ||
) | [inline] |
Resizes the sparse vector to rows x cols
This method is provided for compatibility with matrices. For a column vector, cols must be equal to 1. For a row vector, rows must be equal to 1.
void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::resize | ( | Index | newSize | ) | [inline] |
Resizes the sparse vector to newSize This method deletes all entries, thus leaving an empty sparse vector
Index Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::rows | ( | void | ) | const [inline] |
Reimplemented from Eigen::SparseMatrixBase< SparseVector< _Scalar, _Options, _StorageIndex > >.
internal::traits< SparseVector< _Scalar, _Options, _Index > >::Scalar Eigen::SparseVector< _Scalar, _Options, _Index >::sum | ( | ) | const |
Overloaded for performance
Reimplemented from Eigen::SparseMatrixBase< SparseVector< _Scalar, _Options, _StorageIndex > >.
void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::swap | ( | SparseVector< _Scalar, _Options, _StorageIndex > & | other | ) | [inline] |
Swaps the values of *this
and other. Overloaded for performance: this version performs a shallow swap by swaping pointers and attributes only.
const Scalar* Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::valuePtr | ( | ) | const [inline] |
Reimplemented from Eigen::SparseCompressedBase< SparseVector< _Scalar, _Options, _StorageIndex > >.
Scalar* Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::valuePtr | ( | ) | [inline] |
Reimplemented from Eigen::SparseCompressedBase< SparseVector< _Scalar, _Options, _StorageIndex > >.