MOAB  4.9.3pre
Eigen::SparseMapBase< Derived, WriteAccessors > Class Template Reference

Common base class for writable Map and Ref instance of sparse matrix and vector. More...

#include <SparseMap.h>

Inheritance diagram for Eigen::SparseMapBase< Derived, WriteAccessors >:
Collaboration diagram for Eigen::SparseMapBase< Derived, WriteAccessors >:

List of all members.

Public Types

enum  { IsRowMajor = Base::IsRowMajor }
typedef SparseMapBase< Derived,
ReadOnlyAccessors
Base
typedef Base::Scalar Scalar
typedef Base::StorageIndex StorageIndex

Public Member Functions

ScalarvaluePtr ()
StorageIndexinnerIndexPtr ()
StorageIndexouterIndexPtr ()
StorageIndexinnerNonZeroPtr ()
ScalarcoeffRef (Index row, Index col)
 SparseMapBase (Index rows, Index cols, Index nnz, StorageIndex *outerIndexPtr, StorageIndex *innerIndexPtr, Scalar *valuePtr, StorageIndex *innerNonZerosPtr=0)
 SparseMapBase (Index size, Index nnz, StorageIndex *innerIndexPtr, Scalar *valuePtr)
 ~SparseMapBase ()

Protected Member Functions

 SparseMapBase ()

Private Types

typedef MapBase< Derived,
ReadOnlyAccessors
ReadOnlyMapBase

Detailed Description

template<typename Derived>
class Eigen::SparseMapBase< Derived, WriteAccessors >

Common base class for writable Map and Ref instance of sparse matrix and vector.

class SparseMapBase

Definition at line 148 of file SparseMap.h.


Member Typedef Documentation

template<typename Derived >
typedef SparseMapBase<Derived, ReadOnlyAccessors> Eigen::SparseMapBase< Derived, WriteAccessors >::Base

Reimplemented from Eigen::SparseMapBase< Derived, ReadOnlyAccessors >.

Definition at line 154 of file SparseMap.h.

template<typename Derived >
typedef MapBase<Derived, ReadOnlyAccessors> Eigen::SparseMapBase< Derived, WriteAccessors >::ReadOnlyMapBase [private]

Definition at line 151 of file SparseMap.h.

template<typename Derived >
typedef Base::Scalar Eigen::SparseMapBase< Derived, WriteAccessors >::Scalar

Reimplemented from Eigen::SparseMapBase< Derived, ReadOnlyAccessors >.

Definition at line 155 of file SparseMap.h.

template<typename Derived >
typedef Base::StorageIndex Eigen::SparseMapBase< Derived, WriteAccessors >::StorageIndex

Reimplemented from Eigen::SparseMapBase< Derived, ReadOnlyAccessors >.

Definition at line 156 of file SparseMap.h.


Member Enumeration Documentation

template<typename Derived >
anonymous enum
Enumerator:
IsRowMajor 

Definition at line 157 of file SparseMap.h.

{ IsRowMajor = Base::IsRowMajor };

Constructor & Destructor Documentation

template<typename Derived >
Eigen::SparseMapBase< Derived, WriteAccessors >::SparseMapBase ( Index  rows,
Index  cols,
Index  nnz,
StorageIndex outerIndexPtr,
StorageIndex innerIndexPtr,
Scalar valuePtr,
StorageIndex innerNonZerosPtr = 0 
) [inline]

Definition at line 190 of file SparseMap.h.

      : Base(rows, cols, nnz, outerIndexPtr, innerIndexPtr, valuePtr, innerNonZerosPtr)
    {}
template<typename Derived >
Eigen::SparseMapBase< Derived, WriteAccessors >::SparseMapBase ( Index  size,
Index  nnz,
StorageIndex innerIndexPtr,
Scalar valuePtr 
) [inline]

Definition at line 196 of file SparseMap.h.

template<typename Derived >
Eigen::SparseMapBase< Derived, WriteAccessors >::~SparseMapBase ( ) [inline]

Empty destructor

Reimplemented from Eigen::SparseMapBase< Derived, ReadOnlyAccessors >.

Definition at line 201 of file SparseMap.h.

{}
template<typename Derived >
Eigen::SparseMapBase< Derived, WriteAccessors >::SparseMapBase ( ) [inline, protected]

Reimplemented from Eigen::SparseMapBase< Derived, ReadOnlyAccessors >.

Definition at line 204 of file SparseMap.h.

{}

Member Function Documentation

template<typename Derived >
Scalar& Eigen::SparseMapBase< Derived, WriteAccessors >::coeffRef ( Index  row,
Index  col 
) [inline]

Definition at line 175 of file SparseMap.h.

    {
      const Index outer = IsRowMajor ? row : col;
      const Index inner = IsRowMajor ? col : row;

      Index start = Base::m_outerIndex[outer];
      Index end = Base::isCompressed() ? Base::m_outerIndex[outer+1] : start + Base::m_innerNonZeros[outer];
      eigen_assert(end>=start && "you probably called coeffRef on a non finalized matrix");
      eigen_assert(end>start && "coeffRef cannot be called on a zero coefficient");
      Index* r = std::lower_bound(&Base::m_innerIndices[start],&Base::m_innerIndices[end],inner);
      const Index id = r - &Base::m_innerIndices[0];
      eigen_assert((*r==inner) && (id<end) && "coeffRef cannot be called on a zero coefficient");
      return const_cast<Scalar*>(Base::m_values)[id];
    }
template<typename Derived >
StorageIndex* Eigen::SparseMapBase< Derived, WriteAccessors >::innerIndexPtr ( ) [inline]
Returns:
a non-const pointer to the array of inner indices. This function is aimed at interoperability with other libraries.
See also:
valuePtr(), outerIndexPtr()

Reimplemented from Eigen::SparseCompressedBase< Derived >.

Definition at line 170 of file SparseMap.h.

{ return Base::m_innerIndices; }
template<typename Derived >
StorageIndex* Eigen::SparseMapBase< Derived, WriteAccessors >::innerNonZeroPtr ( ) [inline]
Returns:
a non-const pointer to the array of the number of non zeros of the inner vectors. This function is aimed at interoperability with other libraries.
Warning:
it returns the null pointer 0 in compressed mode

Reimplemented from Eigen::SparseCompressedBase< Derived >.

Definition at line 172 of file SparseMap.h.

{ return Base::m_innerNonZeros; }
template<typename Derived >
StorageIndex* Eigen::SparseMapBase< Derived, WriteAccessors >::outerIndexPtr ( ) [inline]
Returns:
a non-const pointer to the array of the starting positions of the inner vectors. This function is aimed at interoperability with other libraries.
Warning:
it returns the null pointer 0 for SparseVector
See also:
valuePtr(), innerIndexPtr()

Reimplemented from Eigen::SparseCompressedBase< Derived >.

Definition at line 171 of file SparseMap.h.

{ return Base::m_outerIndex; }
template<typename Derived >
Scalar* Eigen::SparseMapBase< Derived, WriteAccessors >::valuePtr ( ) [inline]
Returns:
a non-const pointer to the array of values. This function is aimed at interoperability with other libraries.
See also:
innerIndexPtr(), outerIndexPtr()

Reimplemented from Eigen::SparseCompressedBase< Derived >.

Definition at line 169 of file SparseMap.h.

{ return Base::m_values; }

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