summaryrefslogtreecommitdiff
path: root/packages/base/src/Numeric/LinearAlgebra/Util
diff options
context:
space:
mode:
authorerdeszt <erdeszt@gmail.com>2014-10-12 15:37:27 +0200
committererdeszt <erdeszt@gmail.com>2014-10-12 15:37:27 +0200
commit2dac3536ac9dd149a037e57b0a180f15a64fd453 (patch)
treed22617fda5769e610d15cea0d21a49bd59d51330 /packages/base/src/Numeric/LinearAlgebra/Util
parent2ca163be0d77b6e2e9a53df6c990b1cd5661f6f5 (diff)
Simplify the vectore reversion in conv
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra/Util')
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs b/packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs
index c8c7536..c9e75de 100644
--- a/packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs
@@ -16,6 +16,7 @@ module Numeric.LinearAlgebra.Util.Convolution(
16 corr2, conv2, separable 16 corr2, conv2, separable
17) where 17) where
18 18
19import qualified Data.Vector.Storable as SV
19import Data.Packed.Numeric 20import Data.Packed.Numeric
20 21
21 22
@@ -51,7 +52,7 @@ conv ker v
51 | dim ker == 0 = konst 0 (dim v) 52 | dim ker == 0 = konst 0 (dim v)
52 | otherwise = corr ker' v' 53 | otherwise = corr ker' v'
53 where 54 where
54 ker' = (flatten.fliprl.asRow) ker 55 ker' = SV.reverse ker
55 v' = vjoin [z,v,z] 56 v' = vjoin [z,v,z]
56 z = konst 0 (dim ker -1) 57 z = konst 0 (dim ker -1)
57 58