Add conjugateIf<bool> members to DesneBase, TriangularView, SelfadjointView, and make PartialPivLU use it.

This commit is contained in:
Gael Guennebaud
2019-01-17 11:33:43 +01:00
parent 7b35c26b1c
commit 7f32109c11
6 changed files with 69 additions and 15 deletions

View File

@@ -143,6 +143,9 @@ template<typename MatrixType> void adjoint(const MatrixType& m)
RealVectorType rv1 = RealVectorType::Random(rows);
VERIFY_IS_APPROX(v1.dot(rv1.template cast<Scalar>()), v1.dot(rv1));
VERIFY_IS_APPROX(rv1.template cast<Scalar>().dot(v1), rv1.dot(v1));
VERIFY( is_same_type(m1,m1.template conjugateIf<false>()) );
VERIFY( is_same_type(m1.conjugate(),m1.template conjugateIf<true>()) );
}
template<int>