diff options
author | Alberto Ruiz <aruiz@um.es> | 2007-06-11 12:34:06 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2007-06-11 12:34:06 +0000 |
commit | eb28c0981f4da42c15ac267f7f6ba28d6f8bffbc (patch) | |
tree | 4c55b9c31751536fdfb5016503cf8aba3990d418 /lib/Data/Packed | |
parent | 473df6136476dfa07331dd25a6020260c4f02a9b (diff) |
ok linearSolve
Diffstat (limited to 'lib/Data/Packed')
-rw-r--r-- | lib/Data/Packed/Internal/Vector.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Data/Packed/Internal/Vector.hs b/lib/Data/Packed/Internal/Vector.hs index 8f4e6a4..4836bdb 100644 --- a/lib/Data/Packed/Internal/Vector.hs +++ b/lib/Data/Packed/Internal/Vector.hs | |||
@@ -41,9 +41,17 @@ on f g = \x y -> f (g x) (g y) | |||
41 | infixl 0 // | 41 | infixl 0 // |
42 | (//) = flip ($) | 42 | (//) = flip ($) |
43 | 43 | ||
44 | errorCode 1000 = "bad size" | ||
45 | errorCode 1001 = "bad function code" | ||
46 | errorCode 1002 = "memory problem" | ||
47 | errorCode 1003 = "bad file" | ||
48 | errorCode 1004 = "singular" | ||
49 | errorCode 1005 = "didn't converge" | ||
50 | errorCode n = "code "++show n | ||
51 | |||
44 | check msg ls f = do | 52 | check msg ls f = do |
45 | err <- f | 53 | err <- f |
46 | when (err/=0) (error msg) | 54 | when (err/=0) (error (msg++": "++errorCode err)) |
47 | mapM_ (touchForeignPtr . fptr) ls | 55 | mapM_ (touchForeignPtr . fptr) ls |
48 | return () | 56 | return () |
49 | 57 | ||