diff options
author | Bas van Dijk <v.dijk.bas@gmail.com> | 2011-12-24 20:15:43 +0100 |
---|---|---|
committer | Bas van Dijk <v.dijk.bas@gmail.com> | 2011-12-24 20:15:43 +0100 |
commit | a4f38eb196209436f72b938f6355f6e28474bef3 (patch) | |
tree | 48bd5f980bc248c30e4b2dba8a7546b04ea7ba18 | |
parent | c3bda2d38c432fb53ce456cba295b097fd4d6ad1 (diff) |
Fix build on GHC-7.4.1-rc1
-rw-r--r-- | lib/Numeric/ContainerBoot.hs | 4 | ||||
-rw-r--r-- | lib/Numeric/LinearAlgebra/Algorithms.hs | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/Numeric/ContainerBoot.hs b/lib/Numeric/ContainerBoot.hs index a605545..f1ed7c5 100644 --- a/lib/Numeric/ContainerBoot.hs +++ b/lib/Numeric/ContainerBoot.hs | |||
@@ -59,12 +59,12 @@ import System.IO.Unsafe | |||
59 | 59 | ||
60 | ------------------------------------------------------------------- | 60 | ------------------------------------------------------------------- |
61 | 61 | ||
62 | type family IndexOf c | 62 | type family IndexOf (c :: * -> *) |
63 | 63 | ||
64 | type instance IndexOf Vector = Int | 64 | type instance IndexOf Vector = Int |
65 | type instance IndexOf Matrix = (Int,Int) | 65 | type instance IndexOf Matrix = (Int,Int) |
66 | 66 | ||
67 | type family ArgOf c a | 67 | type family ArgOf (c :: * -> *) a |
68 | 68 | ||
69 | type instance ArgOf Vector a = a -> a | 69 | type instance ArgOf Vector a = a -> a |
70 | type instance ArgOf Matrix a = a -> a -> a | 70 | type instance ArgOf Matrix a = a -> a -> a |
diff --git a/lib/Numeric/LinearAlgebra/Algorithms.hs b/lib/Numeric/LinearAlgebra/Algorithms.hs index bea33ea..a6b4dae 100644 --- a/lib/Numeric/LinearAlgebra/Algorithms.hs +++ b/lib/Numeric/LinearAlgebra/Algorithms.hs | |||
@@ -567,6 +567,11 @@ epslist = [ (fromIntegral k, golubeps k k) | k <- [1..]] | |||
567 | 567 | ||
568 | geps delta = head [ k | (k,g) <- epslist, g<delta] | 568 | geps delta = head [ k | (k,g) <- epslist, g<delta] |
569 | 569 | ||
570 | expGolub :: ( Fractional t, Element t, Field t | ||
571 | , Normed Matrix t | ||
572 | , RealFrac (RealOf t) | ||
573 | , Floating (RealOf t) | ||
574 | ) => Matrix t -> Matrix t | ||
570 | expGolub m = iterate msq f !! j | 575 | expGolub m = iterate msq f !! j |
571 | where j = max 0 $ floor $ logBase 2 $ pnorm Infinity m | 576 | where j = max 0 $ floor $ logBase 2 $ pnorm Infinity m |
572 | a = m */ fromIntegral ((2::Int)^j) | 577 | a = m */ fromIntegral ((2::Int)^j) |