MOAB
4.9.3pre
|
Common base class for writable Map and Ref instance of sparse matrix and vector. More...
#include <SparseMap.h>
Public Types | |
enum | { IsRowMajor = Base::IsRowMajor } |
typedef SparseMapBase< Derived, ReadOnlyAccessors > | Base |
typedef Base::Scalar | Scalar |
typedef Base::StorageIndex | StorageIndex |
Public Member Functions | |
Scalar * | valuePtr () |
StorageIndex * | innerIndexPtr () |
StorageIndex * | outerIndexPtr () |
StorageIndex * | innerNonZeroPtr () |
Scalar & | coeffRef (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 |
Common base class for writable Map and Ref instance of sparse matrix and vector.
class SparseMapBase
Definition at line 148 of file SparseMap.h.
typedef SparseMapBase<Derived, ReadOnlyAccessors> Eigen::SparseMapBase< Derived, WriteAccessors >::Base |
Reimplemented from Eigen::SparseMapBase< Derived, ReadOnlyAccessors >.
Definition at line 154 of file SparseMap.h.
typedef MapBase<Derived, ReadOnlyAccessors> Eigen::SparseMapBase< Derived, WriteAccessors >::ReadOnlyMapBase [private] |
Definition at line 151 of file SparseMap.h.
typedef Base::Scalar Eigen::SparseMapBase< Derived, WriteAccessors >::Scalar |
Reimplemented from Eigen::SparseMapBase< Derived, ReadOnlyAccessors >.
Definition at line 155 of file SparseMap.h.
typedef Base::StorageIndex Eigen::SparseMapBase< Derived, WriteAccessors >::StorageIndex |
Reimplemented from Eigen::SparseMapBase< Derived, ReadOnlyAccessors >.
Definition at line 156 of file SparseMap.h.
anonymous enum |
Definition at line 157 of file SparseMap.h.
{ IsRowMajor = Base::IsRowMajor };
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) {}
Eigen::SparseMapBase< Derived, WriteAccessors >::SparseMapBase | ( | Index | size, |
Index | nnz, | ||
StorageIndex * | innerIndexPtr, | ||
Scalar * | valuePtr | ||
) | [inline] |
Definition at line 196 of file SparseMap.h.
: Base(size, nnz, innerIndexPtr, valuePtr) {}
Eigen::SparseMapBase< Derived, WriteAccessors >::~SparseMapBase | ( | ) | [inline] |
Empty destructor
Reimplemented from Eigen::SparseMapBase< Derived, ReadOnlyAccessors >.
Definition at line 201 of file SparseMap.h.
{}
Eigen::SparseMapBase< Derived, WriteAccessors >::SparseMapBase | ( | ) | [inline, protected] |
Reimplemented from Eigen::SparseMapBase< Derived, ReadOnlyAccessors >.
Definition at line 204 of file SparseMap.h.
{}
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]; }
StorageIndex* Eigen::SparseMapBase< Derived, WriteAccessors >::innerIndexPtr | ( | ) | [inline] |
Reimplemented from Eigen::SparseCompressedBase< Derived >.
Definition at line 170 of file SparseMap.h.
{ return Base::m_innerIndices; }
StorageIndex* Eigen::SparseMapBase< Derived, WriteAccessors >::innerNonZeroPtr | ( | ) | [inline] |
Reimplemented from Eigen::SparseCompressedBase< Derived >.
Definition at line 172 of file SparseMap.h.
{ return Base::m_innerNonZeros; }
StorageIndex* Eigen::SparseMapBase< Derived, WriteAccessors >::outerIndexPtr | ( | ) | [inline] |
Reimplemented from Eigen::SparseCompressedBase< Derived >.
Definition at line 171 of file SparseMap.h.
{ return Base::m_outerIndex; }
Scalar* Eigen::SparseMapBase< Derived, WriteAccessors >::valuePtr | ( | ) | [inline] |
Reimplemented from Eigen::SparseCompressedBase< Derived >.
Definition at line 169 of file SparseMap.h.
{ return Base::m_values; }