mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
add snippet for sub/super diagonal
fix a few doc issues
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
* It is the return type of MatrixBase::cwise()
|
||||
* and most of the time this is the only way it is used.
|
||||
*
|
||||
* Note that some methods are defined in the \ref Array module.
|
||||
* Note that some methods are defined in the \ref Array_Module array module.
|
||||
*
|
||||
* Example: \include MatrixBase_cwise_const.cpp
|
||||
* Output: \verbinclude MatrixBase_cwise_const.out
|
||||
|
||||
@@ -49,12 +49,12 @@ struct ei_traits<DiagonalCoeffs<MatrixType,DiagId> >
|
||||
enum {
|
||||
AbsDiagId = DiagId<0 ? -DiagId : DiagId,
|
||||
RowsAtCompileTime = int(MatrixType::SizeAtCompileTime) == Dynamic ? Dynamic
|
||||
: EIGEN_ENUM_MIN(MatrixType::RowsAtCompileTime,
|
||||
MatrixType::ColsAtCompileTime) - AbsDiagId,
|
||||
: (EIGEN_ENUM_MIN(MatrixType::RowsAtCompileTime,
|
||||
MatrixType::ColsAtCompileTime) - AbsDiagId),
|
||||
ColsAtCompileTime = 1,
|
||||
MaxRowsAtCompileTime = int(MatrixType::MaxSizeAtCompileTime) == Dynamic ? Dynamic
|
||||
: EIGEN_ENUM_MIN(MatrixType::MaxRowsAtCompileTime,
|
||||
MatrixType::MaxColsAtCompileTime),
|
||||
: (EIGEN_ENUM_MIN(MatrixType::MaxRowsAtCompileTime,
|
||||
MatrixType::MaxColsAtCompileTime) - AbsDiagId),
|
||||
MaxColsAtCompileTime = 1,
|
||||
Flags = (unsigned int)_MatrixTypeNested::Flags & (HereditaryBits | LinearAccessBit),
|
||||
CoeffReadCost = _MatrixTypeNested::CoeffReadCost
|
||||
@@ -135,6 +135,9 @@ MatrixBase<Derived>::diagonal() const
|
||||
* The template parameter \a Id represent a super diagonal if \a Id > 0
|
||||
* and a sub diagonal otherwise. \a Id == 0 is equivalent to the main diagonal.
|
||||
*
|
||||
* Example: \include MatrixBase_diagonal_int.cpp
|
||||
* Output: \verbinclude MatrixBase_diagonal_int.out
|
||||
*
|
||||
* \sa MatrixBase::diagonal(), class DiagonalCoeffs */
|
||||
template<typename Derived>
|
||||
template<int Id>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
* types. Most of the Eigen API is contained in this class. Other important classes for
|
||||
* the Eigen API are Matrix, Cwise, and PartialRedux.
|
||||
*
|
||||
* Note that some methods are defined in the \ref Array module.
|
||||
* Note that some methods are defined in the \ref Array_Module array module.
|
||||
*
|
||||
* \param Derived is the derived type, e.g. a matrix type, or an expression, etc.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user