diff options
Diffstat (limited to 'packages/base/src/Data')
-rw-r--r-- | packages/base/src/Data/Packed/IO.hs | 1 | ||||
-rw-r--r-- | packages/base/src/Data/Packed/Internal/Numeric.hs | 1 | ||||
-rw-r--r-- | packages/base/src/Data/Packed/Internal/Vector.hs | 1 | ||||
-rw-r--r-- | packages/base/src/Data/Packed/Numeric.hs | 8 |
4 files changed, 6 insertions, 5 deletions
diff --git a/packages/base/src/Data/Packed/IO.hs b/packages/base/src/Data/Packed/IO.hs index 85f1b37..b0999a8 100644 --- a/packages/base/src/Data/Packed/IO.hs +++ b/packages/base/src/Data/Packed/IO.hs | |||
@@ -22,7 +22,6 @@ import Text.Printf(printf) | |||
22 | import Data.List(intersperse) | 22 | import Data.List(intersperse) |
23 | import Data.Complex | 23 | import Data.Complex |
24 | import Numeric.Vectorized(vectorScan,saveMatrix) | 24 | import Numeric.Vectorized(vectorScan,saveMatrix) |
25 | import Control.Applicative((<$>)) | ||
26 | import Data.Packed.Internal | 25 | import Data.Packed.Internal |
27 | 26 | ||
28 | {- | Creates a string from a matrix given a separator and a function to show each entry. Using | 27 | {- | Creates a string from a matrix given a separator and a function to show each entry. Using |
diff --git a/packages/base/src/Data/Packed/Internal/Numeric.hs b/packages/base/src/Data/Packed/Internal/Numeric.hs index 257ad73..7a4dd29 100644 --- a/packages/base/src/Data/Packed/Internal/Numeric.hs +++ b/packages/base/src/Data/Packed/Internal/Numeric.hs | |||
@@ -48,7 +48,6 @@ import Numeric.Conversion | |||
48 | import Data.Packed.Development | 48 | import Data.Packed.Development |
49 | import Numeric.Vectorized | 49 | import Numeric.Vectorized |
50 | import Data.Complex | 50 | import Data.Complex |
51 | import Control.Applicative((<*>)) | ||
52 | 51 | ||
53 | import Numeric.LinearAlgebra.LAPACK(multiplyR,multiplyC,multiplyF,multiplyQ) | 52 | import Numeric.LinearAlgebra.LAPACK(multiplyR,multiplyC,multiplyF,multiplyQ) |
54 | import Data.Packed.Internal | 53 | import Data.Packed.Internal |
diff --git a/packages/base/src/Data/Packed/Internal/Vector.hs b/packages/base/src/Data/Packed/Internal/Vector.hs index d0bc143..b49f379 100644 --- a/packages/base/src/Data/Packed/Internal/Vector.hs +++ b/packages/base/src/Data/Packed/Internal/Vector.hs | |||
@@ -35,7 +35,6 @@ import Foreign.Ptr(Ptr) | |||
35 | import Foreign.Storable(Storable, peekElemOff, pokeElemOff, sizeOf) | 35 | import Foreign.Storable(Storable, peekElemOff, pokeElemOff, sizeOf) |
36 | import Foreign.C.Types | 36 | import Foreign.C.Types |
37 | import Data.Complex | 37 | import Data.Complex |
38 | import Control.Monad(when) | ||
39 | import System.IO.Unsafe(unsafePerformIO) | 38 | import System.IO.Unsafe(unsafePerformIO) |
40 | 39 | ||
41 | #if __GLASGOW_HASKELL__ >= 605 | 40 | #if __GLASGOW_HASKELL__ >= 605 |
diff --git a/packages/base/src/Data/Packed/Numeric.hs b/packages/base/src/Data/Packed/Numeric.hs index 6027f43..6d62f22 100644 --- a/packages/base/src/Data/Packed/Numeric.hs +++ b/packages/base/src/Data/Packed/Numeric.hs | |||
@@ -39,7 +39,7 @@ module Data.Packed.Numeric ( | |||
39 | step, cond, find, assoc, accum, | 39 | step, cond, find, assoc, accum, |
40 | Transposable(..), Linear(..), | 40 | Transposable(..), Linear(..), |
41 | -- * Matrix product | 41 | -- * Matrix product |
42 | Product(..), udot, dot, (<·>), (#>), app, | 42 | Product(..), udot, dot, (<·>), (#>), (<#), app, |
43 | Mul(..), | 43 | Mul(..), |
44 | (<.>), | 44 | (<.>), |
45 | optimiseMult, | 45 | optimiseMult, |
@@ -71,7 +71,6 @@ import Data.Packed | |||
71 | import Data.Packed.Internal.Numeric | 71 | import Data.Packed.Internal.Numeric |
72 | import Data.Complex | 72 | import Data.Complex |
73 | import Numeric.LinearAlgebra.Algorithms(Field,linearSolveSVD) | 73 | import Numeric.LinearAlgebra.Algorithms(Field,linearSolveSVD) |
74 | import Data.Monoid(Monoid(mconcat)) | ||
75 | import Data.Packed.IO | 74 | import Data.Packed.IO |
76 | import Numeric.LinearAlgebra.Random | 75 | import Numeric.LinearAlgebra.Random |
77 | 76 | ||
@@ -142,6 +141,11 @@ fromList [140.0,320.0] | |||
142 | app :: Numeric t => Matrix t -> Vector t -> Vector t | 141 | app :: Numeric t => Matrix t -> Vector t -> Vector t |
143 | app = (#>) | 142 | app = (#>) |
144 | 143 | ||
144 | infixl 8 <# | ||
145 | -- | dense vector-matrix product | ||
146 | (<#) :: Numeric t => Vector t -> Matrix t -> Vector t | ||
147 | (<#) = vXm | ||
148 | |||
145 | -------------------------------------------------------------------------------- | 149 | -------------------------------------------------------------------------------- |
146 | 150 | ||
147 | class Mul a b c | a b -> c where | 151 | class Mul a b c | a b -> c where |