MOAB  4.9.3pre
Eigen::SparseCompressedBase< Derived >::InnerIterator Class Reference

#include <SparseCompressedBase.h>

Collaboration diagram for Eigen::SparseCompressedBase< Derived >::InnerIterator:

List of all members.

Public Member Functions

 InnerIterator ()
 InnerIterator (const InnerIterator &other)
InnerIteratoroperator= (const InnerIterator &other)
 InnerIterator (const SparseCompressedBase &mat, Index outer)
 InnerIterator (const SparseCompressedBase &mat)
 InnerIterator (const internal::CompressedStorage< Scalar, StorageIndex > &data)
InnerIteratoroperator++ ()
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:Dynamic
OuterType

Protected Attributes

const Scalarm_values
const StorageIndexm_indices
const OuterType m_outer
Index m_id
Index m_end

Private Member Functions

template<typename T >
 InnerIterator (const SparseMatrixBase< T > &, Index outer)

Detailed Description

template<typename Derived>
class Eigen::SparseCompressedBase< Derived >::InnerIterator

Definition at line 117 of file SparseCompressedBase.h.


Member Typedef Documentation

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

Definition at line 183 of file SparseCompressedBase.h.


Constructor & Destructor Documentation

template<typename Derived>
Eigen::SparseCompressedBase< Derived >::InnerIterator::InnerIterator ( ) [inline]

Definition at line 120 of file SparseCompressedBase.h.

      : m_values(0), m_indices(0), m_outer(0), m_id(0), m_end(0)
    {}
template<typename Derived>
Eigen::SparseCompressedBase< Derived >::InnerIterator::InnerIterator ( const InnerIterator other) [inline]

Definition at line 124 of file SparseCompressedBase.h.

      : m_values(other.m_values), m_indices(other.m_indices), m_outer(other.m_outer), m_id(other.m_id), m_end(other.m_end)
    {}
template<typename Derived>
Eigen::SparseCompressedBase< Derived >::InnerIterator::InnerIterator ( const SparseCompressedBase mat,
Index  outer 
) [inline]

Definition at line 138 of file SparseCompressedBase.h.

      : m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(outer)
    {
      if(Derived::IsVectorAtCompileTime && mat.outerIndexPtr()==0)
      {
        m_id = 0;
        m_end = mat.nonZeros();
      }
      else
      {
        m_id = mat.outerIndexPtr()[outer];
        if(mat.isCompressed())
          m_end = mat.outerIndexPtr()[outer+1];
        else
          m_end = m_id + mat.innerNonZeroPtr()[outer];
      }
    }
template<typename Derived>
Eigen::SparseCompressedBase< Derived >::InnerIterator::InnerIterator ( const SparseCompressedBase mat) [inline, explicit]

Definition at line 156 of file SparseCompressedBase.h.

      : m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(0), m_id(0), m_end(mat.nonZeros())
    {
      EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);
    }
template<typename Derived>
Eigen::SparseCompressedBase< Derived >::InnerIterator::InnerIterator ( const internal::CompressedStorage< Scalar, StorageIndex > &  data) [inline, explicit]

Definition at line 162 of file SparseCompressedBase.h.

      : m_values(data.valuePtr()), m_indices(data.indexPtr()), m_outer(0), m_id(0), m_end(data.size())
    {
      EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);
    }
template<typename Derived>
template<typename T >
Eigen::SparseCompressedBase< Derived >::InnerIterator::InnerIterator ( const SparseMatrixBase< T > &  ,
Index  outer 
) [private]

Member Function Documentation

template<typename Derived>
Index Eigen::SparseCompressedBase< Derived >::InnerIterator::col ( ) const [inline]

Definition at line 176 of file SparseCompressedBase.h.

{ return IsRowMajor ? index() : m_outer.value(); }
template<typename Derived>
StorageIndex Eigen::SparseCompressedBase< Derived >::InnerIterator::index ( ) const [inline]

Definition at line 173 of file SparseCompressedBase.h.

{ return m_indices[m_id]; }
template<typename Derived>
Eigen::SparseCompressedBase< Derived >::InnerIterator::operator bool ( ) const [inline]

Definition at line 178 of file SparseCompressedBase.h.

{ return (m_id < m_end); }
template<typename Derived>
InnerIterator& Eigen::SparseCompressedBase< Derived >::InnerIterator::operator++ ( ) [inline]

Definition at line 168 of file SparseCompressedBase.h.

{ m_id++; return *this; }
template<typename Derived>
InnerIterator& Eigen::SparseCompressedBase< Derived >::InnerIterator::operator= ( const InnerIterator other) [inline]

Definition at line 128 of file SparseCompressedBase.h.

    {
      m_values = other.m_values;
      m_indices = other.m_indices;
      const_cast<OuterType&>(m_outer).setValue(other.m_outer.value());
      m_id = other.m_id;
      m_end = other.m_end;
      return *this;
    }
template<typename Derived>
Index Eigen::SparseCompressedBase< Derived >::InnerIterator::outer ( ) const [inline]

Definition at line 174 of file SparseCompressedBase.h.

{ return m_outer.value(); }
template<typename Derived>
Index Eigen::SparseCompressedBase< Derived >::InnerIterator::row ( ) const [inline]

Definition at line 175 of file SparseCompressedBase.h.

{ return IsRowMajor ? m_outer.value() : index(); }
template<typename Derived>
const Scalar& Eigen::SparseCompressedBase< Derived >::InnerIterator::value ( ) const [inline]

Definition at line 170 of file SparseCompressedBase.h.

{ return m_values[m_id]; }
template<typename Derived>
Scalar& Eigen::SparseCompressedBase< Derived >::InnerIterator::valueRef ( ) [inline]

Definition at line 171 of file SparseCompressedBase.h.

{ return const_cast<Scalar&>(m_values[m_id]); }

Member Data Documentation

template<typename Derived>
Index Eigen::SparseCompressedBase< Derived >::InnerIterator::m_end [protected]

Definition at line 186 of file SparseCompressedBase.h.

template<typename Derived>
Index Eigen::SparseCompressedBase< Derived >::InnerIterator::m_id [protected]

Definition at line 185 of file SparseCompressedBase.h.

template<typename Derived>
const StorageIndex* Eigen::SparseCompressedBase< Derived >::InnerIterator::m_indices [protected]

Definition at line 182 of file SparseCompressedBase.h.

template<typename Derived>
const OuterType Eigen::SparseCompressedBase< Derived >::InnerIterator::m_outer [protected]

Definition at line 184 of file SparseCompressedBase.h.

template<typename Derived>
const Scalar* Eigen::SparseCompressedBase< Derived >::InnerIterator::m_values [protected]

Definition at line 181 of file SparseCompressedBase.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines