10 #ifndef EIGEN_ALLANDANY_H
11 #define EIGEN_ALLANDANY_H
17 template<
typename Derived,
int UnrollCount>
20 typedef typename Derived::ExpressionTraits
Traits;
22 col = (UnrollCount-1) / Traits::RowsAtCompileTime,
23 row = (UnrollCount-1) % Traits::RowsAtCompileTime
26 static inline bool run(
const Derived &
mat)
32 template<
typename Derived>
35 static inline bool run(
const Derived &) {
return true; }
38 template<
typename Derived>
41 static inline bool run(
const Derived &) {
return false; }
44 template<
typename Derived,
int UnrollCount>
47 typedef typename Derived::ExpressionTraits
Traits;
49 col = (UnrollCount-1) / Traits::RowsAtCompileTime,
50 row = (UnrollCount-1) % Traits::RowsAtCompileTime
53 static inline bool run(
const Derived &
mat)
59 template<
typename Derived>
62 static inline bool run(
const Derived & ) {
return false; }
65 template<
typename Derived>
68 static inline bool run(
const Derived &) {
return false; }
80 template<
typename Derived>
85 unroll = SizeAtCompileTime !=
Dynamic
88 Evaluator evaluator(derived());
93 for(
Index j = 0; j < cols(); ++j)
94 for(
Index i = 0; i < rows(); ++i)
95 if (!evaluator.coeff(i, j))
return false;
104 template<
typename Derived>
109 unroll = SizeAtCompileTime !=
Dynamic
112 Evaluator evaluator(derived());
117 for(
Index j = 0; j < cols(); ++j)
118 for(
Index i = 0; i < rows(); ++i)
119 if (evaluator.coeff(i, j))
return true;
128 template<
typename Derived>
131 return derived().template cast<bool>().template cast<Index>().sum();
138 template<
typename Derived>
141 #if EIGEN_COMP_MSVC || (defined __FAST_MATH__)
142 return derived().array().isNaN().any();
144 return !((derived().array()==derived().array()).all());
152 template<
typename Derived>
155 #if EIGEN_COMP_MSVC || (defined __FAST_MATH__)
156 return derived().array().isFinite().all();
158 return !((derived()-derived()).hasNaN());
164 #endif // EIGEN_ALLANDANY_H