aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/CwiseUnaryOp.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-11-14 09:55:25 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-11-14 09:55:25 +0000
commit139529e97b76c250c13474a1ebc9f6dbf27b6115 (patch)
tree78451fa6c5aed1804788188b2076c6e3d690d03b /Eigen/src/Core/CwiseUnaryOp.h
parent86ccd99d8d9a87d03f2f327766a02cc13849b54d (diff)
* add .imag() function
* fix a very old bug in EigenSolver that I had completely forgotten (thanks to Timothy to refresh my mind) * fix doc of Matrix::Map
Diffstat (limited to 'Eigen/src/Core/CwiseUnaryOp.h')
-rw-r--r--Eigen/src/Core/CwiseUnaryOp.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/Eigen/src/Core/CwiseUnaryOp.h b/Eigen/src/Core/CwiseUnaryOp.h
index a50a9c30d..4ceb6d98a 100644
--- a/Eigen/src/Core/CwiseUnaryOp.h
+++ b/Eigen/src/Core/CwiseUnaryOp.h
@@ -174,13 +174,17 @@ MatrixBase<Derived>::conjugate() const
/** \returns an expression of the real part of \c *this.
*
- * \sa adjoint() */
+ * \sa imag() */
template<typename Derived>
inline const typename MatrixBase<Derived>::RealReturnType
-MatrixBase<Derived>::real() const
-{
- return derived();
-}
+MatrixBase<Derived>::real() const { return derived(); }
+
+/** \returns an expression of the imaginary part of \c *this.
+ *
+ * \sa real() */
+template<typename Derived>
+inline const typename MatrixBase<Derived>::ImagReturnType
+MatrixBase<Derived>::imag() const { return derived(); }
/** \returns an expression of *this with the \a Scalar type casted to
* \a NewScalar.