Expression of a diagonal/subdiagonal/superdiagonal in a matrix. More...
Inherits type< Diagonal< MatrixType, DiagIndex > >.
Public Types | |
| typedef internal::dense_xpr_base < Diagonal >::type | Base |
| typedef internal::conditional < internal::is_lvalue < MatrixType >::value, Scalar, const Scalar >::type | ScalarWithConstIfNotLvalue |
Public Member Functions | |
| CoeffReturnType | coeff (Index row, Index) const |
| CoeffReturnType | coeff (Index index) const |
| Scalar & | coeffRef (Index row, Index) |
| const Scalar & | coeffRef (Index row, Index) const |
| Scalar & | coeffRef (Index index) |
| const Scalar & | coeffRef (Index index) const |
| Index | cols () const |
| ScalarWithConstIfNotLvalue * | data () |
| const Scalar * | data () const |
| Diagonal (MatrixType &matrix, Index index=DiagIndex) | |
| int | index () const |
| Index | innerStride () const |
| const internal::remove_all < typename MatrixType::Nested > ::type & | nestedExpression () const |
| Index | outerStride () const |
| Index | rows () const |
Protected Attributes | |
| const internal::variable_if_dynamic < Index, DiagIndex > | m_index |
| MatrixType::Nested | m_matrix |
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 Dynamic 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.
| typedef internal::conditional< internal::is_lvalue<MatrixType>::value, Scalar, const Scalar >::type ScalarWithConstIfNotLvalue |
| Diagonal | ( | MatrixType & | matrix, |
| Index | index = DiagIndex |
||
| ) | [inline] |
| CoeffReturnType coeff | ( | Index | index | ) | const [inline] |
| Index cols | ( | void | ) | const [inline] |
| ScalarWithConstIfNotLvalue* data | ( | ) | [inline] |
| const Scalar* data | ( | ) | const [inline] |
| int index | ( | ) | const [inline] |
| Index innerStride | ( | ) | const [inline] |
| const internal::remove_all<typename MatrixType::Nested>::type& nestedExpression | ( | ) | const [inline] |
| Index outerStride | ( | ) | const [inline] |
| Index rows | ( | void | ) | const [inline] |
MatrixType::Nested m_matrix [protected] |
1.7.5.1