From e3d890bc5a89798eff50ff6650292b4fa934f72e Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 18 Nov 2009 18:15:19 +0100 Subject: 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 --- Eigen/src/Core/DiagonalMatrix.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Eigen/src/Core/DiagonalMatrix.h') 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 template const DiagonalProduct operator*(const MatrixBase &matrix) const; + + inline const DiagonalWrapper, DiagonalVectorType> > > + inverse() const + { + return diagonal().cwiseInverse().nestByValue(); + } }; template -- cgit v1.2.3