summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2015-04-15 09:16:30 +0200
committerAlberto Ruiz <aruiz@um.es>2015-04-15 09:16:30 +0200
commit7e266da987db30caeb91c86b9a7b8fd13d091213 (patch)
treebb2656b6305f34988573f0ea31f587b7519ea85f /packages
parent12deeb5550d31042816b43e95f7d5678a706c32e (diff)
add operator <# (vector x matrix)
Diffstat (limited to 'packages')
-rw-r--r--packages/base/src/Data/Packed/Numeric.hs7
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/HMatrix.hs2
2 files changed, 7 insertions, 2 deletions
diff --git a/packages/base/src/Data/Packed/Numeric.hs b/packages/base/src/Data/Packed/Numeric.hs
index b2395f2..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,
@@ -141,6 +141,11 @@ fromList [140.0,320.0]
141app :: Numeric t => Matrix t -> Vector t -> Vector t 141app :: Numeric t => Matrix t -> Vector t -> Vector t
142app = (#>) 142app = (#>)
143 143
144infixl 8 <#
145-- | dense vector-matrix product
146(<#) :: Numeric t => Vector t -> Matrix t -> Vector t
147(<#) = vXm
148
144-------------------------------------------------------------------------------- 149--------------------------------------------------------------------------------
145 150
146class Mul a b c | a b -> c where 151class Mul a b c | a b -> c where
diff --git a/packages/base/src/Numeric/LinearAlgebra/HMatrix.hs b/packages/base/src/Numeric/LinearAlgebra/HMatrix.hs
index 677f9ee..a640351 100644
--- a/packages/base/src/Numeric/LinearAlgebra/HMatrix.hs
+++ b/packages/base/src/Numeric/LinearAlgebra/HMatrix.hs
@@ -47,7 +47,7 @@ module Numeric.LinearAlgebra.HMatrix (
47 -- ** dot 47 -- ** dot
48 dot, (<·>), 48 dot, (<·>),
49 -- ** matrix-vector 49 -- ** matrix-vector
50 app, (#>), (!#>), 50 app, (#>), (<#), (!#>),
51 -- ** matrix-matrix 51 -- ** matrix-matrix
52 mul, (<>), 52 mul, (<>),
53 -- | The matrix product is also implemented in the "Data.Monoid" instance, where 53 -- | The matrix product is also implemented in the "Data.Monoid" instance, where