From 7f32109c11b9cbc3cedc72e59683bf5839d35d75 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 17 Jan 2019 11:33:43 +0100 Subject: Add conjugateIf members to DesneBase, TriangularView, SelfadjointView, and make PartialPivLU use it. --- Eigen/src/Core/TriangularMatrix.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Eigen/src/Core/TriangularMatrix.h') diff --git a/Eigen/src/Core/TriangularMatrix.h b/Eigen/src/Core/TriangularMatrix.h index 521de6160..cf3532f06 100644 --- a/Eigen/src/Core/TriangularMatrix.h +++ b/Eigen/src/Core/TriangularMatrix.h @@ -198,6 +198,7 @@ template class TriangularView typedef typename internal::traits::MatrixTypeNestedNonRef MatrixTypeNestedNonRef; typedef typename internal::remove_all::type MatrixConjugateReturnType; + typedef TriangularView::type, _Mode> ConstTriangularView; public: @@ -243,6 +244,18 @@ template class TriangularView inline const ConjugateReturnType conjugate() const { return ConjugateReturnType(m_matrix.conjugate()); } + /** \returns an expression of the complex conjugate of \c *this if Cond==true, + * returns \c *this otherwise. + */ + template + EIGEN_DEVICE_FUNC + inline typename internal::conditional::type + conjugateIf() const + { + typedef typename internal::conditional::type ReturnType; + return ReturnType(m_matrix.template conjugateIf()); + } + typedef TriangularView AdjointReturnType; /** \sa MatrixBase::adjoint() const */ EIGEN_DEVICE_FUNC -- cgit v1.2.3