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 |
|
void | prune (const Scalar &reference, const RealScalar &epsilon=NumTraits< RealScalar >::dummy_precision()) |
|
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 |
|
InnerVectorReturnType | innerVector (Index outer) |
|
const ConstInnerVectorReturnType | innerVector (Index outer) const |
|
InnerVectorsReturnType | innerVectors (Index outerStart, Index outerSize) |
|
const ConstInnerVectorsReturnType | innerVectors (Index outerStart, Index outerSize) 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 |
|
Index | cols () const |
|
SparseVector< _Scalar, _Options, _StorageIndex > & | derived () |
|
const SparseVector< _Scalar, _Options, _StorageIndex > & | derived () const |
|
Index | rows () const |
|
Index | size () const |
|
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()