diff options
author | Alberto Ruiz <aruiz@um.es> | 2014-10-13 09:31:02 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2014-10-13 09:31:02 +0200 |
commit | 8a6bd374d1927405fd76fd0fc3ee2dbd5032164f (patch) | |
tree | d22617fda5769e610d15cea0d21a49bd59d51330 /packages/base/src/Numeric/LinearAlgebra | |
parent | 2ca163be0d77b6e2e9a53df6c990b1cd5661f6f5 (diff) | |
parent | 2dac3536ac9dd149a037e57b0a180f15a64fd453 (diff) |
Merge pull request #93 from erdeszt/develop
Simplify the vectore reversion in conv
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra')
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra/Util/Convolution.hs | 3 |
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 | ||
19 | import qualified Data.Vector.Storable as SV | ||
19 | import Data.Packed.Numeric | 20 | import 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 | ||