summaryrefslogtreecommitdiff
path: root/packages/tests/src/Numeric/LinearAlgebra
diff options
context:
space:
mode:
Diffstat (limited to 'packages/tests/src/Numeric/LinearAlgebra')
-rw-r--r--packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs12
1 files changed, 1 insertions, 11 deletions
diff --git a/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs b/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs
index 657689a..423edaa 100644
--- a/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs
+++ b/packages/tests/src/Numeric/LinearAlgebra/Tests/Properties.hs
@@ -54,19 +54,9 @@ import Test.QuickCheck(Arbitrary,arbitrary,coarbitrary,choose,vector
54trivial :: Testable a => Bool -> a -> Property 54trivial :: Testable a => Bool -> a -> Property
55trivial = (`classify` "trivial") 55trivial = (`classify` "trivial")
56 56
57
58-- relative error 57-- relative error
59dist :: (Normed c t, Num (c t)) => c t -> c t -> Double 58dist :: (Normed c t, Num (c t)) => c t -> c t -> Double
60dist a b = realToFrac r 59dist = relativeError Infinity
61 where norm = pnorm Infinity
62 na = norm a
63 nb = norm b
64 nab = norm (a-b)
65 mx = max na nb
66 mn = min na nb
67 r = if mn < peps
68 then mx
69 else nab/mx
70 60
71infixl 4 |~| 61infixl 4 |~|
72a |~| b = a :~10~: b 62a |~| b = a :~10~: b