a sparse vector class More...
#include <SparseVector.h>
Classes | |
class | InnerIterator |
Public Types | |
enum | { IsColVector = internal::traits<SparseVector>::IsColVector } |
enum | { Options = _Options } |
typedef SparseMatrixBase < SparseVector > | SparseBase |
Public Member Functions | |
CompressedStorage< Scalar, Index > & | _data () |
CompressedStorage< Scalar, Index > & | _data () const |
EIGEN_STRONG_INLINE Index | rows () const |
EIGEN_STRONG_INLINE Index | cols () const |
EIGEN_STRONG_INLINE Index | innerSize () const |
EIGEN_STRONG_INLINE Index | outerSize () const |
EIGEN_STRONG_INLINE Index | innerNonZeros (Index j) const |
EIGEN_STRONG_INLINE const Scalar * | _valuePtr () const |
EIGEN_STRONG_INLINE Scalar * | _valuePtr () |
EIGEN_STRONG_INLINE const Index * | _innerIndexPtr () const |
EIGEN_STRONG_INLINE Index * | _innerIndexPtr () |
Scalar | coeff (Index row, Index col) const |
Scalar | coeff (Index i) const |
Scalar & | coeffRef (Index row, Index col) |
Scalar & | coeffRef (Index i) |
void | setZero () |
Index | nonZeros () const |
void | startVec (Index outer) |
Scalar & | insertBackByOuterInner (Index outer, Index inner) |
Scalar & | insertBack (Index i) |
Scalar & | insert (Index row, Index col) |
Scalar & | insert (Index i) |
void | reserve (Index reserveSize) |
void | finalize () |
void | prune (Scalar reference, RealScalar epsilon=NumTraits< RealScalar >::dummy_precision()) |
void | resize (Index rows, Index cols) |
void | resize (Index newSize) |
void | resizeNonZeros (Index size) |
SparseVector () | |
SparseVector (Index size) | |
SparseVector (Index rows, Index cols) | |
template<typename OtherDerived > | |
SparseVector (const MatrixBase< OtherDerived > &other) | |
template<typename OtherDerived > | |
SparseVector (const SparseMatrixBase< OtherDerived > &other) | |
SparseVector (const SparseVector &other) | |
void | swap (SparseVector &other) |
SparseVector & | operator= (const SparseVector &other) |
template<typename OtherDerived > | |
SparseVector & | operator= (const SparseMatrixBase< OtherDerived > &other) |
template<typename Lhs , typename Rhs > | |
SparseVector & | operator= (const SparseSparseProduct< Lhs, Rhs > &product) |
~SparseVector () | |
Scalar | sum () const |
EIGEN_DEPRECATED void | startFill (Index reserve) |
EIGEN_DEPRECATED Scalar & | fill (Index r, Index c) |
EIGEN_DEPRECATED Scalar & | fill (Index i) |
EIGEN_DEPRECATED Scalar & | fillrand (Index r, Index c) |
EIGEN_DEPRECATED Scalar & | fillrand (Index i) |
EIGEN_DEPRECATED void | endFill () |
Public Attributes | |
CompressedStorage< Scalar, Index > | m_data |
Index | m_size |
Friends | |
std::ostream & | operator<< (std::ostream &s, const SparseVector &m) |
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 TopicCustomizingEigen by defining the preprocessor symbol EIGEN_SPARSEVECTOR_PLUGIN
.
typedef SparseMatrixBase<SparseVector> SparseVector< _Scalar, _Options, _Index >::SparseBase |
SparseVector< _Scalar, _Options, _Index >::SparseVector | ( | ) | [inline] |
SparseVector< _Scalar, _Options, _Index >::SparseVector | ( | Index | size | ) | [inline] |
SparseVector< _Scalar, _Options, _Index >::SparseVector | ( | Index | rows, | |
Index | cols | |||
) | [inline] |
SparseVector< _Scalar, _Options, _Index >::SparseVector | ( | const MatrixBase< OtherDerived > & | other | ) | [inline] |
SparseVector< _Scalar, _Options, _Index >::SparseVector | ( | const SparseMatrixBase< OtherDerived > & | other | ) | [inline] |
SparseVector< _Scalar, _Options, _Index >::SparseVector | ( | const SparseVector< _Scalar, _Options, _Index > & | other | ) | [inline] |
SparseVector< _Scalar, _Options, _Index >::~SparseVector | ( | ) | [inline] |
Destructor
CompressedStorage<Scalar,Index>& SparseVector< _Scalar, _Options, _Index >::_data | ( | ) | [inline] |
CompressedStorage<Scalar,Index>& SparseVector< _Scalar, _Options, _Index >::_data | ( | ) | const [inline] |
EIGEN_STRONG_INLINE const Index* SparseVector< _Scalar, _Options, _Index >::_innerIndexPtr | ( | ) | const [inline] |
EIGEN_STRONG_INLINE Index* SparseVector< _Scalar, _Options, _Index >::_innerIndexPtr | ( | ) | [inline] |
EIGEN_STRONG_INLINE const Scalar* SparseVector< _Scalar, _Options, _Index >::_valuePtr | ( | ) | const [inline] |
EIGEN_STRONG_INLINE Scalar* SparseVector< _Scalar, _Options, _Index >::_valuePtr | ( | ) | [inline] |
Scalar SparseVector< _Scalar, _Options, _Index >::coeff | ( | Index | row, | |
Index | col | |||
) | const [inline] |
Scalar SparseVector< _Scalar, _Options, _Index >::coeff | ( | Index | i | ) | const [inline] |
Scalar& SparseVector< _Scalar, _Options, _Index >::coeffRef | ( | Index | row, | |
Index | col | |||
) | [inline] |
Scalar& SparseVector< _Scalar, _Options, _Index >::coeffRef | ( | Index | i | ) | [inline] |
This insertion might be very costly if the number of nonzeros above i is large.
EIGEN_STRONG_INLINE Index SparseVector< _Scalar, _Options, _Index >::cols | ( | void | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.
EIGEN_DEPRECATED void SparseVector< _Scalar, _Options, _Index >::endFill | ( | ) | [inline] |
EIGEN_DEPRECATED Scalar& SparseVector< _Scalar, _Options, _Index >::fill | ( | Index | r, | |
Index | c | |||
) | [inline] |
EIGEN_DEPRECATED Scalar& SparseVector< _Scalar, _Options, _Index >::fill | ( | Index | i | ) | [inline] |
EIGEN_DEPRECATED Scalar& SparseVector< _Scalar, _Options, _Index >::fillrand | ( | Index | r, | |
Index | c | |||
) | [inline] |
EIGEN_DEPRECATED Scalar& SparseVector< _Scalar, _Options, _Index >::fillrand | ( | Index | i | ) | [inline] |
void SparseVector< _Scalar, _Options, _Index >::finalize | ( | ) | [inline] |
EIGEN_STRONG_INLINE Index SparseVector< _Scalar, _Options, _Index >::innerNonZeros | ( | Index | j | ) | const [inline] |
EIGEN_STRONG_INLINE Index SparseVector< _Scalar, _Options, _Index >::innerSize | ( | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.
Scalar& SparseVector< _Scalar, _Options, _Index >::insert | ( | Index | row, | |
Index | col | |||
) | [inline] |
Scalar& SparseVector< _Scalar, _Options, _Index >::insert | ( | Index | i | ) | [inline] |
Scalar& SparseVector< _Scalar, _Options, _Index >::insertBack | ( | Index | i | ) | [inline] |
Scalar& SparseVector< _Scalar, _Options, _Index >::insertBackByOuterInner | ( | Index | outer, | |
Index | inner | |||
) | [inline] |
Index SparseVector< _Scalar, _Options, _Index >::nonZeros | ( | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.
SparseVector& SparseVector< _Scalar, _Options, _Index >::operator= | ( | const SparseSparseProduct< Lhs, Rhs > & | product | ) | [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.
SparseVector& SparseVector< _Scalar, _Options, _Index >::operator= | ( | const SparseVector< _Scalar, _Options, _Index > & | other | ) | [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.
SparseVector& SparseVector< _Scalar, _Options, _Index >::operator= | ( | const SparseMatrixBase< OtherDerived > & | other | ) | [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.
EIGEN_STRONG_INLINE Index SparseVector< _Scalar, _Options, _Index >::outerSize | ( | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.
void SparseVector< _Scalar, _Options, _Index >::prune | ( | Scalar | reference, | |
RealScalar | epsilon = NumTraits<RealScalar>::dummy_precision() | |||
) | [inline] |
void SparseVector< _Scalar, _Options, _Index >::reserve | ( | Index | reserveSize | ) | [inline] |
void SparseVector< _Scalar, _Options, _Index >::resize | ( | Index | newSize | ) | [inline] |
void SparseVector< _Scalar, _Options, _Index >::resize | ( | Index | rows, | |
Index | cols | |||
) | [inline] |
void SparseVector< _Scalar, _Options, _Index >::resizeNonZeros | ( | Index | size | ) | [inline] |
EIGEN_STRONG_INLINE Index SparseVector< _Scalar, _Options, _Index >::rows | ( | void | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.
void SparseVector< _Scalar, _Options, _Index >::setZero | ( | ) | [inline] |
EIGEN_DEPRECATED void SparseVector< _Scalar, _Options, _Index >::startFill | ( | Index | reserve | ) | [inline] |
void SparseVector< _Scalar, _Options, _Index >::startVec | ( | Index | outer | ) | [inline] |
internal::traits< SparseVector< _Scalar, _Options, _Index > >::Scalar SparseVector< _Scalar, _Options, _Index >::sum | ( | ) | const |
Overloaded for performance
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.
void SparseVector< _Scalar, _Options, _Index >::swap | ( | SparseVector< _Scalar, _Options, _Index > & | other | ) | [inline] |
std::ostream& operator<< | ( | std::ostream & | s, | |
const SparseVector< _Scalar, _Options, _Index > & | m | |||
) | [friend] |
CompressedStorage<Scalar,Index> SparseVector< _Scalar, _Options, _Index >::m_data |
Index SparseVector< _Scalar, _Options, _Index >::m_size |