Shapeworks Studio  2.1
Shape analysis software suite
List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
Eigen::internal::AmbiVector< _Scalar, _Index > Class Template Reference

Classes

class  Iterator
 
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)
 
void setZero ()
 
void restart ()
 
Scalar & coeffRef (Index i)
 
Scalar & coeff (Index i)
 
void resize (Index size)
 
Index size () const
 

Protected Member Functions

void reallocate (Index size)
 
void reallocateSparse ()
 

Protected Attributes

Scalar * m_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
 

Detailed Description

template<typename _Scalar, typename _Index>
class Eigen::internal::AmbiVector< _Scalar, _Index >

Definition at line 23 of file AmbiVector.h.

Member Function Documentation

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

Definition at line 125 of file AmbiVector.h.

126 {
127  if (m_mode==IsSparse)
128  return m_llSize;
129  else
130  return m_end - m_start;
131 }
template<typename _Scalar , typename _Index >
void Eigen::internal::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 159 of file AmbiVector.h.

160 {
161  m_llCurrent = m_llStart;
162 }
template<typename _Scalar , typename _Index >
void Eigen::internal::AmbiVector< _Scalar, _Index >::setBounds ( Index  start,
Index  end 
)
inline

Specifies a sub-vector to work on

Definition at line 42 of file AmbiVector.h.

42 { m_start = start; m_end = end; }
template<typename _Scalar , typename _Index >
void Eigen::internal::AmbiVector< _Scalar, _Index >::setZero ( )

Set all coefficients of current subvector to zero

Definition at line 166 of file AmbiVector.h.

167 {
168  if (m_mode==IsDense)
169  {
170  for (Index i=m_start; i<m_end; ++i)
171  m_buffer[i] = Scalar(0);
172  }
173  else
174  {
175  eigen_assert(m_mode==IsSparse);
176  m_llSize = 0;
177  m_llStart = -1;
178  }
179 }

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