diff options
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra/Util.hs')
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra/Util.hs | 14 |
1 files changed, 14 insertions, 0 deletions
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( | |||
28 | (&), (¦), (——), (#), | 28 | (&), (¦), (——), (#), |
29 | (?), (¿), | 29 | (?), (¿), |
30 | Indexable(..), size, | 30 | Indexable(..), size, |
31 | Numeric, | ||
31 | rand, randn, | 32 | rand, randn, |
32 | cross, | 33 | cross, |
33 | norm, | 34 | norm, |
@@ -101,6 +102,19 @@ mat | |||
101 | -> Matrix ℝ | 102 | -> Matrix ℝ |
102 | mat c = reshape c . fromList | 103 | mat c = reshape c . fromList |
103 | 104 | ||
105 | |||
106 | |||
107 | class ( Container Vector t | ||
108 | , Container Matrix t | ||
109 | , Konst t Int Vector | ||
110 | , Konst t (Int,Int) Matrix | ||
111 | ) => Numeric t | ||
112 | |||
113 | instance Numeric Double | ||
114 | instance Numeric (Complex Double) | ||
115 | |||
116 | |||
117 | |||
104 | {- | print a real matrix with given number of digits after the decimal point | 118 | {- | print a real matrix with given number of digits after the decimal point |
105 | 119 | ||
106 | >>> disp 5 $ ident 2 / 3 | 120 | >>> disp 5 $ ident 2 / 3 |