From eb3f702d065a4a967bb754977233e6eec408fd1f Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Wed, 7 May 2014 13:07:05 +0200 Subject: undeprecate <.>, extended to contraction --- lib/Numeric/Container.hs | 10 +++++----- lib/Numeric/HMatrix.hs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/Numeric/Container.hs b/lib/Numeric/Container.hs index dea8a79..7e46147 100644 --- a/lib/Numeric/Container.hs +++ b/lib/Numeric/Container.hs @@ -38,7 +38,7 @@ module Numeric.Container ( -- * Matrix product Product(..), udot, Mul(..), - Contraction(..), mmul, + Contraction(..), optimiseMult, mXm,mXv,vXm,LSDiv(..), cdot, (·), dot, (<.>), outer, kronecker, @@ -296,8 +296,8 @@ meanCov x = (med,cov) where dot :: Product e => Vector e -> Vector e -> e dot = udot -{-# DEPRECATED (<.>) "use udot or (×)" #-} -infixl 7 <.> -(<.>) :: Product e => Vector e -> Vector e -> e -(<.>) = udot +-- | contraction operator, equivalent to (x) +infixr 7 <.> +(<.>) :: Contraction a b c => a -> b -> c +(<.>) = (×) diff --git a/lib/Numeric/HMatrix.hs b/lib/Numeric/HMatrix.hs index 09ad518..2e01454 100644 --- a/lib/Numeric/HMatrix.hs +++ b/lib/Numeric/HMatrix.hs @@ -123,7 +123,7 @@ module Numeric.HMatrix ( rand, randn, RandDist(..), randomVector, gaussianSample, uniformSample, -- * Misc - meanCov, peps, relativeError, haussholder, optimiseMult, udot, cdot, mmul + meanCov, peps, relativeError, haussholder, optimiseMult, udot, cdot, (<.>) ) where import Numeric.HMatrix.Data -- cgit v1.2.3