![]() |
Eigen
3.4.0
|
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) |
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< Derived >::type | eval () const |
Index | innerSize () const |
bool | isVector () const |
template<typename OtherDerived > | |
const Product< Derived, OtherDerived, AliasFreeProduct > | operator* (const SparseMatrixBase< OtherDerived > &other) const |
Index | outerSize () const |
const SparseView< Derived > | pruned (const Scalar &reference=Scalar(0), const RealScalar &epsilon=NumTraits< Scalar >::dummy_precision()) const |
Index | rows () const |
Index | size () const |
SparseSymmetricPermutationProduct< Derived, Upper|Lower > | twistedBy (const PermutationMatrix< Dynamic, Dynamic, StorageIndex > &perm) const |
![]() | |
EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
Derived & | derived () |
const Derived & | derived () const |
EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
Additional Inherited Members | |
![]() | |
enum | { RowsAtCompileTime , ColsAtCompileTime , SizeAtCompileTime , MaxRowsAtCompileTime , MaxColsAtCompileTime , MaxSizeAtCompileTime , IsVectorAtCompileTime , NumDimensions , Flags , IsRowMajor , InnerSizeAtCompileTime } |
typedef internal::traits< Derived >::StorageIndex | StorageIndex |
typedef Scalar | value_type |
![]() | |
typedef Eigen::Index | Index |
The interface type of indices. | |
![]() | |
SparseCompressedBase () | |
|
inline |
Destructor
|
inline |
This insertion might be very costly if the number of nonzeros above i is large.
|
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.
|
inline |
|
inline |
Suppresses all nonzeros which are much smaller than reference under the tolerance epsilon
|
inline |
Resizes the sparse vector to newSize This method deletes all entries, thus leaving an empty sparse vector
|
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.
internal::traits< SparseVector< _Scalar, _Options, _Index > >::Scalar Eigen::SparseVector< _Scalar, _Options, _Index >::sum |
Overloaded for performance
|
inline |
Swaps the values of *this
and other. Overloaded for performance: this version performs a shallow swap by swapping pointers and attributes only.