CompressedStorage Class Template Reference

List of all members.


Detailed Description

template<typename Scalar>
class Eigen::CompressedStorage< Scalar >

Stores a sparse set of values as a list of values and a list of indices.

Public Member Functions

size_t allocatedSize () const
void append (const Scalar &v, int i)
Scalar at (int key, Scalar defaultValue=Scalar(0)) const
Scalar atInRange (size_t start, size_t end, int key, Scalar defaultValue=Scalar(0)) const
Scalar & atWithInsertion (int key, Scalar defaultValue=Scalar(0))
void clear ()
 CompressedStorage (const CompressedStorage &other)
 CompressedStorage (size_t size)
const int & index (size_t i) const
int & index (size_t i)
CompressedStorageoperator= (const CompressedStorage &other)
void prune (Scalar reference, RealScalar epsilon=precision< RealScalar >())
void reserve (size_t size)
void resize (size_t size, float reserveSizeFactor=0)
int searchLowerIndex (size_t start, size_t end, int key) const
int searchLowerIndex (int key) const
size_t size () const
void squeeze ()
void swap (CompressedStorage &other)
const Scalar & value (size_t i) const
Scalar & value (size_t i)

Static Public Member Functions

static CompressedStorage Map (int *indices, Scalar *values, size_t size)

Protected Member Functions

void reallocate (size_t size)

Protected Attributes

size_t m_allocatedSize
int * m_indices
size_t m_size
Scalar * m_values

Member Function Documentation

Scalar at ( int  key,
Scalar  defaultValue = Scalar(0) 
) const [inline]

Returns:
the stored value at index key If the value does not exist, then the value defaultValue is returned without any insertion.

Scalar atInRange ( size_t  start,
size_t  end,
int  key,
Scalar  defaultValue = Scalar(0) 
) const [inline]

Like at(), but the search is performed in the range [start,end)

Scalar& atWithInsertion ( int  key,
Scalar  defaultValue = Scalar(0) 
) [inline]

Returns:
a reference to the value at index key If the value does not exist, then the value defaultValue is inserted such that the keys are sorted.

int searchLowerIndex ( size_t  start,
size_t  end,
int  key 
) const [inline]

Returns:
the largest k in [start,end) such that for all j in [start,k) index[j]<key

int searchLowerIndex ( int  key  )  const [inline]

Returns:
the largest k such that for all j in [0,k) index[j]<key


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

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