template<typename Scalar_, int Options_, typename StorageIndex_>
class Eigen::SparseVector< Scalar_, Options_, StorageIndex_ >
a sparse vector class
- Template Parameters
-
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
.
|
Scalar & | coeffRef (Index i) |
|
void | conservativeResize (Index newSize) |
|
Index | nonZeros () const |
|
Index | prune (const Scalar &reference, const RealScalar &epsilon=NumTraits< RealScalar >::dummy_precision()) |
|
template<class F > |
Index | prune (F &&keep_predicate) |
| Prunes the entries of the vector based on a predicate More...
|
|
void | resize (Index newSize) |
|
void | resize (Index rows, Index cols) |
|
Scalar | sum () const |
|
void | swap (SparseVector &other) |
|
| ~SparseVector () |
|
Map< Array< Scalar, Dynamic, 1 > > | coeffs () |
|
const Map< const Array< Scalar, Dynamic, 1 > > | coeffs () const |
|
StorageIndex * | innerIndexPtr () |
|
const StorageIndex * | innerIndexPtr () const |
|
StorageIndex * | innerNonZeroPtr () |
|
const StorageIndex * | innerNonZeroPtr () const |
|
bool | isCompressed () const |
|
Index | nonZeros () const |
|
StorageIndex * | outerIndexPtr () |
|
const StorageIndex * | outerIndexPtr () const |
|
Scalar * | valuePtr () |
|
const Scalar * | valuePtr () const |
|
Index | cols () const |
|
const internal::eval< SparseVector< Scalar_, Options_, StorageIndex_ > >::type | eval () const |
|
Index | innerSize () const |
|
bool | isVector () const |
|
const Product< SparseVector< Scalar_, Options_, StorageIndex_ >, OtherDerived, AliasFreeProduct > | operator* (const SparseMatrixBase< OtherDerived > &other) const |
|
Index | outerSize () const |
|
const SparseView< SparseVector< Scalar_, Options_, StorageIndex_ > > | pruned (const Scalar &reference=Scalar(0), const RealScalar &epsilon=NumTraits< Scalar >::dummy_precision()) const |
|
Index | rows () const |
|
Index | size () const |
|
SparseSymmetricPermutationProduct< SparseVector< Scalar_, Options_, StorageIndex_ >, Upper|Lower > | twistedBy (const PermutationMatrix< Dynamic, Dynamic, StorageIndex > &perm) const |
|
EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
|
SparseVector< Scalar_, Options_, StorageIndex_ > & | derived () |
|
const SparseVector< Scalar_, Options_, StorageIndex_ > & | derived () const |
|
EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
|
EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
|
template<typename Scalar_ , int Options_, typename StorageIndex_ >
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.
- See also
- reserve(), setZero()
template<typename Scalar_ , int Options_, typename StorageIndex_ >
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.
- See also
- resize(Index)