Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator Class Reference

#include <SparseCompressedBase.h>

Public Member Functions

 ReverseInnerIterator (const SparseCompressedBase &mat, Index outer)
 
 ReverseInnerIterator (const SparseCompressedBase &mat)
 
 ReverseInnerIterator (const internal::CompressedStorage< Scalar, StorageIndex > &data)
 
ReverseInnerIteratoroperator-- ()
 
ReverseInnerIteratoroperator-= (Index i)
 
ReverseInnerIterator operator- (Index i)
 
const Scalarvalue () const
 
ScalarvalueRef ()
 
StorageIndex index () const
 
Index outer () const
 
Index row () const
 
Index col () const
 
 operator bool () const
 

Protected Types

typedef internal::variable_if_dynamic< Index, Derived::IsVectorAtCompileTime ? 0 :DynamicOuterType
 

Protected Attributes

const Scalarm_values
 
const StorageIndexm_indices
 
const OuterType m_outer
 
Index m_start
 
Index m_id
 

Member Typedef Documentation

◆ OuterType

template<typename Derived >
typedef internal::variable_if_dynamic<Index, Derived::IsVectorAtCompileTime ? 0 : Dynamic> Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::OuterType
protected

Constructor & Destructor Documentation

◆ ReverseInnerIterator() [1/3]

template<typename Derived >
Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::ReverseInnerIterator ( const SparseCompressedBase mat,
Index  outer 
)
inline
296  if (Derived::IsVectorAtCompileTime && mat.outerIndexPtr() == 0) {
297  m_start = 0;
298  m_id = mat.nonZeros();
299  } else {
301  if (mat.isCompressed())
302  m_id = mat.outerIndexPtr()[outer + 1];
303  else
305  }
306  }
Index m_id
Definition: SparseCompressedBase.h:349
Index outer() const
Definition: SparseCompressedBase.h:337
const StorageIndex * m_indices
Definition: SparseCompressedBase.h:345
Index m_start
Definition: SparseCompressedBase.h:348
const Scalar * m_values
Definition: SparseCompressedBase.h:344
const OuterType m_outer
Definition: SparseCompressedBase.h:347
Index nonZeros() const
Definition: SparseCompressedBase.h:64
const StorageIndex * innerNonZeroPtr() const
Definition: SparseMatrix.h:198
const Scalar * valuePtr() const
Definition: SparseMatrix.h:171
bool isCompressed() const
Definition: SparseCompressedBase.h:114
const StorageIndex * outerIndexPtr() const
Definition: SparseMatrix.h:189
const StorageIndex * innerIndexPtr() const
Definition: SparseMatrix.h:180

References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::innerNonZeroPtr(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::isCompressed(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::nonZeros(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::outerIndexPtr().

◆ ReverseInnerIterator() [2/3]

template<typename Derived >
Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::ReverseInnerIterator ( const SparseCompressedBase mat)
inlineexplicit
311  }
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
Definition: StaticAssert.h:36

References EIGEN_STATIC_ASSERT_VECTOR_ONLY.

◆ ReverseInnerIterator() [3/3]

template<typename Derived >
Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::ReverseInnerIterator ( const internal::CompressedStorage< Scalar, StorageIndex > &  data)
inlineexplicit
314  : m_values(data.valuePtr()), m_indices(data.indexPtr()), m_outer(0), m_start(0), m_id(data.size()) {
316  }
int data[]
Definition: Map_placement_new.cpp:1

References EIGEN_STATIC_ASSERT_VECTOR_ONLY.

Member Function Documentation

◆ col()

template<typename Derived >
Index Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::col ( ) const
inline
339 { return IsRowMajor ? index() : m_outer.value(); }
StorageIndex index() const
Definition: SparseCompressedBase.h:336
const Scalar & value() const
Definition: SparseCompressedBase.h:333
@ IsRowMajor
Definition: SparseMatrixBase.h:99

References Eigen::SparseCompressedBase< Derived >::IsRowMajor.

◆ index()

template<typename Derived >
StorageIndex Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::index ( ) const
inline
336 { return m_indices[m_id - 1]; }

◆ operator bool()

template<typename Derived >
Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::operator bool ( ) const
inline
341 { return (m_id > m_start); }

◆ operator-()

template<typename Derived >
ReverseInnerIterator Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::operator- ( Index  i)
inline
327  {
328  ReverseInnerIterator result = *this;
329  result -= i;
330  return result;
331  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
ReverseInnerIterator(const SparseCompressedBase &mat, Index outer)
Definition: SparseCompressedBase.h:294

References i.

◆ operator--()

template<typename Derived >
ReverseInnerIterator& Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::operator-- ( )
inline
318  {
319  --m_id;
320  return *this;
321  }

◆ operator-=()

template<typename Derived >
ReverseInnerIterator& Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::operator-= ( Index  i)
inline
322  {
323  m_id -= i;
324  return *this;
325  }

References i.

◆ outer()

template<typename Derived >
Index Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::outer ( ) const
inline
337 { return m_outer.value(); }
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR T value()
Definition: XprHelper.h:161

◆ row()

template<typename Derived >
Index Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::row ( ) const
inline

◆ value()

template<typename Derived >
const Scalar& Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::value ( ) const
inline
333 { return m_values[m_id - 1]; }

◆ valueRef()

template<typename Derived >
Scalar& Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::valueRef ( )
inline
334 { return const_cast<Scalar&>(m_values[m_id - 1]); }
SCALAR Scalar
Definition: bench_gemm.cpp:45

Member Data Documentation

◆ m_id

template<typename Derived >
Index Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::m_id
protected

◆ m_indices

template<typename Derived >
const StorageIndex* Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::m_indices
protected

◆ m_outer

template<typename Derived >
const OuterType Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::m_outer
protected

◆ m_start

template<typename Derived >
Index Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::m_start
protected

◆ m_values

template<typename Derived >
const Scalar* Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::m_values
protected

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