Main MRPT website > C++ reference
MRPT logo
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

AmbiVector< _Scalar, _Index > Class Template Reference


Detailed Description

template<typename _Scalar, typename _Index>
class AmbiVector< _Scalar, _Index >

Definition at line 34 of file AmbiVector.h.

#include <src/Sparse/AmbiVector.h>

List of all members.

Classes

class  Iterator
 Iterator over the nonzero coefficients. More...
struct  ListEl

Public Types

typedef _Scalar Scalar
typedef _Index Index
typedef NumTraits< Scalar >::Real RealScalar

Public Member Functions

 AmbiVector (Index size)
void init (double estimatedDensity)
void init (int mode)
Index nonZeros () const
void setBounds (Index start, Index end)
 Specifies a sub-vector to work on.
void setZero ()
 Set all coefficients of current subvector to zero.
void restart ()
 Must be called whenever we might perform a write access with an index smaller than the previous one.
ScalarcoeffRef (Index i)
Scalarcoeff (Index i)
 ~AmbiVector ()
void resize (Index size)
Index size () const

Protected Member Functions

void reallocate (Index size)
void reallocateSparse ()

Protected Attributes

Scalarm_buffer
Scalar m_zero
Index m_size
Index m_start
Index m_end
Index m_allocatedSize
Index m_allocatedElements
Index m_mode
Index m_llStart
Index m_llCurrent
Index m_llSize

Member Typedef Documentation

template<typename _Scalar , typename _Index >
typedef _Index AmbiVector< _Scalar, _Index >::Index

Definition at line 38 of file AmbiVector.h.

template<typename _Scalar , typename _Index >
typedef NumTraits<Scalar>::Real AmbiVector< _Scalar, _Index >::RealScalar

Definition at line 39 of file AmbiVector.h.

template<typename _Scalar , typename _Index >
typedef _Scalar AmbiVector< _Scalar, _Index >::Scalar

Definition at line 37 of file AmbiVector.h.


Constructor & Destructor Documentation

template<typename _Scalar , typename _Index >
AmbiVector< _Scalar, _Index >::AmbiVector ( Index  size ) [inline]

Definition at line 41 of file AmbiVector.h.

References AmbiVector< _Scalar, _Index >::resize().

template<typename _Scalar , typename _Index >
AmbiVector< _Scalar, _Index >::~AmbiVector (  ) [inline]

Definition at line 63 of file AmbiVector.h.

References AmbiVector< _Scalar, _Index >::m_buffer.


Member Function Documentation

template<typename _Scalar , typename _Index >
Scalar& AmbiVector< _Scalar, _Index >::coeff ( Index  i )
template<typename _Scalar , typename _Index >
Scalar& AmbiVector< _Scalar, _Index >::coeffRef ( Index  i )
template<typename _Scalar , typename _Index >
void AmbiVector< _Scalar, _Index >::init ( int  mode )

Definition at line 154 of file AmbiVector.h.

References IsSparse.

template<typename _Scalar , typename _Index >
void AmbiVector< _Scalar, _Index >::init ( double  estimatedDensity )

Definition at line 145 of file AmbiVector.h.

References IsDense, and IsSparse.

template<typename _Scalar , typename _Index >
_Index AmbiVector< _Scalar, _Index >::nonZeros (  ) const
Returns:
the number of non zeros in the current sub vector

Definition at line 136 of file AmbiVector.h.

References IsSparse.

template<typename _Scalar , typename _Index >
void AmbiVector< _Scalar, _Index >::reallocate ( Index  size ) [inline, protected]
template<typename _Scalar , typename _Index >
void AmbiVector< _Scalar, _Index >::reallocateSparse (  ) [inline, protected]
template<typename _Scalar , typename _Index >
void AmbiVector< _Scalar, _Index >::resize ( Index  size ) [inline]
template<typename _Scalar , typename _Index >
void AmbiVector< _Scalar, _Index >::restart (  )

Must be called whenever we might perform a write access with an index smaller than the previous one.

Don't worry, this function is extremely cheap.

Definition at line 170 of file AmbiVector.h.

template<typename _Scalar , typename _Index >
void AmbiVector< _Scalar, _Index >::setBounds ( Index  start,
Index  end 
) [inline]
template<typename _Scalar , typename _Index >
void AmbiVector< _Scalar, _Index >::setZero (  )

Set all coefficients of current subvector to zero.

Definition at line 177 of file AmbiVector.h.

References eigen_assert, IsDense, and IsSparse.

template<typename _Scalar , typename _Index >
Index AmbiVector< _Scalar, _Index >::size (  ) const [inline]

Member Data Documentation

template<typename _Scalar , typename _Index >
Index AmbiVector< _Scalar, _Index >::m_allocatedElements [protected]
template<typename _Scalar , typename _Index >
Index AmbiVector< _Scalar, _Index >::m_allocatedSize [protected]

Definition at line 124 of file AmbiVector.h.

Referenced by AmbiVector< _Scalar, _Index >::resize().

template<typename _Scalar , typename _Index >
Scalar* AmbiVector< _Scalar, _Index >::m_buffer [protected]
template<typename _Scalar , typename _Index >
Index AmbiVector< _Scalar, _Index >::m_end [protected]
template<typename _Scalar , typename _Index >
Index AmbiVector< _Scalar, _Index >::m_llCurrent [protected]

Definition at line 130 of file AmbiVector.h.

template<typename _Scalar , typename _Index >
Index AmbiVector< _Scalar, _Index >::m_llSize [protected]

Definition at line 131 of file AmbiVector.h.

template<typename _Scalar , typename _Index >
Index AmbiVector< _Scalar, _Index >::m_llStart [protected]

Definition at line 129 of file AmbiVector.h.

template<typename _Scalar , typename _Index >
Index AmbiVector< _Scalar, _Index >::m_mode [protected]

Definition at line 126 of file AmbiVector.h.

template<typename _Scalar , typename _Index >
Index AmbiVector< _Scalar, _Index >::m_size [protected]
template<typename _Scalar , typename _Index >
Index AmbiVector< _Scalar, _Index >::m_start [protected]
template<typename _Scalar , typename _Index >
Scalar AmbiVector< _Scalar, _Index >::m_zero [protected]

Definition at line 120 of file AmbiVector.h.




Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:46:17 UTC 2011