MCPcopy Create free account
hub / github.com/avaxman/Directional / zeroReduction

Function zeroReduction

external/eigen/test/zerosized.cpp:13–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11
12
13template<typename MatrixType> void zeroReduction(const MatrixType& m) {
14 // Reductions that must hold for zero sized objects
15 VERIFY(m.all());
16 VERIFY(!m.any());
17 VERIFY(m.prod()==1);
18 VERIFY(m.sum()==0);
19 VERIFY(m.norm()==0);
20 VERIFY(m.squaredNorm()==0);
21 VERIFY(m.count()==0);
22 VERIFY(m.allFinite());
23 VERIFY(!m.hasNaN());
24 VERIFY_RAISES_ASSERT( m.minCoeff() );
25 VERIFY_RAISES_ASSERT( m.maxCoeff() );
26 Index i,j;
27 VERIFY_RAISES_ASSERT( m.minCoeff(&i,&j) );
28 VERIFY_RAISES_ASSERT( m.maxCoeff(&i,&j) );
29 VERIFY_RAISES_ASSERT( m.reshaped().minCoeff(&i) );
30 VERIFY_RAISES_ASSERT( m.reshaped().maxCoeff(&i) );
31}
32
33
34template<typename MatrixType> void zeroSizedMatrix()

Callers 2

zeroSizedMatrixFunction · 0.85
zeroSizedVectorFunction · 0.85

Calls 11

allFiniteMethod · 0.80
hasNaNMethod · 0.80
allMethod · 0.45
anyMethod · 0.45
prodMethod · 0.45
sumMethod · 0.45
normMethod · 0.45
squaredNormMethod · 0.45
countMethod · 0.45
minCoeffMethod · 0.45
maxCoeffMethod · 0.45

Tested by

no test coverage detected