Base class providing read-only coefficient access to matrices and arrays. More...
#include <DenseCoeffsBase.h>
Public Types | |
typedef EigenBase< Derived > | Base |
typedef internal::conditional < bool(internal::traits < Derived >::Flags &LvalueBit), const Scalar &, typename internal::conditional < internal::is_arithmetic < Scalar >::value, Scalar, const Scalar >::type >::type | CoeffReturnType |
typedef internal::traits < Derived >::Index | Index |
typedef internal::add_const_on_value_type_if_arithmetic < typename internal::packet_traits < Scalar >::type >::type | PacketReturnType |
typedef internal::packet_traits < Scalar >::type | PacketScalar |
typedef internal::traits < Derived >::Scalar | Scalar |
typedef internal::traits < Derived >::StorageKind | StorageKind |
Public Member Functions | |
template<typename Dest > | |
void | addTo (Dest &dst) const |
template<typename Dest > | |
void | applyThisOnTheLeft (Dest &dst) const |
template<typename Dest > | |
void | applyThisOnTheRight (Dest &dst) const |
CoeffReturnType | coeff (Index row, Index col) const |
CoeffReturnType | coeff (Index index) const |
CoeffReturnType | coeffByOuterInner (Index outer, Index inner) const |
Index | colIndexByOuterInner (Index outer, Index inner) const |
Index | cols () const |
Derived & | const_cast_derived () const |
const Derived & | const_derived () const |
Derived & | derived () |
const Derived & | derived () const |
template<typename Dest > | |
void | evalTo (Dest &dst) const |
CoeffReturnType | operator() (Index row, Index col) const |
CoeffReturnType | operator() (Index index) const |
CoeffReturnType | operator[] (Index index) const |
template<int LoadMode> | |
PacketReturnType | packet (Index row, Index col) const |
template<int LoadMode> | |
PacketReturnType | packet (Index index) const |
template<int LoadMode> | |
PacketReturnType | packetByOuterInner (Index outer, Index inner) const |
Index | rowIndexByOuterInner (Index outer, Index inner) const |
Index | rows () const |
Index | size () const |
template<typename Dest > | |
void | subTo (Dest &dst) const |
CoeffReturnType | w () const |
CoeffReturnType | x () const |
CoeffReturnType | y () const |
CoeffReturnType | z () const |
Protected Member Functions | |
void | coeffRef () |
void | coeffRefByOuterInner () |
void | colStride () |
void | copyCoeff () |
void | copyCoeffByOuterInner () |
void | copyPacket () |
void | copyPacketByOuterInner () |
void | innerStride () |
void | outerStride () |
void | rowStride () |
void | stride () |
void | writePacket () |
void | writePacketByOuterInner () |
Base class providing read-only coefficient access to matrices and arrays.
Derived | Type of the derived class |
ReadOnlyAccessors | Constant indicating read-only access |
This class defines the operator()
const
function and friends, which can be used to read specific entries of a matrix or array.
typedef internal::conditional<bool(internal::traits<Derived>::Flags&LvalueBit), const Scalar&, typename internal::conditional<internal::is_arithmetic<Scalar>::value, Scalar, const Scalar>::type >::type CoeffReturnType |
Reimplemented from EigenBase< Derived >.
Reimplemented in DenseCoeffsBase< Derived, DirectWriteAccessors >, DenseCoeffsBase< Derived, DirectAccessors >, and DenseCoeffsBase< Derived, WriteAccessors >.
typedef internal::add_const_on_value_type_if_arithmetic< typename internal::packet_traits<Scalar>::type >::type PacketReturnType |
typedef internal::packet_traits<Scalar>::type PacketScalar |
Reimplemented in DenseCoeffsBase< Derived, WriteAccessors >.
typedef internal::traits<Derived>::StorageKind StorageKind |
Reimplemented from EigenBase< Derived >.
Reimplemented in DenseCoeffsBase< Derived, WriteAccessors >.
|
inlineinherited |
|
inlineinherited |
Reimplemented in HouseholderSequence< VectorsType, CoeffsType, Side >.
|
inlineinherited |
Reimplemented in HouseholderSequence< VectorsType, CoeffsType, Side >.
|
inline |
Short version: don't use this function, use operator()(Index,Index) const instead.
Long version: this function is similar to operator()(Index,Index) const , but without the assertion. Use this for limiting the performance cost of debugging code when doing repeated coefficient access. Only use this when it is guaranteed that the parameters row and col are in range.
If EIGEN_INTERNAL_DEBUGGING is defined, an assertion will be made, making this function equivalent to operator()(Index,Index) const .
References eigen_internal_assert.
|
inline |
Short version: don't use this function, use operator[](Index) const instead.
Long version: this function is similar to operator[](Index) const , but without the assertion. Use this for limiting the performance cost of debugging code when doing repeated coefficient access. Only use this when it is guaranteed that the parameter index is in range.
If EIGEN_INTERNAL_DEBUGGING is defined, an assertion will be made, making this function equivalent to operator[](Index) const .
References eigen_internal_assert.
|
inline |
|
protected |
|
protected |
References Eigen::RowMajorBit.
|
inlineinherited |
Reimplemented in Transpose< PermutationBase< Derived > >, SparseSymmetricPermutationProduct< MatrixType, UpLo >, SparseInnerVectorSet< SparseMatrix< _Scalar, _Options, _Index >, Size >, TriangularView< _MatrixType, _Mode >, HouseholderSequence< VectorsType, CoeffsType, Side >, SparseMatrixBase< Derived >, SparseMatrixBase< SparseMatrix< Scalar, _Options, int > >, SparseMatrixBase< SparseInnerVectorSet< SparseMatrix< _Scalar, _Options, _Index >, Size > >, SparseMatrixBase< CwiseUnaryOp< UnaryOp, MatrixType > >, SparseMatrixBase< Transpose< MatrixType > >, SparseMatrixBase< SparseDiagonalProduct< Lhs, Rhs > >, SparseMatrixBase< SparseMatrix< Scalar, _Options, _Index > >, SparseMatrixBase< CwiseUnaryView< ViewOp, MatrixType > >, SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >, SparseMatrixBase< SparseDenseOuterProduct< Lhs, Rhs, Tr > >, SparseMatrixBase< SparseInnerVectorSet< MatrixType, Size > >, SparseMatrixBase< MappedSparseMatrix< _Scalar, _Flags, _Index > >, SparseMatrixBase< SparseSparseProduct< LhsNested, RhsNested > >, SparseMatrixBase< SparseMatrix< Scalar, _Options, Index > >, SparseMatrixBase< SparseTriangularView< MatrixType, Mode > >, SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >, SparseMatrixBase< SparseView< MatrixType > >, SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >, SparseSparseProduct< LhsNested, RhsNested >, SparseMatrix< _Scalar, _Options, _Index >, SparseMatrix< Scalar >, SparseMatrix< Scalar, ColMajor, Index >, SparseMatrix< Scalar, ColMajor >, SparseMatrix< Scalar, ColMajor, int >, SparseMatrix< Scalar, RowMajor, Index >, SparseMatrix< Scalar, RowMajor >, PermutationBase< Derived >, PermutationBase< PermutationWrapper< _IndicesType > >, PermutationBase< Map< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >, _PacketAccess > >, PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >, PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >, SparseDenseOuterProduct< Lhs, Rhs, Tr >, SparseInnerVectorSet< MatrixType, Size >, SparseDiagonalProduct< Lhs, Rhs >, SparseVector< _Scalar, _Options, _Index >, SelfAdjointView< MatrixType, UpLo >, SparseSelfAdjointView< MatrixType, UpLo >, TriangularBase< Derived >, MappedSparseMatrix< _Scalar, _Flags, _Index >, TriangularBase< TriangularView< _MatrixType, _Mode > >, TriangularBase< SelfAdjointView< MatrixType, UpLo > >, SparseView< MatrixType >, and SparseTriangularView< MatrixType, Mode >.
Referenced by PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_resize_to_match(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::addTo(), Array< Index, 64, 1 >::Array(), Matrix< Index, 1, ColsAtCompileTime, RowMajor, 1, MaxColsAtCompileTime >::Matrix(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::size(), and EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::subTo().
|
protected |
|
inlineinherited |
|
inlineinherited |
|
protected |
|
protected |
|
protected |
|
protected |
|
inlineinherited |
Referenced by MatrixBase< Derived >::applyOnTheLeft(), MatrixBase< Derived >::applyOnTheRight(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyThisOnTheLeft(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyThisOnTheRight(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyTranspositionOnTheLeft(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyTranspositionOnTheRight(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::assign(), SparseVector< _Scalar, _Options, _Index >::assign(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::assignGeneric(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::binaryExpr(), TriangularBase< SelfAdjointView< MatrixType, UpLo > >::coeff(), TriangularBase< SelfAdjointView< MatrixType, UpLo > >::coeffRef(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::cols(), TriangularBase< SelfAdjointView< MatrixType, UpLo > >::cols(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::cols(), TriangularBase< SelfAdjointView< MatrixType, UpLo > >::copyCoeff(), SparseMatrixBase< Derived >::dot(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::eval(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::evalTo(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::evalTo(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::indices(), TriangularBase< SelfAdjointView< MatrixType, UpLo > >::innerStride(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::inverse(), TriangularView< _MatrixType, _Mode >::lazyAssign(), SluMatrix::Map(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::markAsRValue(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::nonZeros(), RotationBase< Derived, 3 >::operator*(), Translation< _Scalar, _Dim >::operator*(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::operator*(), SparseMatrixBase< Derived >::operator*(), Transform< _Scalar, _Dim, _Mode, _Options >::operator*(), Eigen::operator*(), MatrixBase< Derived >::operator*=(), DenseBase< Derived >::operator+=(), SparseMatrixBase< Derived >::operator+=(), DenseBase< Derived >::operator-=(), SparseMatrixBase< Derived >::operator-=(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::operator=(), MatrixBase< Derived >::operator=(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::operator=(), TriangularView< _MatrixType, _Mode >::operator=(), DenseBase< Derived >::operator=(), Transform< _Scalar, _Dim, _Mode, _Options >::operator=(), Map< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >, _PacketAccess >::operator=(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::operator=(), SparseMatrix< Scalar, RowMajor >::operator=(), TriangularBase< SelfAdjointView< MatrixType, UpLo > >::outerStride(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::PlainObjectBase(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::resizeLike(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::rows(), TriangularBase< SelfAdjointView< MatrixType, UpLo > >::rows(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::rows(), SimplicialCholeskyBase< SimplicialLDLT< _MatrixType, _UpLo > >::solve(), PardisoImpl< PardisoLU< MatrixType > >::solve(), IterativeSolverBase< ConjugateGradient< _MatrixType, _UpLo, _Preconditioner > >::solve(), CholmodBase< _MatrixType, _UpLo, CholmodSimplicialLLT< _MatrixType, _UpLo > >::solve(), PastixBase< PastixLU< _MatrixType > >::solve(), SparseTriangularView< MatrixType, Mode >::solveInPlace(), SparseMatrix< Scalar, RowMajor >::SparseMatrix(), SparseVector< _Scalar, _Options, _Index >::SparseVector(), TriangularView< _MatrixType, _Mode >::swap(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::toDense(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::toDenseMatrix(), Transform< _Scalar, _Dim, _Mode, _Options >::Transform(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::transpose(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::transpose(), and SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::twistedBy().
|
inlineinherited |
|
inlineinherited |
|
protected |
|
inline |
References eigen_assert.
|
inline |
This is synonymous to operator[](Index) const.
This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.
References eigen_assert.
|
inline |
This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.
References eigen_assert, and EIGEN_STATIC_ASSERT.
|
protected |
|
inline |
References col(), eigen_internal_assert, and row().
|
inline |
References eigen_internal_assert.
|
inline |
References Eigen::RowMajorBit.
|
inlineinherited |
Reimplemented in Transpose< PermutationBase< Derived > >, SparseSymmetricPermutationProduct< MatrixType, UpLo >, SparseInnerVectorSet< SparseMatrix< _Scalar, _Options, _Index >, Size >, TriangularView< _MatrixType, _Mode >, HouseholderSequence< VectorsType, CoeffsType, Side >, SparseMatrixBase< Derived >, SparseMatrixBase< SparseMatrix< Scalar, _Options, int > >, SparseMatrixBase< SparseInnerVectorSet< SparseMatrix< _Scalar, _Options, _Index >, Size > >, SparseMatrixBase< CwiseUnaryOp< UnaryOp, MatrixType > >, SparseMatrixBase< Transpose< MatrixType > >, SparseMatrixBase< SparseDiagonalProduct< Lhs, Rhs > >, SparseMatrixBase< SparseMatrix< Scalar, _Options, _Index > >, SparseMatrixBase< CwiseUnaryView< ViewOp, MatrixType > >, SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >, SparseMatrixBase< SparseDenseOuterProduct< Lhs, Rhs, Tr > >, SparseMatrixBase< SparseInnerVectorSet< MatrixType, Size > >, SparseMatrixBase< MappedSparseMatrix< _Scalar, _Flags, _Index > >, SparseMatrixBase< SparseSparseProduct< LhsNested, RhsNested > >, SparseMatrixBase< SparseMatrix< Scalar, _Options, Index > >, SparseMatrixBase< SparseTriangularView< MatrixType, Mode > >, SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >, SparseMatrixBase< SparseView< MatrixType > >, SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >, SparseSparseProduct< LhsNested, RhsNested >, SparseMatrix< _Scalar, _Options, _Index >, SparseMatrix< Scalar >, SparseMatrix< Scalar, ColMajor, Index >, SparseMatrix< Scalar, ColMajor >, SparseMatrix< Scalar, ColMajor, int >, SparseMatrix< Scalar, RowMajor, Index >, SparseMatrix< Scalar, RowMajor >, PermutationBase< Derived >, PermutationBase< PermutationWrapper< _IndicesType > >, PermutationBase< Map< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >, _PacketAccess > >, PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >, PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >, SparseDenseOuterProduct< Lhs, Rhs, Tr >, SparseInnerVectorSet< MatrixType, Size >, SparseDiagonalProduct< Lhs, Rhs >, SparseVector< _Scalar, _Options, _Index >, SelfAdjointView< MatrixType, UpLo >, SparseSelfAdjointView< MatrixType, UpLo >, TriangularBase< Derived >, MappedSparseMatrix< _Scalar, _Flags, _Index >, TriangularBase< TriangularView< _MatrixType, _Mode > >, TriangularBase< SelfAdjointView< MatrixType, UpLo > >, SparseView< MatrixType >, and SparseTriangularView< MatrixType, Mode >.
Referenced by PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_resize_to_match(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::addTo(), Array< Index, 64, 1 >::Array(), Matrix< Index, 1, ColsAtCompileTime, RowMajor, 1, MaxColsAtCompileTime >::Matrix(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::size(), and EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::subTo().
|
protected |
|
inlineinherited |
Reimplemented in SparseMatrixBase< Derived >, SparseMatrixBase< SparseMatrix< Scalar, _Options, int > >, SparseMatrixBase< SparseInnerVectorSet< SparseMatrix< _Scalar, _Options, _Index >, Size > >, SparseMatrixBase< CwiseUnaryOp< UnaryOp, MatrixType > >, SparseMatrixBase< Transpose< MatrixType > >, SparseMatrixBase< SparseDiagonalProduct< Lhs, Rhs > >, SparseMatrixBase< SparseMatrix< Scalar, _Options, _Index > >, SparseMatrixBase< CwiseUnaryView< ViewOp, MatrixType > >, SparseMatrixBase< SparseMatrix< _Scalar, _Options, _Index > >, SparseMatrixBase< SparseDenseOuterProduct< Lhs, Rhs, Tr > >, SparseMatrixBase< SparseInnerVectorSet< MatrixType, Size > >, SparseMatrixBase< MappedSparseMatrix< _Scalar, _Flags, _Index > >, SparseMatrixBase< SparseSparseProduct< LhsNested, RhsNested > >, SparseMatrixBase< SparseMatrix< Scalar, _Options, Index > >, SparseMatrixBase< SparseTriangularView< MatrixType, Mode > >, SparseMatrixBase< SparseVector< _Scalar, _Options, _Index > >, SparseMatrixBase< SparseView< MatrixType > >, SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >, PermutationBase< Derived >, PermutationBase< PermutationWrapper< _IndicesType > >, PermutationBase< Map< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >, _PacketAccess > >, PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >, and PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >.
Referenced by PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::_resize_to_match().
|
protected |
|
inlineinherited |
|
inline |
equivalent to operator[](3).
|
protected |
|
protected |
|
inline |
equivalent to operator[](0).
|
inline |
equivalent to operator[](1).
|
inline |
equivalent to operator[](2).