mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
bug #1592: makes partial min/max reductions trigger an assertion on inputs with a zero reduction length (+doc and tests)
This commit is contained in:
@@ -16,9 +16,13 @@ template<typename MatrixType> void zeroReduction(const MatrixType& m) {
|
||||
VERIFY(!m.any());
|
||||
VERIFY(m.prod()==1);
|
||||
VERIFY(m.sum()==0);
|
||||
VERIFY(m.norm()==0);
|
||||
VERIFY(m.squaredNorm()==0);
|
||||
VERIFY(m.count()==0);
|
||||
VERIFY(m.allFinite());
|
||||
VERIFY(!m.hasNaN());
|
||||
VERIFY_RAISES_ASSERT( m.minCoeff() );
|
||||
VERIFY_RAISES_ASSERT( m.maxCoeff() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user