diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-11-18 18:15:19 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-11-18 18:15:19 +0100 |
commit | e3d890bc5a89798eff50ff6650292b4fa934f72e (patch) | |
tree | 3c7d40332a019dce2773fc6a096d046eeab9fb7a /Eigen/src/Core/DiagonalMatrix.h | |
parent | 0529ecfe1b43d40e40755a2d856188d3ded2c14e (diff) |
Another big refactoring change:
* add a new Eigen2Support module including Cwise, Flagged, and some other deprecated stuff
* add a few cwiseXxx functions
* adapt a few modules to use cwiseXxx instead of the .cwise() prefix
Diffstat (limited to 'Eigen/src/Core/DiagonalMatrix.h')
-rw-r--r-- | Eigen/src/Core/DiagonalMatrix.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Eigen/src/Core/DiagonalMatrix.h b/Eigen/src/Core/DiagonalMatrix.h index 1dec82229..6f93737ff 100644 --- a/Eigen/src/Core/DiagonalMatrix.h +++ b/Eigen/src/Core/DiagonalMatrix.h @@ -68,6 +68,12 @@ class DiagonalBase : public AnyMatrixBase<Derived> template<typename MatrixDerived> const DiagonalProduct<MatrixDerived, Derived, OnTheLeft> operator*(const MatrixBase<MatrixDerived> &matrix) const; + + inline const DiagonalWrapper<NestByValue<CwiseUnaryOp<ei_scalar_inverse_op<Scalar>, DiagonalVectorType> > > + inverse() const + { + return diagonal().cwiseInverse().nestByValue(); + } }; template<typename Derived> |