summaryrefslogtreecommitdiff
path: root/lib/Numeric/Vector.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Numeric/Vector.hs')
-rw-r--r--lib/Numeric/Vector.hs27
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/Numeric/Vector.hs b/lib/Numeric/Vector.hs
index 1717e7b..3f480a0 100644
--- a/lib/Numeric/Vector.hs
+++ b/lib/Numeric/Vector.hs
@@ -25,33 +25,6 @@ import Numeric.Container
25 25
26------------------------------------------------------------------- 26-------------------------------------------------------------------
27 27
28#ifndef VECTOR
29import Foreign(Storable)
30#endif
31
32------------------------------------------------------------------
33
34#ifndef VECTOR
35
36instance (Show a, Storable a) => (Show (Vector a)) where
37 show v = (show (dim v))++" |> " ++ show (toList v)
38
39instance Container Vector a => Eq (Vector a) where
40 (==) = equal
41
42instance (Element a, Read a) => Read (Vector a) where
43 readsPrec _ s = [((d |>) . read $ listnums, rest)]
44 where (thing,rest) = breakAt ']' s
45 (dims,listnums) = breakAt '>' thing
46 d = read . init . fst . breakAt '|' $ dims
47 breakAt c l = (a++[c],tail b) where
48 (a,b) = break (==c) l
49
50#endif
51
52
53------------------------------------------------------------------
54
55adaptScalar f1 f2 f3 x y 28adaptScalar f1 f2 f3 x y
56 | dim x == 1 = f1 (x@>0) y 29 | dim x == 1 = f1 (x@>0) y
57 | dim y == 1 = f3 x (y@>0) 30 | dim y == 1 = f3 x (y@>0)