diff options
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> |