SparseVector Class Template Reference

Inherits SparseMatrixBase.

List of all members.


Detailed Description

template<typename _Scalar, int _Flags>
class Eigen::SparseVector< _Scalar, _Flags >

a sparse vector class

Parameters:
_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.

Public Types

enum  { IsColVector }
typedef SparseMatrixBase
< SparseVector
SparseBase

Public Member Functions

int * _innerIndexPtr ()
const int * _innerIndexPtr () const
Scalar * _valuePtr ()
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)
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)
int innerNonZeros (int j) const
int innerSize () const
int nonZeros () const
SparseVectoroperator= (const SparseVector &other)
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)
int rows () const
void setZero ()
 SparseVector (const SparseVector &other)
template<typename OtherDerived>
 SparseVector (const MatrixBase< OtherDerived > &other)
 SparseVector (int rows, int cols)
 SparseVector (int size)
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)

Constructor & Destructor Documentation

~SparseVector (  )  [inline]

Destructor


Member Function Documentation

Scalar& coeffRef ( int  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.

Scalar& fillrand ( int  i  )  [inline]

Like fill() but with random coordinates.

int nonZeros (  )  const [inline]

Returns:
the number of non zero coefficients


The documentation for this class was generated from the following file:

Generated on Thu Apr 9 10:10:02 2009 for Eigen by  doxygen 1.5.5