Main MRPT website > C++ reference
MRPT logo
Classes | Public Types | Public Member Functions | Public Attributes | Friends
Eigen::SparseVector Class Reference

Detailed Description

a sparse vector class

Template Parameters:
_Scalarthe 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.

Inheritance diagram for Eigen::SparseVector:
Inheritance graph
[legend]

List of all members.

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)

Member Typedef Documentation

Definition at line 76 of file Sparse.


Member Enumeration Documentation

anonymous enum
Enumerator:
IsColVector 

Definition at line 77 of file Sparse.

anonymous enum
Enumerator:
Options 

Definition at line 79 of file Sparse.


Constructor & Destructor Documentation

Eigen::SparseVector::SparseVector ( ) [inline]

Definition at line 203 of file Sparse.

Eigen::SparseVector::SparseVector ( Index  size) [inline]

Definition at line 205 of file Sparse.

Eigen::SparseVector::SparseVector ( Index  rows,
Index  cols 
) [inline]

Definition at line 207 of file Sparse.

template<typename OtherDerived >
Eigen::SparseVector::SparseVector ( const MatrixBase< OtherDerived > &  other) [inline]

Definition at line 210 of file Sparse.

template<typename OtherDerived >
Eigen::SparseVector::SparseVector ( const SparseMatrixBase< OtherDerived > &  other) [inline]

Definition at line 217 of file Sparse.

Eigen::SparseVector::SparseVector ( const SparseVector &  other) [inline]

Definition at line 223 of file Sparse.

Eigen::SparseVector::~SparseVector ( ) [inline]

Destructor.

Definition at line 347 of file Sparse.


Member Function Documentation

CompressedStorage<Scalar,Index>& Eigen::SparseVector::_data ( ) [inline]

Definition at line 86 of file Sparse.

CompressedStorage<Scalar,Index>& Eigen::SparseVector::_data ( ) const [inline]

Definition at line 87 of file Sparse.

EIGEN_STRONG_INLINE const Index* Eigen::SparseVector::_innerIndexPtr ( ) const [inline]

Definition at line 100 of file Sparse.

EIGEN_STRONG_INLINE Index* Eigen::SparseVector::_innerIndexPtr ( ) [inline]

Definition at line 101 of file Sparse.

EIGEN_STRONG_INLINE const Scalar* Eigen::SparseVector::_valuePtr ( ) const [inline]

Definition at line 97 of file Sparse.

EIGEN_STRONG_INLINE Scalar* Eigen::SparseVector::_valuePtr ( ) [inline]

Definition at line 98 of file Sparse.

Scalar Eigen::SparseVector::coeff ( Index  row,
Index  col 
) const [inline]

Definition at line 103 of file Sparse.

Scalar Eigen::SparseVector::coeff ( Index  i) const [inline]

Definition at line 108 of file Sparse.

Scalar& Eigen::SparseVector::coeffRef ( Index  row,
Index  col 
) [inline]

Definition at line 110 of file Sparse.

Scalar& Eigen::SparseVector::coeffRef ( Index  i) [inline]
Returns:
a reference to the coefficient value at given index i This operation involes a log(rho*size) binary search. If the coefficient does not exist yet, then a sorted insertion into a sequential buffer is performed.

This insertion might be very costly if the number of nonzeros above i is large.

Definition at line 122 of file Sparse.

EIGEN_STRONG_INLINE Index Eigen::SparseVector::cols ( void  ) const [inline]
Returns:
the number of columns.
See also:
rows(), ColsAtCompileTime

Reimplemented from Eigen::SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.

Definition at line 92 of file Sparse.

EIGEN_DEPRECATED void Eigen::SparseVector::endFill ( ) [inline]
Deprecated:
use finalize()

Definition at line 389 of file Sparse.

EIGEN_DEPRECATED Scalar& Eigen::SparseVector::fill ( Index  r,
Index  c 
) [inline]
Deprecated:
use insertBack(Index,Index)

Definition at line 362 of file Sparse.

EIGEN_DEPRECATED Scalar& Eigen::SparseVector::fill ( Index  i) [inline]
Deprecated:
use insertBack(Index)

Definition at line 369 of file Sparse.

EIGEN_DEPRECATED Scalar& Eigen::SparseVector::fillrand ( Index  r,
Index  c 
) [inline]
Deprecated:
use insert(Index,Index)

Definition at line 376 of file Sparse.

EIGEN_DEPRECATED Scalar& Eigen::SparseVector::fillrand ( Index  i) [inline]
Deprecated:
use insert(Index)

Definition at line 383 of file Sparse.

void Eigen::SparseVector::finalize ( ) [inline]

Definition at line 182 of file Sparse.

EIGEN_STRONG_INLINE Index Eigen::SparseVector::innerNonZeros ( Index  j) const [inline]

Definition at line 95 of file Sparse.

EIGEN_STRONG_INLINE Index Eigen::SparseVector::innerSize ( ) const [inline]
Returns:
the size of the inner dimension according to the storage order, i.e., the number of rows for a columns major matrix, and the number of cols otherwise

Reimplemented from Eigen::SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.

Definition at line 93 of file Sparse.

Scalar& Eigen::SparseVector::insert ( Index  row,
Index  col 
) [inline]

Definition at line 152 of file Sparse.

Scalar& Eigen::SparseVector::insert ( Index  i) [inline]

Definition at line 159 of file Sparse.

Scalar& Eigen::SparseVector::insertBack ( Index  i) [inline]

Definition at line 146 of file Sparse.

Scalar& Eigen::SparseVector::insertBackByOuterInner ( Index  outer,
Index  inner 
) [inline]

Definition at line 141 of file Sparse.

Index Eigen::SparseVector::nonZeros ( ) const [inline]
Returns:
the number of non zero coefficients

Reimplemented from Eigen::SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.

Definition at line 134 of file Sparse.

SparseVector& Eigen::SparseVector::operator= ( const SparseVector &  other) [inline]

Definition at line 235 of file Sparse.

template<typename OtherDerived >
SparseVector& Eigen::SparseVector::operator= ( const SparseMatrixBase< OtherDerived > &  other) [inline]

Reimplemented from Eigen::SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.

Definition at line 250 of file Sparse.

EIGEN_STRONG_INLINE Index Eigen::SparseVector::outerSize ( ) const [inline]
Returns:
the size of the storage major dimension, i.e., the number of columns for a columns major matrix, and the number of rows otherwise

Reimplemented from Eigen::SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.

Definition at line 94 of file Sparse.

void Eigen::SparseVector::prune ( Scalar  reference,
RealScalar  epsilon = NumTraits<RealScalar>::dummy_precision() 
) [inline]

Definition at line 184 of file Sparse.

void Eigen::SparseVector::reserve ( Index  reserveSize) [inline]

Definition at line 179 of file Sparse.

void Eigen::SparseVector::resize ( Index  rows,
Index  cols 
) [inline]

Definition at line 189 of file Sparse.

void Eigen::SparseVector::resize ( Index  newSize) [inline]

Definition at line 195 of file Sparse.

void Eigen::SparseVector::resizeNonZeros ( Index  size) [inline]

Definition at line 201 of file Sparse.

EIGEN_STRONG_INLINE Index Eigen::SparseVector::rows ( void  ) const [inline]
Returns:
the number of rows.
See also:
cols(), RowsAtCompileTime

Reimplemented from Eigen::SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.

Definition at line 91 of file Sparse.

void Eigen::SparseVector::setZero ( ) [inline]

Definition at line 131 of file Sparse.

EIGEN_DEPRECATED void Eigen::SparseVector::startFill ( Index  reserve) [inline]
Deprecated:
use setZero() and reserve()

Definition at line 355 of file Sparse.

void Eigen::SparseVector::startVec ( Index  outer) [inline]

Definition at line 136 of file Sparse.

internal::traits< SparseVector< _Scalar, _Options, _Index > >::Scalar Eigen::SparseVector::sum ( ) const

Overloaded for performance.

Reimplemented from Eigen::SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >.

Definition at line 51 of file Sparse.

void Eigen::SparseVector::swap ( SparseVector &  other) [inline]

Definition at line 229 of file Sparse.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const SparseVector &  m 
) [friend]

Definition at line 316 of file Sparse.


Member Data Documentation

Definition at line 83 of file Sparse.

Definition at line 84 of file Sparse.




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Sun Oct 16 12:16:33 UTC 2011