mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
-add set...() methods and their documentation; remove Generic
-use row-major traversal when the number of columns is fixed and the number of rows is dynamic -other minor changes
This commit is contained in:
@@ -60,7 +60,7 @@ template<typename MatrixType> class Identity : NoOperatorEquals,
|
||||
}
|
||||
|
||||
protected:
|
||||
int m_rows;
|
||||
const int m_rows;
|
||||
};
|
||||
|
||||
/** \returns an expression of the identity matrix of given type and size.
|
||||
@@ -108,5 +108,18 @@ bool MatrixBase<Scalar, Derived>::isIdentity
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Writes the identity expression into *this.
|
||||
*
|
||||
* Example: \include MatrixBase_setIdentity.cpp
|
||||
* Output: \verbinclude MatrixBase_setIdentity.out
|
||||
*
|
||||
* \sa class Identity, identity()
|
||||
*/
|
||||
template<typename Scalar, typename Derived>
|
||||
Derived& MatrixBase<Scalar, Derived>::setIdentity()
|
||||
{
|
||||
return *this = Identity<Derived>(rows());
|
||||
}
|
||||
|
||||
|
||||
#endif // EIGEN_IDENTITY_H
|
||||
|
||||
Reference in New Issue
Block a user