Expression of a diagonal/subdiagonal/superdiagonal in a matrix. More...
Inherits internal::dense_xpr_base::type.
Public Types | |
enum | { DiagIndex } |
typedef internal::dense_xpr_base< Diagonal >::type | Base |
typedef std::conditional_t< internal::is_lvalue< MatrixType >::value, Scalar, const Scalar > | ScalarWithConstIfNotLvalue |
Public Member Functions | |
CoeffReturnType | coeff (Index idx) const |
CoeffReturnType | coeff (Index row, Index) const |
Scalar & | coeffRef (Index idx) |
const Scalar & | coeffRef (Index idx) const |
Scalar & | coeffRef (Index row, Index) |
const Scalar & | coeffRef (Index row, Index) const |
EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
ScalarWithConstIfNotLvalue * | data () |
const Scalar * | data () const |
Diagonal (MatrixType &matrix, Index a_index=DiagIndex) | |
Index | index () const |
EIGEN_CONSTEXPR Index | innerStride () const EIGEN_NOEXCEPT |
const internal::remove_all_t< typename MatrixType::Nested > & | nestedExpression () const |
EIGEN_CONSTEXPR Index | outerStride () const EIGEN_NOEXCEPT |
Index | rows () const |
Protected Attributes | |
const internal::variable_if_dynamicindex< Index, DiagIndex > | m_index |
internal::ref_selector< MatrixType >::non_const_type | m_matrix |
Private Member Functions | |
EIGEN_CONSTEXPR Index | absDiagIndex () const EIGEN_NOEXCEPT |
EIGEN_CONSTEXPR Index | colOffset () const EIGEN_NOEXCEPT |
template<int LoadMode> | |
MatrixType::PacketReturnType | packet (Index) const |
template<int LoadMode> | |
MatrixType::PacketReturnType | packet (Index, Index) const |
EIGEN_CONSTEXPR Index | rowOffset () const EIGEN_NOEXCEPT |
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
MatrixType | the type of the object in which we are taking a sub/main/super diagonal |
DiagIndex | the index of the sub/super diagonal. The default is 0 and it means the main diagonal. A positive value means a superdiagonal, a negative value means a subdiagonal. You can also use DynamicIndex so the index can be set at runtime. |
The matrix is not required to be square.
This class represents an expression of the main diagonal, or any sub/super diagonal of a square matrix. It is the return type of MatrixBase::diagonal() and MatrixBase::diagonal(Index) and most of the time this is the only way it is used.
Definition at line 65 of file Diagonal.h.
typedef internal::dense_xpr_base<Diagonal>::type Eigen::Diagonal< MatrixType, DiagIndex_ >::Base |
Definition at line 71 of file Diagonal.h.
typedef std::conditional_t< internal::is_lvalue<MatrixType>::value, Scalar, const Scalar > Eigen::Diagonal< MatrixType, DiagIndex_ >::ScalarWithConstIfNotLvalue |
Definition at line 104 of file Diagonal.h.
anonymous enum |
|
inlineexplicit |
Definition at line 75 of file Diagonal.h.
|
inlineprivate |
Definition at line 169 of file Diagonal.h.
|
inline |
Definition at line 144 of file Diagonal.h.
|
inline |
Definition at line 125 of file Diagonal.h.
|
inline |
Definition at line 131 of file Diagonal.h.
|
inline |
Definition at line 138 of file Diagonal.h.
|
inline |
Definition at line 112 of file Diagonal.h.
|
inline |
|
inlineprivate |
Definition at line 173 of file Diagonal.h.
|
inline |
Definition at line 90 of file Diagonal.h.
|
inline |
Definition at line 107 of file Diagonal.h.
|
inline |
Definition at line 109 of file Diagonal.h.
|
inline |
Definition at line 157 of file Diagonal.h.
|
inline |
Definition at line 93 of file Diagonal.h.
|
inline |
Definition at line 151 of file Diagonal.h.
|
inline |
Definition at line 98 of file Diagonal.h.
|
private |
|
private |
|
inlineprivate |
Definition at line 171 of file Diagonal.h.
|
inline |
Definition at line 83 of file Diagonal.h.
|
protected |
Definition at line 164 of file Diagonal.h.
|
protected |
Definition at line 163 of file Diagonal.h.