diff options
author | Gael Guennebaud <g.gael@free.fr> | 2015-11-18 23:29:07 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2015-11-18 23:29:07 +0100 |
commit | 199499910525b41f33be6034be164292d7d9d853 (patch) | |
tree | 64a525264148a0f4a7a83da9fb65c7d3f829f3c0 /test/visitor.cpp | |
parent | 1dd444ea71d30cc3a1eab7af0ba3f6a0357ae93c (diff) |
Add regression unit test for prod.maxCoeff(i)
Diffstat (limited to 'test/visitor.cpp')
-rw-r--r-- | test/visitor.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/visitor.cpp b/test/visitor.cpp index 39a5d6b5f..844170ec6 100644 --- a/test/visitor.cpp +++ b/test/visitor.cpp @@ -55,6 +55,11 @@ template<typename MatrixType> void matrixVisitor(const MatrixType& p) VERIFY_IS_APPROX(maxc, eigen_maxc); VERIFY_IS_APPROX(minc, m.minCoeff()); VERIFY_IS_APPROX(maxc, m.maxCoeff()); + + eigen_maxc = (m.adjoint()*m).maxCoeff(&eigen_maxrow,&eigen_maxcol); + eigen_maxc = (m.adjoint()*m).eval().maxCoeff(&maxrow,&maxcol); + VERIFY(maxrow == eigen_maxrow); + VERIFY(maxcol == eigen_maxcol); } template<typename VectorType> void vectorVisitor(const VectorType& w) |