Public Types | Public Member Functions | Protected Attributes

AmbiVector< _Scalar, _Index >::Iterator Class Reference

#include <AmbiVector.h>

List of all members.

Public Types

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

Public Member Functions

 Iterator (const AmbiVector &vec, RealScalar epsilon=RealScalar(0.1)*NumTraits< RealScalar >::dummy_precision())
Index index () const
Scalar value () const
 operator bool () const
Iteratoroperator++ ()

Protected Attributes

const AmbiVectorm_vector
Index m_currentEl
RealScalar m_epsilon
Index m_cachedIndex
Scalar m_cachedValue
bool m_isDense

Detailed Description

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

Iterator over the nonzero coefficients


Member Typedef Documentation

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

Constructor & Destructor Documentation

template<typename _Scalar , typename _Index >
AmbiVector< _Scalar, _Index >::Iterator::Iterator ( const AmbiVector vec,
RealScalar  epsilon = RealScalar(0.1)*NumTraits<RealScalar>::dummy_precision() 
) [inline]

Default constructor

Parameters:
vec the vector on which we iterate
epsilon the minimal value used to prune zero coefficients. In practice, all coefficients having a magnitude smaller than epsilon are skipped.

Member Function Documentation

template<typename _Scalar , typename _Index >
Index AmbiVector< _Scalar, _Index >::Iterator::index (  )  const [inline]
template<typename _Scalar , typename _Index >
AmbiVector< _Scalar, _Index >::Iterator::operator bool (  )  const [inline]
template<typename _Scalar , typename _Index >
Iterator& AmbiVector< _Scalar, _Index >::Iterator::operator++ (  )  [inline]
template<typename _Scalar , typename _Index >
Scalar AmbiVector< _Scalar, _Index >::Iterator::value (  )  const [inline]

Member Data Documentation

template<typename _Scalar , typename _Index >
Index AmbiVector< _Scalar, _Index >::Iterator::m_cachedIndex [protected]
template<typename _Scalar , typename _Index >
Scalar AmbiVector< _Scalar, _Index >::Iterator::m_cachedValue [protected]
template<typename _Scalar , typename _Index >
Index AmbiVector< _Scalar, _Index >::Iterator::m_currentEl [protected]
template<typename _Scalar , typename _Index >
RealScalar AmbiVector< _Scalar, _Index >::Iterator::m_epsilon [protected]
template<typename _Scalar , typename _Index >
bool AmbiVector< _Scalar, _Index >::Iterator::m_isDense [protected]
template<typename _Scalar , typename _Index >
const AmbiVector& AmbiVector< _Scalar, _Index >::Iterator::m_vector [protected]

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