aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2007-10-10 06:09:56 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2007-10-10 06:09:56 +0000
commit06e1e0d83be56b4b38041fb19749ae79303c09c5 (patch)
treec41f29aeae71c11f5102bcf14e785b46046df011 /test
parent7f0a546a817e97e0fc55ae21b7db811315dd94fe (diff)
fix dot product, add norm/norm2/normalized
add fuzzy compares for matrices/vectors add random matrix/vector generation
Diffstat (limited to 'test')
-rw-r--r--test/main.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/main.h b/test/main.h
index 91d63c7f8..05853481c 100644
--- a/test/main.h
+++ b/test/main.h
@@ -47,7 +47,7 @@ class EigenTest : public QObject
void testMatrixManip();
};
-template<typename T> inline typename EiTraits<T>::Real TestEpsilon();
+template<typename T> inline typename EiNumTraits<T>::Real TestEpsilon();
template<> inline int TestEpsilon<int>() { return 0; }
template<> inline float TestEpsilon<float>() { return 1e-2f; }
template<> inline double TestEpsilon<double>() { return 1e-4; }
@@ -62,7 +62,7 @@ template<typename T> bool TestNegligible(const T& a, const T& b)
template<typename T> bool TestApprox(const T& a, const T& b)
{
- if(EiTraits<T>::IsFloat)
+ if(EiNumTraits<T>::IsFloat)
return(EiAbs(a - b) <= std::min(EiAbs(a), EiAbs(b)) * TestEpsilon<T>());
else
return(a == b);
@@ -70,7 +70,7 @@ template<typename T> bool TestApprox(const T& a, const T& b)
template<typename T> bool TestLessThanOrApprox(const T& a, const T& b)
{
- if(EiTraits<T>::IsFloat)
+ if(EiNumTraits<T>::IsFloat)
return(a < b || EiApprox(a, b));
else
return(a <= b);