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.
Definition at line 61 of file SparseVector.h.
#include <src/Sparse/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) |
| ~SparseVector () | |
| Destructor. | |
| Scalar | sum () const |
| Overloaded for performance. | |
| 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) |
| typedef SparseMatrixBase<SparseVector> SparseVector< _Scalar, _Options, _Index >::SparseBase |
Definition at line 73 of file SparseVector.h.
| anonymous enum |
Definition at line 74 of file SparseVector.h.
| anonymous enum |
Definition at line 76 of file SparseVector.h.
| SparseVector< _Scalar, _Options, _Index >::SparseVector | ( | ) | [inline] |
Definition at line 200 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::resize().
| SparseVector< _Scalar, _Options, _Index >::SparseVector | ( | Index | size ) | [inline] |
Definition at line 202 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::resize().
| SparseVector< _Scalar, _Options, _Index >::SparseVector | ( | Index | rows, |
| Index | cols | ||
| ) | [inline] |
Definition at line 204 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::resize().
| SparseVector< _Scalar, _Options, _Index >::SparseVector | ( | const MatrixBase< OtherDerived > & | other ) | [inline] |
Definition at line 207 of file SparseVector.h.
| SparseVector< _Scalar, _Options, _Index >::SparseVector | ( | const SparseMatrixBase< OtherDerived > & | other ) | [inline] |
Definition at line 214 of file SparseVector.h.
References EigenBase< Derived >::derived().
| SparseVector< _Scalar, _Options, _Index >::SparseVector | ( | const SparseVector< _Scalar, _Options, _Index > & | other ) | [inline] |
Definition at line 220 of file SparseVector.h.
References EigenBase< Derived >::derived().
| SparseVector< _Scalar, _Options, _Index >::~SparseVector | ( | ) | [inline] |
Destructor.
Definition at line 344 of file SparseVector.h.
| CompressedStorage<Scalar,Index>& SparseVector< _Scalar, _Options, _Index >::_data | ( | ) | [inline] |
Definition at line 83 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::m_data.
| CompressedStorage<Scalar,Index>& SparseVector< _Scalar, _Options, _Index >::_data | ( | ) | const [inline] |
Definition at line 84 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::m_data.
| EIGEN_STRONG_INLINE const Index* SparseVector< _Scalar, _Options, _Index >::_innerIndexPtr | ( | ) | const [inline] |
Definition at line 97 of file SparseVector.h.
References CompressedStorage< _Scalar, _Index >::index(), and SparseVector< _Scalar, _Options, _Index >::m_data.
| EIGEN_STRONG_INLINE Index* SparseVector< _Scalar, _Options, _Index >::_innerIndexPtr | ( | ) | [inline] |
Definition at line 98 of file SparseVector.h.
References CompressedStorage< _Scalar, _Index >::index(), and SparseVector< _Scalar, _Options, _Index >::m_data.
| EIGEN_STRONG_INLINE const Scalar* SparseVector< _Scalar, _Options, _Index >::_valuePtr | ( | ) | const [inline] |
Definition at line 94 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::m_data, and CompressedStorage< _Scalar, _Index >::value().
| EIGEN_STRONG_INLINE Scalar* SparseVector< _Scalar, _Options, _Index >::_valuePtr | ( | ) | [inline] |
Definition at line 95 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::m_data, and CompressedStorage< _Scalar, _Index >::value().
| Scalar SparseVector< _Scalar, _Options, _Index >::coeff | ( | Index | row, |
| Index | col | ||
| ) | const [inline] |
Definition at line 100 of file SparseVector.h.
References eigen_assert, and SparseVector< _Scalar, _Options, _Index >::IsColVector.
Referenced by SparseVector< _Scalar, _Options, _Index >::coeffRef().
| Scalar SparseVector< _Scalar, _Options, _Index >::coeff | ( | Index | i ) | const [inline] |
Definition at line 105 of file SparseVector.h.
References CompressedStorage< _Scalar, _Index >::at(), and SparseVector< _Scalar, _Options, _Index >::m_data.
| Scalar& SparseVector< _Scalar, _Options, _Index >::coeffRef | ( | Index | row, |
| Index | col | ||
| ) | [inline] |
Definition at line 107 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::coeff(), eigen_assert, and SparseVector< _Scalar, _Options, _Index >::IsColVector.
| Scalar& SparseVector< _Scalar, _Options, _Index >::coeffRef | ( | Index | i ) | [inline] |
This insertion might be very costly if the number of nonzeros above i is large.
Definition at line 119 of file SparseVector.h.
References CompressedStorage< _Scalar, _Index >::atWithInsertion(), and SparseVector< _Scalar, _Options, _Index >::m_data.
| EIGEN_STRONG_INLINE Index SparseVector< _Scalar, _Options, _Index >::cols | ( | void | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.
Definition at line 89 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::IsColVector, and SparseVector< _Scalar, _Options, _Index >::m_size.
| EIGEN_DEPRECATED void SparseVector< _Scalar, _Options, _Index >::endFill | ( | ) | [inline] |
Definition at line 386 of file SparseVector.h.
| EIGEN_DEPRECATED Scalar& SparseVector< _Scalar, _Options, _Index >::fill | ( | Index | i ) | [inline] |
| EIGEN_DEPRECATED Scalar& SparseVector< _Scalar, _Options, _Index >::fill | ( | Index | r, |
| Index | c | ||
| ) | [inline] |
Definition at line 359 of file SparseVector.h.
References eigen_assert, and SparseVector< _Scalar, _Options, _Index >::IsColVector.
| EIGEN_DEPRECATED Scalar& SparseVector< _Scalar, _Options, _Index >::fillrand | ( | Index | r, |
| Index | c | ||
| ) | [inline] |
Definition at line 373 of file SparseVector.h.
References eigen_assert, and SparseVector< _Scalar, _Options, _Index >::IsColVector.
| EIGEN_DEPRECATED Scalar& SparseVector< _Scalar, _Options, _Index >::fillrand | ( | Index | i ) | [inline] |
Definition at line 380 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::insert().
| void SparseVector< _Scalar, _Options, _Index >::finalize | ( | ) | [inline] |
Definition at line 179 of file SparseVector.h.
| EIGEN_STRONG_INLINE Index SparseVector< _Scalar, _Options, _Index >::innerNonZeros | ( | Index | j ) | const [inline] |
Definition at line 92 of file SparseVector.h.
References eigen_assert, and SparseVector< _Scalar, _Options, _Index >::m_size.
| EIGEN_STRONG_INLINE Index SparseVector< _Scalar, _Options, _Index >::innerSize | ( | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.
Definition at line 90 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::m_size.
| Scalar& SparseVector< _Scalar, _Options, _Index >::insert | ( | Index | row, |
| Index | col | ||
| ) | [inline] |
Definition at line 149 of file SparseVector.h.
References SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >::col(), eigen_assert, SparseVector< _Scalar, _Options, _Index >::IsColVector, and SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >::row().
Referenced by SparseVector< _Scalar, _Options, _Index >::fillrand().
| Scalar& SparseVector< _Scalar, _Options, _Index >::insert | ( | Index | i ) | [inline] |
Definition at line 156 of file SparseVector.h.
References CompressedStorage< _Scalar, _Index >::index(), SparseVector< _Scalar, _Options, _Index >::m_data, CompressedStorage< _Scalar, _Index >::resize(), CompressedStorage< _Scalar, _Index >::size(), and CompressedStorage< _Scalar, _Index >::value().
| Scalar& SparseVector< _Scalar, _Options, _Index >::insertBack | ( | Index | i ) | [inline] |
Definition at line 143 of file SparseVector.h.
References CompressedStorage< _Scalar, _Index >::append(), SparseVector< _Scalar, _Options, _Index >::m_data, CompressedStorage< _Scalar, _Index >::size(), and CompressedStorage< _Scalar, _Index >::value().
Referenced by SparseVector< _Scalar, _Options, _Index >::insertBackByOuterInner().
| Scalar& SparseVector< _Scalar, _Options, _Index >::insertBackByOuterInner | ( | Index | outer, |
| Index | inner | ||
| ) | [inline] |
Definition at line 138 of file SparseVector.h.
References eigen_assert, and SparseVector< _Scalar, _Options, _Index >::insertBack().
| Index SparseVector< _Scalar, _Options, _Index >::nonZeros | ( | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.
Definition at line 131 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::m_data, and CompressedStorage< _Scalar, _Index >::size().
| SparseVector& SparseVector< _Scalar, _Options, _Index >::operator= | ( | const SparseMatrixBase< OtherDerived > & | other ) | [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.
Definition at line 247 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::operator=(), SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >::RowsAtCompileTime, and SparseMatrixBase< Derived >::transpose().
| SparseVector& SparseVector< _Scalar, _Options, _Index >::operator= | ( | const SparseVector< _Scalar, _Options, _Index > & | other ) | [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.
Definition at line 232 of file SparseVector.h.
References EigenBase< Derived >::const_cast_derived(), SparseMatrixBase< Derived >::isRValue(), SparseVector< _Scalar, _Options, _Index >::m_data, SparseVector< _Scalar, _Options, _Index >::resize(), SparseMatrixBase< Derived >::size(), and SparseVector< _Scalar, _Options, _Index >::swap().
Referenced by SparseVector< _Scalar, _Options, _Index >::operator=().
| EIGEN_STRONG_INLINE Index SparseVector< _Scalar, _Options, _Index >::outerSize | ( | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.
Definition at line 91 of file SparseVector.h.
| void SparseVector< _Scalar, _Options, _Index >::prune | ( | Scalar | reference, |
| RealScalar | epsilon = NumTraits<RealScalar>::dummy_precision() |
||
| ) | [inline] |
Definition at line 181 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::m_data, and CompressedStorage< _Scalar, _Index >::prune().
| void SparseVector< _Scalar, _Options, _Index >::reserve | ( | Index | reserveSize ) | [inline] |
Definition at line 176 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::m_data, and CompressedStorage< _Scalar, _Index >::reserve().
| void SparseVector< _Scalar, _Options, _Index >::resize | ( | Index | newSize ) | [inline] |
Definition at line 192 of file SparseVector.h.
References CompressedStorage< _Scalar, _Index >::clear(), SparseVector< _Scalar, _Options, _Index >::m_data, and SparseVector< _Scalar, _Options, _Index >::m_size.
| void SparseVector< _Scalar, _Options, _Index >::resize | ( | Index | rows, |
| Index | cols | ||
| ) | [inline] |
Definition at line 186 of file SparseVector.h.
References eigen_assert, and SparseVector< _Scalar, _Options, _Index >::IsColVector.
Referenced by SparseVector< _Scalar, _Options, _Index >::operator=(), and SparseVector< _Scalar, _Options, _Index >::SparseVector().
| void SparseVector< _Scalar, _Options, _Index >::resizeNonZeros | ( | Index | size ) | [inline] |
Definition at line 198 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::m_data, and CompressedStorage< _Scalar, _Index >::resize().
| EIGEN_STRONG_INLINE Index SparseVector< _Scalar, _Options, _Index >::rows | ( | void | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.
Definition at line 88 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::IsColVector, and SparseVector< _Scalar, _Options, _Index >::m_size.
| void SparseVector< _Scalar, _Options, _Index >::setZero | ( | ) | [inline] |
Definition at line 128 of file SparseVector.h.
References CompressedStorage< _Scalar, _Index >::clear(), and SparseVector< _Scalar, _Options, _Index >::m_data.
Referenced by SparseVector< _Scalar, _Options, _Index >::startFill().
| EIGEN_DEPRECATED void SparseVector< _Scalar, _Options, _Index >::startFill | ( | Index | reserve ) | [inline] |
Definition at line 352 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::m_data, CompressedStorage< _Scalar, _Index >::reserve(), and SparseVector< _Scalar, _Options, _Index >::setZero().
| void SparseVector< _Scalar, _Options, _Index >::startVec | ( | Index | outer ) | [inline] |
Definition at line 133 of file SparseVector.h.
References eigen_assert.
| internal::traits< SparseVector< _Scalar, _Options, _Index > >::Scalar SparseVector< _Scalar, _Options, _Index >::sum | ( | ) | const |
Overloaded for performance.
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.
Definition at line 50 of file SparseRedux.h.
References eigen_assert, PlainObjectBase< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Map(), and mrpt::math::sum().
| void SparseVector< _Scalar, _Options, _Index >::swap | ( | SparseVector< _Scalar, _Options, _Index > & | other ) | [inline] |
Definition at line 226 of file SparseVector.h.
References SparseVector< _Scalar, _Options, _Index >::m_data, SparseVector< _Scalar, _Options, _Index >::m_size, and CompressedStorage< _Scalar, _Index >::swap().
Referenced by SparseVector< _Scalar, _Options, _Index >::operator=().
| std::ostream& operator<< | ( | std::ostream & | s, |
| const SparseVector< _Scalar, _Options, _Index > & | m | ||
| ) | [friend] |
Definition at line 313 of file SparseVector.h.
| CompressedStorage<Scalar,Index> SparseVector< _Scalar, _Options, _Index >::m_data |
Definition at line 80 of file SparseVector.h.
Referenced by SparseVector< _Scalar, _Options, _Index >::_data(), SparseVector< _Scalar, _Options, _Index >::_innerIndexPtr(), SparseVector< _Scalar, _Options, _Index >::_valuePtr(), SparseVector< _Scalar, _Options, _Index >::coeff(), SparseVector< _Scalar, _Options, _Index >::coeffRef(), SparseVector< _Scalar, _Options, _Index >::fill(), SparseVector< _Scalar, _Options, _Index >::InnerIterator::index(), SparseVector< _Scalar, _Options, _Index >::insert(), SparseVector< _Scalar, _Options, _Index >::insertBack(), SparseVector< _Scalar, _Options, _Index >::nonZeros(), SparseVector< _Scalar, _Options, _Index >::operator=(), SparseVector< _Scalar, _Options, _Index >::prune(), SparseVector< _Scalar, _Options, _Index >::reserve(), SparseVector< _Scalar, _Options, _Index >::resize(), SparseVector< _Scalar, _Options, _Index >::resizeNonZeros(), SparseVector< _Scalar, _Options, _Index >::setZero(), SparseVector< _Scalar, _Options, _Index >::startFill(), SparseVector< _Scalar, _Options, _Index >::swap(), SparseVector< _Scalar, _Options, _Index >::InnerIterator::value(), and SparseVector< _Scalar, _Options, _Index >::InnerIterator::valueRef().
| Index SparseVector< _Scalar, _Options, _Index >::m_size |
Definition at line 81 of file SparseVector.h.
Referenced by SparseVector< _Scalar, _Options, _Index >::cols(), SparseVector< _Scalar, _Options, _Index >::innerNonZeros(), SparseVector< _Scalar, _Options, _Index >::innerSize(), SparseVector< _Scalar, _Options, _Index >::resize(), SparseVector< _Scalar, _Options, _Index >::rows(), and SparseVector< _Scalar, _Options, _Index >::swap().
| Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011 |