From 7e266da987db30caeb91c86b9a7b8fd13d091213 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Wed, 15 Apr 2015 09:16:30 +0200 Subject: add operator <# (vector x matrix) --- packages/base/src/Data/Packed/Numeric.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'packages/base/src/Data') 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 ( step, cond, find, assoc, accum, Transposable(..), Linear(..), -- * Matrix product - Product(..), udot, dot, (<·>), (#>), app, + Product(..), udot, dot, (<·>), (#>), (<#), app, Mul(..), (<.>), optimiseMult, @@ -141,6 +141,11 @@ fromList [140.0,320.0] app :: Numeric t => Matrix t -> Vector t -> Vector t app = (#>) +infixl 8 <# +-- | dense vector-matrix product +(<#) :: Numeric t => Vector t -> Matrix t -> Vector t +(<#) = vXm + -------------------------------------------------------------------------------- class Mul a b c | a b -> c where -- cgit v1.2.3