From 2734dd1ddc6b31aba6377ef969a33967babca519 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Wed, 28 May 2014 12:16:34 +0200 Subject: fix static blocks, GMatrix --- packages/base/src/Data/Packed/Numeric.hs | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (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 7d88cbc..e324ab6 100644 --- a/packages/base/src/Data/Packed/Numeric.hs +++ b/packages/base/src/Data/Packed/Numeric.hs @@ -40,9 +40,9 @@ module Data.Packed.Numeric ( step, cond, find, assoc, accum, Transposable(..), Linear(..), -- * Matrix product - Product(..), udot, dot, (◇), (<·>), (#>), + Product(..), udot, dot, (<·>), (#>), Mul(..), - Contraction(..),(<.>), + (<.>), optimiseMult, mXm,mXv,vXm,LSDiv,(<\>), outer, kronecker, @@ -140,25 +140,6 @@ fromList [10.0 :+ 4.0,12.0 :+ 4.0,14.0 :+ 4.0,16.0 :+ 4.0] -} - - -class Contraction a b c | a b -> c - where - -- | Matrix product, matrix - vector product, and dot product - contraction :: a -> b -> c - -instance (Product t, Container Vector t) => Contraction (Vector t) (Vector t) t where - u `contraction` v = conj u `udot` v - -instance Product t => Contraction (Matrix t) (Vector t) (Vector t) where - contraction = mXv - -instance (Container Vector t, Product t) => Contraction (Vector t) (Matrix t) (Vector t) where - contraction v m = (conj v) `vXm` m - -instance Product t => Contraction (Matrix t) (Matrix t) (Matrix t) where - contraction = mXm - -------------------------------------------------------------------------------- infixl 7 <.> @@ -265,11 +246,6 @@ instance Container Matrix e => Build (Int,Int) (e -> e -> e) Matrix e -------------------------------------------------------------------------------- --- | alternative unicode symbol (25c7) for 'contraction' -(◇) :: Contraction a b c => a -> b -> c -infixl 7 ◇ -(◇) = contraction - -- | dot product: @cdot u v = 'udot' ('conj' u) v@ dot :: (Container Vector t, Product t) => Vector t -> Vector t -> t dot u v = udot (conj u) v -- cgit v1.2.3