From cd3daf7e12fa2a8c775a1d6516049bbc7e44da32 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Thu, 24 Apr 2014 20:50:10 +0200 Subject: deprecate vjoin, dot and (<.>). Move (⋅) to Container MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/Numeric/LinearAlgebra/Util.hs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'lib/Numeric/LinearAlgebra') diff --git a/lib/Numeric/LinearAlgebra/Util.hs b/lib/Numeric/LinearAlgebra/Util.hs index 2c77d3a..b38aeb2 100644 --- a/lib/Numeric/LinearAlgebra/Util.hs +++ b/lib/Numeric/LinearAlgebra/Util.hs @@ -23,7 +23,6 @@ module Numeric.LinearAlgebra.Util( (?), (¿), rand, randn, cross, - (⋅), norm, unitary, mt, @@ -86,7 +85,15 @@ rand = randm Uniform randn :: Int -> Int -> IO (Matrix Double) randn = randm Gaussian --- | create a real diagonal matrix from a list +{- | create a real diagonal matrix from a list + +>>> diagl [1,2,3] +(3><3) + [ 1.0, 0.0, 0.0 + , 0.0, 2.0, 0.0 + , 0.0, 0.0, 3.0 ] + +-} diagl :: [Double] -> Matrix Double diagl = diag . fromList @@ -164,11 +171,6 @@ size m = (rows m, cols m) mt :: Matrix Double -> Matrix Double mt = trans . inv --- | dot product (0x22C5): @u ⋅ v = 'cdot' u v@ -(⋅) :: (Container Vector t, Product t) => Vector t -> Vector t -> t -infixl 7 ⋅ -u ⋅ v = cdot u v - ---------------------------------------------------------------------- -- | Matrix of pairwise squared distances of row vectors -- cgit v1.2.3