- introduce sum() returning the sum of the coeffs of a vector

- reimplement trace() as just diagonal().sum()
- apidoc fixes
This commit is contained in:
Benoit Jacob
2008-03-15 11:05:38 +00:00
parent fb3438e609
commit 29184ad27d
7 changed files with 121 additions and 91 deletions

View File

@@ -230,8 +230,7 @@ template<typename Derived> class MatrixBase
{ return matrix*scalar; }
//@}
/** \name Matrix product and related notions
* including the trace...
/** \name Matrix product
*/
//@{
template<typename OtherDerived>
@@ -244,7 +243,12 @@ template<typename Derived> class MatrixBase
template<typename OtherDerived>
Derived& operator*=(const MatrixBase<OtherDerived>& other);
//@}
/** \name Sums of coefficients
*/
//@{
Scalar sum() const;
Scalar trace() const;
//@}