mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Enable visitor on empty matrices (the visitor is left unchanged), and protect min/maxCoeff(Index*,Index*) on empty matrices by an assertion (+ doc & unit tests)
This commit is contained in:
@@ -23,6 +23,11 @@ template<typename MatrixType> void zeroReduction(const MatrixType& m) {
|
||||
VERIFY(!m.hasNaN());
|
||||
VERIFY_RAISES_ASSERT( m.minCoeff() );
|
||||
VERIFY_RAISES_ASSERT( m.maxCoeff() );
|
||||
Index i,j;
|
||||
VERIFY_RAISES_ASSERT( m.minCoeff(&i,&j) );
|
||||
VERIFY_RAISES_ASSERT( m.maxCoeff(&i,&j) );
|
||||
VERIFY_RAISES_ASSERT( m.reshaped().minCoeff(&i) );
|
||||
VERIFY_RAISES_ASSERT( m.reshaped().maxCoeff(&i) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user