a sparse vector class More...
#include <SparseVector.h>
Classes | |
class | InnerIterator |
Public Types | |
enum | { IsColVector = ei_traits<SparseVector>::IsColVector } |
typedef SparseMatrixBase < SparseVector > | SparseBase |
Public Member Functions | |
CompressedStorage< Scalar > & | _data () const |
CompressedStorage< Scalar > & | _data () |
EIGEN_STRONG_INLINE int * | _innerIndexPtr () |
EIGEN_STRONG_INLINE const int * | _innerIndexPtr () const |
EIGEN_STRONG_INLINE Scalar * | _valuePtr () |
EIGEN_STRONG_INLINE const Scalar * | _valuePtr () const |
Scalar | coeff (int i) const |
Scalar | coeff (int row, int col) const |
Scalar & | coeffRef (int i) |
Scalar & | coeffRef (int row, int col) |
EIGEN_STRONG_INLINE int | cols () const |
void | endFill () |
Scalar & | fill (int i) |
Scalar & | fill (int r, int c) |
Scalar & | fillrand (int i) |
Scalar & | fillrand (int r, int c) |
EIGEN_STRONG_INLINE int | innerNonZeros (int j) const |
EIGEN_STRONG_INLINE int | innerSize () const |
int | nonZeros () const |
template<typename OtherDerived > | |
SparseVector & | operator= (const SparseMatrixBase< OtherDerived > &other) |
SparseVector & | operator= (const SparseVector &other) |
EIGEN_STRONG_INLINE int | outerSize () const |
void | prune (Scalar reference, RealScalar epsilon=precision< RealScalar >()) |
void | reserve (int reserveSize) |
void | resize (int newSize) |
void | resize (int rows, int cols) |
void | resizeNonZeros (int size) |
EIGEN_STRONG_INLINE int | rows () const |
void | setZero () |
SparseVector (const SparseVector &other) | |
template<typename OtherDerived > | |
SparseVector (const SparseMatrixBase< OtherDerived > &other) | |
template<typename OtherDerived > | |
SparseVector (const MatrixBase< OtherDerived > &other) | |
SparseVector (int rows, int cols) | |
SparseVector (int size) | |
SparseVector () | |
void | startFill (int reserve) |
void | swap (SparseVector &other) |
~SparseVector () | |
Public Attributes | |
CompressedStorage< Scalar > | m_data |
int | 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.
Definition at line 55 of file SparseVector.h.
typedef SparseMatrixBase<SparseVector> SparseVector< _Scalar, _Flags >::SparseBase |
Definition at line 67 of file SparseVector.h.
anonymous enum |
Definition at line 68 of file SparseVector.h.
SparseVector< _Scalar, _Flags >::SparseVector | ( | ) | [inline] |
Definition at line 193 of file SparseVector.h.
SparseVector< _Scalar, _Flags >::SparseVector | ( | int | size | ) | [inline] |
Definition at line 195 of file SparseVector.h.
SparseVector< _Scalar, _Flags >::SparseVector | ( | int | rows, | |
int | cols | |||
) | [inline] |
Definition at line 197 of file SparseVector.h.
SparseVector< _Scalar, _Flags >::SparseVector | ( | const MatrixBase< OtherDerived > & | other | ) | [inline] |
Definition at line 200 of file SparseVector.h.
SparseVector< _Scalar, _Flags >::SparseVector | ( | const SparseMatrixBase< OtherDerived > & | other | ) | [inline] |
Definition at line 207 of file SparseVector.h.
SparseVector< _Scalar, _Flags >::SparseVector | ( | const SparseVector< _Scalar, _Flags > & | other | ) | [inline] |
Definition at line 213 of file SparseVector.h.
SparseVector< _Scalar, _Flags >::~SparseVector | ( | ) | [inline] |
Destructor
Definition at line 326 of file SparseVector.h.
CompressedStorage<Scalar>& SparseVector< _Scalar, _Flags >::_data | ( | ) | const [inline] |
Definition at line 74 of file SparseVector.h.
CompressedStorage<Scalar>& SparseVector< _Scalar, _Flags >::_data | ( | ) | [inline] |
Definition at line 73 of file SparseVector.h.
EIGEN_STRONG_INLINE int* SparseVector< _Scalar, _Flags >::_innerIndexPtr | ( | ) | [inline] |
Definition at line 88 of file SparseVector.h.
EIGEN_STRONG_INLINE const int* SparseVector< _Scalar, _Flags >::_innerIndexPtr | ( | ) | const [inline] |
Definition at line 87 of file SparseVector.h.
EIGEN_STRONG_INLINE Scalar* SparseVector< _Scalar, _Flags >::_valuePtr | ( | ) | [inline] |
Definition at line 85 of file SparseVector.h.
EIGEN_STRONG_INLINE const Scalar* SparseVector< _Scalar, _Flags >::_valuePtr | ( | ) | const [inline] |
Definition at line 84 of file SparseVector.h.
Scalar SparseVector< _Scalar, _Flags >::coeff | ( | int | i | ) | const [inline] |
Definition at line 95 of file SparseVector.h.
Scalar SparseVector< _Scalar, _Flags >::coeff | ( | int | row, | |
int | col | |||
) | const [inline] |
Definition at line 90 of file SparseVector.h.
Scalar& SparseVector< _Scalar, _Flags >::coeffRef | ( | int | i | ) | [inline] |
This insertion might be very costly if the number of nonzeros above i is large.
Definition at line 109 of file SparseVector.h.
Scalar& SparseVector< _Scalar, _Flags >::coeffRef | ( | int | row, | |
int | col | |||
) | [inline] |
Definition at line 97 of file SparseVector.h.
EIGEN_STRONG_INLINE int SparseVector< _Scalar, _Flags >::cols | ( | void | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Flags > >.
Definition at line 79 of file SparseVector.h.
void SparseVector< _Scalar, _Flags >::endFill | ( | ) | [inline] |
Definition at line 172 of file SparseVector.h.
Scalar& SparseVector< _Scalar, _Flags >::fill | ( | int | i | ) | [inline] |
Definition at line 141 of file SparseVector.h.
Scalar& SparseVector< _Scalar, _Flags >::fill | ( | int | r, | |
int | c | |||
) | [inline] |
Definition at line 135 of file SparseVector.h.
Scalar& SparseVector< _Scalar, _Flags >::fillrand | ( | int | i | ) | [inline] |
Like fill() but with random coordinates.
Definition at line 155 of file SparseVector.h.
Scalar& SparseVector< _Scalar, _Flags >::fillrand | ( | int | r, | |
int | c | |||
) | [inline] |
Definition at line 147 of file SparseVector.h.
EIGEN_STRONG_INLINE int SparseVector< _Scalar, _Flags >::innerNonZeros | ( | int | j | ) | const [inline] |
Definition at line 82 of file SparseVector.h.
EIGEN_STRONG_INLINE int SparseVector< _Scalar, _Flags >::innerSize | ( | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Flags > >.
Definition at line 80 of file SparseVector.h.
int SparseVector< _Scalar, _Flags >::nonZeros | ( | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Flags > >.
Definition at line 121 of file SparseVector.h.
SparseVector& SparseVector< _Scalar, _Flags >::operator= | ( | const SparseMatrixBase< OtherDerived > & | other | ) | [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Flags > >.
Definition at line 240 of file SparseVector.h.
SparseVector& SparseVector< _Scalar, _Flags >::operator= | ( | const SparseVector< _Scalar, _Flags > & | other | ) | [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Flags > >.
Definition at line 225 of file SparseVector.h.
EIGEN_STRONG_INLINE int SparseVector< _Scalar, _Flags >::outerSize | ( | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Flags > >.
Definition at line 81 of file SparseVector.h.
void SparseVector< _Scalar, _Flags >::prune | ( | Scalar | reference, | |
RealScalar | epsilon = precision<RealScalar>() | |||
) | [inline] |
Definition at line 174 of file SparseVector.h.
void SparseVector< _Scalar, _Flags >::reserve | ( | int | reserveSize | ) | [inline] |
Definition at line 125 of file SparseVector.h.
void SparseVector< _Scalar, _Flags >::resize | ( | int | newSize | ) | [inline] |
Definition at line 185 of file SparseVector.h.
void SparseVector< _Scalar, _Flags >::resize | ( | int | rows, | |
int | cols | |||
) | [inline] |
Definition at line 179 of file SparseVector.h.
void SparseVector< _Scalar, _Flags >::resizeNonZeros | ( | int | size | ) | [inline] |
Definition at line 191 of file SparseVector.h.
EIGEN_STRONG_INLINE int SparseVector< _Scalar, _Flags >::rows | ( | void | ) | const [inline] |
Reimplemented from SparseMatrixBase< SparseVector< _Scalar, _Flags > >.
Definition at line 78 of file SparseVector.h.
void SparseVector< _Scalar, _Flags >::setZero | ( | ) | [inline] |
Definition at line 118 of file SparseVector.h.
void SparseVector< _Scalar, _Flags >::startFill | ( | int | reserve | ) | [inline] |
Definition at line 127 of file SparseVector.h.
void SparseVector< _Scalar, _Flags >::swap | ( | SparseVector< _Scalar, _Flags > & | other | ) | [inline] |
Definition at line 219 of file SparseVector.h.
std::ostream& operator<< | ( | std::ostream & | s, | |
const SparseVector< _Scalar, _Flags > & | m | |||
) | [friend] |
Definition at line 295 of file SparseVector.h.
CompressedStorage<Scalar> SparseVector< _Scalar, _Flags >::m_data |
Definition at line 70 of file SparseVector.h.
int SparseVector< _Scalar, _Flags >::m_size |
Definition at line 71 of file SparseVector.h.