Expression of the main diagonal of a matrix. More...
Public Member Functions | |
const Scalar | coeff (int index) const |
const Scalar | coeff (int row, int) const |
Scalar & | coeffRef (int index) |
Scalar & | coeffRef (int row, int) |
int | cols () const |
DiagonalCoeffs (const MatrixType &matrix) | |
int | rows () const |
Protected Attributes | |
const MatrixType::Nested | m_matrix |
Expression of the main diagonal of a matrix.
MatrixType | the type of the object in which we are taking the main diagonal |
The matrix is not required to be square.
This class represents an expression of the main diagonal of a square matrix. It is the return type of MatrixBase::diagonal() and most of the time this is the only way it is used.
int cols | ( | void | ) | const [inline] |
Reimplemented from MatrixBase< DiagonalCoeffs< MatrixType > >.
int rows | ( | void | ) | const [inline] |
Reimplemented from MatrixBase< DiagonalCoeffs< MatrixType > >.