diff options
author | Vivian McPhail <haskell.vivian.mcphail@gmail.com> | 2010-07-06 06:56:17 +0000 |
---|---|---|
committer | Vivian McPhail <haskell.vivian.mcphail@gmail.com> | 2010-07-06 06:56:17 +0000 |
commit | 8107bacedd0b898b574ede296bc0062d7cfc230d (patch) | |
tree | b8d6ee82423b455853c1eef58288c9d028743e2c /lib/Numeric | |
parent | 7ddccab219ab64f066d8913c9f3c60afe2831d4b (diff) |
vectors complex idx fix
Diffstat (limited to 'lib/Numeric')
-rw-r--r-- | lib/Numeric/LinearAlgebra/Linear.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Numeric/LinearAlgebra/Linear.hs b/lib/Numeric/LinearAlgebra/Linear.hs index e718e83..aed6a2b 100644 --- a/lib/Numeric/LinearAlgebra/Linear.hs +++ b/lib/Numeric/LinearAlgebra/Linear.hs | |||
@@ -64,8 +64,8 @@ instance Vectors Vector (Complex Float) where | |||
64 | absSum = (:+ 0) . toScalarQ AbsSum | 64 | absSum = (:+ 0) . toScalarQ AbsSum |
65 | vectorMin = ap (@>) minIdx | 65 | vectorMin = ap (@>) minIdx |
66 | vectorMax = ap (@>) maxIdx | 66 | vectorMax = ap (@>) maxIdx |
67 | minIdx = minIdx . (zipVector (*) `ap` mapVector conjugate) | 67 | minIdx = minIdx . fst . fromComplex . (zipVector (*) `ap` mapVector conjugate) |
68 | maxIdx = maxIdx . (zipVector (*) `ap` mapVector conjugate) | 68 | maxIdx = maxIdx . fst . fromComplex . (zipVector (*) `ap` mapVector conjugate) |
69 | dot = dotQ | 69 | dot = dotQ |
70 | 70 | ||
71 | instance Vectors Vector (Complex Double) where | 71 | instance Vectors Vector (Complex Double) where |
@@ -74,8 +74,8 @@ instance Vectors Vector (Complex Double) where | |||
74 | absSum = (:+ 0) . toScalarC AbsSum | 74 | absSum = (:+ 0) . toScalarC AbsSum |
75 | vectorMin = ap (@>) minIdx | 75 | vectorMin = ap (@>) minIdx |
76 | vectorMax = ap (@>) maxIdx | 76 | vectorMax = ap (@>) maxIdx |
77 | minIdx = minIdx . (zipVector (*) `ap` mapVector conjugate) | 77 | minIdx = minIdx . fst . fromComplex . (zipVector (*) `ap` mapVector conjugate) |
78 | maxIdx = maxIdx . (zipVector (*) `ap` mapVector conjugate) | 78 | maxIdx = maxIdx . fst . fromComplex . (zipVector (*) `ap` mapVector conjugate) |
79 | dot = dotC | 79 | dot = dotC |
80 | 80 | ||
81 | ---------------------------------------------------- | 81 | ---------------------------------------------------- |