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

Base class providing read-only coefficient access to matrices and arrays.

Template parameters
Derived Type of the derived class

This class defines the operator() const function and friends, which can be used to read specific entries of a matrix or array.

Base classes

template<typename Derived>
class EigenBase

Derived classes

template<typename Derived>
class DenseCoeffsBase<Derived, DirectAccessors>
Base class providing direct read-only coefficient access to matrices and arrays.
template<typename Derived>
class DenseCoeffsBase<Derived, WriteAccessors>
Base class providing read/write coefficient access to matrices and arrays.

Public functions

auto coeff(Index row, Index col) const -> CoeffReturnType
auto coeff(Index index) const -> CoeffReturnType
auto cols() const -> Index
auto derived() -> Derived&
auto derived() const -> const Derived&
auto operator()(Index row, Index col) const -> CoeffReturnType
auto operator()(Index index) const -> CoeffReturnType
auto operator[](Index index) const -> CoeffReturnType
auto rows() const -> Index
auto size() const -> Index
auto w() const -> CoeffReturnType
auto x() const -> CoeffReturnType
auto y() const -> CoeffReturnType
auto z() const -> CoeffReturnType

Function documentation

template<typename Derived>
CoeffReturnType Eigen::DenseCoeffsBase<Derived, ReadOnlyAccessors><Derived>::coeff(Index row, Index col) const

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.

template<typename Derived>
CoeffReturnType Eigen::DenseCoeffsBase<Derived, ReadOnlyAccessors><Derived>::coeff(Index index) const

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.

template<typename Derived>
Index Eigen::DenseCoeffsBase<Derived, ReadOnlyAccessors><Derived>::cols() const

Returns the number of columns.

template<typename Derived>
Derived& Eigen::DenseCoeffsBase<Derived, ReadOnlyAccessors><Derived>::derived()

Returns a reference to the derived object

template<typename Derived>
const Derived& Eigen::DenseCoeffsBase<Derived, ReadOnlyAccessors><Derived>::derived() const

Returns a const reference to the derived object

template<typename Derived>
CoeffReturnType Eigen::DenseCoeffsBase<Derived, ReadOnlyAccessors><Derived>::operator()(Index row, Index col) const

Returns the coefficient at given the given row and column.

template<typename Derived>
CoeffReturnType Eigen::DenseCoeffsBase<Derived, ReadOnlyAccessors><Derived>::operator()(Index index) const

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.

template<typename Derived>
CoeffReturnType Eigen::DenseCoeffsBase<Derived, ReadOnlyAccessors><Derived>::operator[](Index index) const

Returns the coefficient at given index.

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

template<typename Derived>
Index Eigen::DenseCoeffsBase<Derived, ReadOnlyAccessors><Derived>::rows() const

Returns the number of rows.

template<typename Derived>
Index Eigen::DenseCoeffsBase<Derived, ReadOnlyAccessors><Derived>::size() const

Returns the number of coefficients, which is rows()*cols().

template<typename Derived>
CoeffReturnType Eigen::DenseCoeffsBase<Derived, ReadOnlyAccessors><Derived>::w() const

equivalent to operator[](3).

template<typename Derived>
CoeffReturnType Eigen::DenseCoeffsBase<Derived, ReadOnlyAccessors><Derived>::x() const

equivalent to operator[](0).

template<typename Derived>
CoeffReturnType Eigen::DenseCoeffsBase<Derived, ReadOnlyAccessors><Derived>::y() const

equivalent to operator[](1).

template<typename Derived>
CoeffReturnType Eigen::DenseCoeffsBase<Derived, ReadOnlyAccessors><Derived>::z() const

equivalent to operator[](2).