Public Member Functions | List of all members
DenseCoeffsBase< Derived, DirectWriteAccessors > Class Template Reference

Base class providing direct read/write coefficient access to matrices and arrays. More...

#include <DenseCoeffsBase.h>

+ Inheritance diagram for DenseCoeffsBase< Derived, DirectWriteAccessors >:

Public Member Functions

CoeffReturnType coeff (Index row, Index col) const
CoeffReturnType coeff (Index index) const
Scalar & coeffRef (Index row, Index col)
Scalar & coeffRef (Index index)
Index cols () const
Index colStride () const
Derived & derived ()
const Derived & derived () const
Index innerStride () const
CoeffReturnType operator() (Index row, Index col) const
CoeffReturnType operator() (Index index) const
Scalar & operator() (Index row, Index col)
Scalar & operator() (Index index)
CoeffReturnType operator[] (Index index) const
Scalar & operator[] (Index index)
Index outerStride () const
Index rows () const
Index rowStride () const
Index size () const
CoeffReturnType w () const
Scalar & w ()
CoeffReturnType x () const
Scalar & x ()
CoeffReturnType y () const
Scalar & y ()
CoeffReturnType z () const
Scalar & z ()

Detailed Description

template<typename Derived>
class Eigen::DenseCoeffsBase< Derived, DirectWriteAccessors >

Base class providing direct read/write coefficient access to matrices and arrays.

Template Parameters
DerivedType of the derived class
DirectWriteAccessorsConstant indicating direct access

This class defines functions to work with strides which can be used to access entries directly. This class inherits DenseCoeffsBase<Derived, WriteAccessors> which defines functions to access entries read/write using operator().

See Also
The class hierarchy

Member Function Documentation

CoeffReturnType coeff ( Index  row,
Index  col 
) const
inlineinherited

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 .

See Also
operator()(Index,Index) const, coeffRef(Index,Index), coeff(Index) const
CoeffReturnType coeff ( Index  index) const
inlineinherited

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 .

See Also
operator[](Index) const, coeffRef(Index), coeff(Index,Index) const
Scalar& coeffRef ( Index  row,
Index  col 
)
inlineinherited

Short version: don't use this function, use operator()(Index,Index) instead.

Long version: this function is similar to operator()(Index,Index), 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).

See Also
operator()(Index,Index), coeff(Index, Index) const, coeffRef(Index)
Scalar& coeffRef ( Index  index)
inlineinherited

Short version: don't use this function, use operator[](Index) instead.

Long version: this function is similar to operator[](Index), 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).

See Also
operator[](Index), coeff(Index) const, coeffRef(Index,Index)
Index cols ( void  ) const
inlineinherited
Returns
the number of columns.
See Also
rows(), ColsAtCompileTime

Reimplemented in 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 > >, 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 > >, SparseVector< _Scalar, _Options, _Index >, SelfAdjointView< MatrixType, UpLo >, SparseSelfAdjointView< MatrixType, UpLo >, and MappedSparseMatrix< _Scalar, _Flags, _Index >.

Referenced by Array< Index, 64, 1, DontAlign >::Array(), Matrix< Index, 1, ColsAtCompileTime, RowMajor, 1, MaxColsAtCompileTime >::Matrix(), and EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::size().

Index colStride ( ) const
inline
Returns
the pointer increment between two consecutive columns.
See Also
innerStride(), outerStride(), rowStride()
Derived& derived ( )
inlineinherited
Returns
a reference to the derived object

Referenced by MatrixBase< Derived >::applyOnTheLeft(), MatrixBase< Derived >::applyOnTheRight(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyTranspositionOnTheLeft(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyTranspositionOnTheRight(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::binaryExpr(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::cols(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::cols(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::eval(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::imag(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::indices(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::inverse(), 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*=(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::operator=(), MatrixBase< Derived >::operator=(), DenseBase< Derived >::operator=(), Transform< _Scalar, _Dim, _Mode, _Options >::operator=(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::operator=(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::PlainObjectBase(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::resizeLike(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::rows(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::rows(), SimplicialCholeskyBase< SimplicialLDLT< _MatrixType, _UpLo > >::solve(), IterativeSolverBase< ConjugateGradient< _MatrixType, _UpLo, _Preconditioner > >::solve(), CholmodBase< _MatrixType, _UpLo, CholmodSimplicialLLT< _MatrixType, _UpLo > >::solve(), SparseMatrix< Scalar, RowMajor >::SparseMatrix(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::toDenseMatrix(), Transform< _Scalar, _Dim, _Mode, _Options >::Transform(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::transpose(), and SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::twistedBy().

const Derived& derived ( ) const
inlineinherited
Returns
a const reference to the derived object
Index innerStride ( ) const
inline
Returns
the pointer increment between two consecutive elements within a slice in the inner direction.
See Also
outerStride(), rowStride(), colStride()
CoeffReturnType operator() ( Index  row,
Index  col 
) const
inlineinherited
Returns
the coefficient at given the given row and column.
See Also
operator()(Index,Index), operator[](Index)
CoeffReturnType operator() ( Index  index) const
inlineinherited
Returns
the coefficient at given index.

This is synonymous to operator[](Index) const.

This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.

See Also
operator[](Index), operator()(Index,Index) const, x() const, y() const, z() const, w() const
Scalar& operator() ( Index  row,
Index  col 
)
inlineinherited
Returns
a reference to the coefficient at given the given row and column.
See Also
operator[](Index)
Scalar& operator() ( Index  index)
inlineinherited
Returns
a reference to the coefficient at given index.

This is synonymous to operator[](Index).

This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.

See Also
operator[](Index) const, operator()(Index,Index), x(), y(), z(), w()
CoeffReturnType operator[] ( Index  index) const
inlineinherited
Returns
the coefficient at given index.

This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.

See Also
operator[](Index), operator()(Index,Index) const, x() const, y() const, z() const, w() const
Scalar& operator[] ( Index  index)
inlineinherited
Returns
a reference to the coefficient at given index.

This method is allowed only for vector expressions, and for matrix expressions having the LinearAccessBit.

See Also
operator[](Index) const, operator()(Index,Index), x(), y(), z(), w()
Index outerStride ( ) const
inline
Returns
the pointer increment between two consecutive inner slices (for example, between two consecutive columns in a column-major matrix).
See Also
innerStride(), rowStride(), colStride()
Index rows ( void  ) const
inlineinherited
Returns
the number of rows.
See Also
cols(), RowsAtCompileTime

Reimplemented in 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 > >, 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 > >, SparseVector< _Scalar, _Options, _Index >, SelfAdjointView< MatrixType, UpLo >, SparseSelfAdjointView< MatrixType, UpLo >, and MappedSparseMatrix< _Scalar, _Flags, _Index >.

Referenced by Array< Index, 64, 1, DontAlign >::Array(), Matrix< Index, 1, ColsAtCompileTime, RowMajor, 1, MaxColsAtCompileTime >::Matrix(), and EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::size().

Index rowStride ( ) const
inline
Returns
the pointer increment between two consecutive rows.
See Also
innerStride(), outerStride(), colStride()
Index size ( ) const
inlineinherited
Returns
the number of coefficients, which is rows()*cols().
See Also
rows(), cols(), SizeAtCompileTime.

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 > >.

CoeffReturnType w ( ) const
inlineinherited

equivalent to operator[](3).

Scalar& w ( )
inlineinherited

equivalent to operator[](3).

CoeffReturnType x ( ) const
inlineinherited

equivalent to operator[](0).

Scalar& x ( )
inlineinherited

equivalent to operator[](0).

CoeffReturnType y ( ) const
inlineinherited

equivalent to operator[](1).

Scalar& y ( )
inlineinherited

equivalent to operator[](1).

CoeffReturnType z ( ) const
inlineinherited

equivalent to operator[](2).

Scalar& z ( )
inlineinherited

equivalent to operator[](2).


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