diff options
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra/Util.hs')
-rw-r--r-- | packages/base/src/Numeric/LinearAlgebra/Util.hs | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/packages/base/src/Numeric/LinearAlgebra/Util.hs b/packages/base/src/Numeric/LinearAlgebra/Util.hs index a319785..47b1090 100644 --- a/packages/base/src/Numeric/LinearAlgebra/Util.hs +++ b/packages/base/src/Numeric/LinearAlgebra/Util.hs | |||
@@ -32,7 +32,7 @@ module Numeric.LinearAlgebra.Util( | |||
32 | rand, randn, | 32 | rand, randn, |
33 | cross, | 33 | cross, |
34 | norm, | 34 | norm, |
35 | ℕ,ℤ,ℝ,ℂ,ℝn,ℂn,𝑖,i_C, --ℍ | 35 | ℕ,ℤ,ℝ,ℂ,𝑖,i_C, --ℍ |
36 | norm_1, norm_2, norm_0, norm_Inf, norm_Frob, norm_nuclear, | 36 | norm_1, norm_2, norm_0, norm_Inf, norm_Frob, norm_nuclear, |
37 | mnorm_1, mnorm_2, mnorm_0, mnorm_Inf, | 37 | mnorm_1, mnorm_2, mnorm_0, mnorm_Inf, |
38 | unitary, | 38 | unitary, |
@@ -70,8 +70,8 @@ type ℝ = Double | |||
70 | type ℕ = Int | 70 | type ℕ = Int |
71 | type ℤ = Int | 71 | type ℤ = Int |
72 | type ℂ = Complex Double | 72 | type ℂ = Complex Double |
73 | type ℝn = Vector ℝ | 73 | --type ℝn = Vector ℝ |
74 | type ℂn = Vector ℂ | 74 | --type ℂn = Vector ℂ |
75 | --newtype ℍ m = H m | 75 | --newtype ℍ m = H m |
76 | 76 | ||
77 | i_C, 𝑖 :: ℂ | 77 | i_C, 𝑖 :: ℂ |
@@ -84,7 +84,7 @@ i_C = 𝑖 | |||
84 | fromList [1.0,2.0,3.0,4.0,5.0] | 84 | fromList [1.0,2.0,3.0,4.0,5.0] |
85 | 85 | ||
86 | -} | 86 | -} |
87 | vect :: [ℝ] -> ℝn | 87 | vect :: [ℝ] -> Vector ℝ |
88 | vect = fromList | 88 | vect = fromList |
89 | 89 | ||
90 | {- | create a real matrix | 90 | {- | create a real matrix |
@@ -103,18 +103,6 @@ mat | |||
103 | mat c = reshape c . fromList | 103 | mat c = reshape c . fromList |
104 | 104 | ||
105 | 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 | |||
118 | {- | print a real matrix with given number of digits after the decimal point | 106 | {- | print a real matrix with given number of digits after the decimal point |
119 | 107 | ||
120 | >>> disp 5 $ ident 2 / 3 | 108 | >>> disp 5 $ ident 2 / 3 |