From 365e2435e71de10ebe849acac5a107b6f43817c4 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Sat, 24 May 2014 20:33:05 +0200 Subject: initial support for static dimension checking --- packages/base/src/Numeric/LinearAlgebra/Util.hs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'packages/base/src/Numeric/LinearAlgebra/Util.hs') diff --git a/packages/base/src/Numeric/LinearAlgebra/Util.hs b/packages/base/src/Numeric/LinearAlgebra/Util.hs index a7d6946..a319785 100644 --- a/packages/base/src/Numeric/LinearAlgebra/Util.hs +++ b/packages/base/src/Numeric/LinearAlgebra/Util.hs @@ -28,6 +28,7 @@ module Numeric.LinearAlgebra.Util( (&), (¦), (——), (#), (?), (¿), Indexable(..), size, + Numeric, rand, randn, cross, norm, @@ -101,6 +102,19 @@ mat -> Matrix ℝ mat c = reshape c . fromList + + +class ( Container Vector t + , Container Matrix t + , Konst t Int Vector + , Konst t (Int,Int) Matrix + ) => Numeric t + +instance Numeric Double +instance Numeric (Complex Double) + + + {- | print a real matrix with given number of digits after the decimal point >>> disp 5 $ ident 2 / 3 -- cgit v1.2.3