21 #if EIGEN_COMP_MSVC && EIGEN_COMP_MSVC < 1800 23 template<
typename T> bool (
isfinite)(
T x) {
return _finite(
x); }
24 template<
typename T> bool (
isnan)(
T x) {
return _isnan(
x); }
25 template<
typename T> bool (
isinf)(
T x) {
return _fpclass(
x)==_FPCLASS_NINF || _fpclass(
x)==_FPCLASS_PINF; }
33 m(3) = std::numeric_limits<T>::quiet_NaN();
40 std::cout <<
"allFinite: ";
check(m.allFinite(), 0); std::cout <<
"\n";
41 std::cout <<
"hasNaN: ";
check(m.hasNaN(), 1); std::cout <<
"\n";
59 std::cout <<
"allFinite: ";
check(m.allFinite(), 0); std::cout <<
"\n";
60 std::cout <<
"hasNaN: ";
check(m.hasNaN(), 1); std::cout <<
"\n";
77 std::cout <<
"allFinite: ";
check(m.allFinite(), 0); std::cout <<
"\n";
78 std::cout <<
"hasNaN: ";
check(m.hasNaN(), 0); std::cout <<
"\n";
92 std::cout <<
"*** float *** \n\n"; check_inf_nan<float>(
true);
93 std::cout <<
"*** double ***\n\n"; check_inf_nan<double>(
true);
94 std::cout <<
"*** long double *** \n\n"; check_inf_nan<long double>(
true);
96 check_inf_nan<float>(
false);
97 check_inf_nan<double>(
false);
98 check_inf_nan<long double>(
false);
void check(bool b, bool ref)
void check_inf_nan(bool dryrun)
The matrix class, also used for vectors and row-vectors.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & setRandom(Index size)