diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-04-28 18:51:38 -0400 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-04-28 18:51:38 -0400 |
commit | e2775869588e1df2d19265eac5c167651168a414 (patch) | |
tree | 8ca0d2fdbc1f8945405fb3fd99c5634b60f3189f /test/main.h | |
parent | 4f83d6ad1959f3c76cd5eb328ec65ced4ca4f339 (diff) |
Complete rework of global math functions and NumTraits.
* Now completely generic so all standard integer types (like char...) are supported.
** add unit test for that (integer_types).
* NumTraits does no longer inherit numeric_limits
* All math functions are now templated
* Better guard (static asserts) against using certain math functions on integer types.
Diffstat (limited to 'test/main.h')
-rw-r--r-- | test/main.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/main.h b/test/main.h index a1c45b4fe..d9223aa78 100644 --- a/test/main.h +++ b/test/main.h @@ -149,7 +149,6 @@ namespace Eigen #define EIGEN_INTERNAL_DEBUGGING -#define EIGEN_NICE_RANDOM #include <Eigen/QR> // required for createRandomPIMatrixOfRank @@ -273,8 +272,7 @@ namespace Eigen namespace Eigen { -template<typename T> inline typename NumTraits<T>::Real test_precision(); -template<> inline int test_precision<int>() { return 0; } +template<typename T> inline typename NumTraits<T>::Real test_precision() { return T(0); } template<> inline float test_precision<float>() { return 1e-3f; } template<> inline double test_precision<double>() { return 1e-6; } template<> inline float test_precision<std::complex<float> >() { return test_precision<float>(); } |