summaryrefslogtreecommitdiff
path: root/packages/base/src/Numeric/LinearAlgebra/Util.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2014-05-27 10:41:40 +0200
committerAlberto Ruiz <aruiz@um.es>2014-05-27 10:41:40 +0200
commitcf3c788f0c44577ac1a5365e8154200b53a36409 (patch)
treed667ea10609e74b69b11309bb59b7e000b240a92 /packages/base/src/Numeric/LinearAlgebra/Util.hs
parent365e2435e71de10ebe849acac5a107b6f43817c4 (diff)
static dimensions, cont.
Diffstat (limited to 'packages/base/src/Numeric/LinearAlgebra/Util.hs')
-rw-r--r--packages/base/src/Numeric/LinearAlgebra/Util.hs20
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
70type ℕ = Int 70type ℕ = Int
71type ℤ = Int 71type ℤ = Int
72type ℂ = Complex Double 72type ℂ = Complex Double
73type ℝn = Vector ℝ 73--type ℝn = Vector ℝ
74type ℂn = Vector ℂ 74--type ℂn = Vector ℂ
75--newtype ℍ m = H m 75--newtype ℍ m = H m
76 76
77i_C, 𝑖 :: ℂ 77i_C, 𝑖 :: ℂ
@@ -84,7 +84,7 @@ i_C = 𝑖
84fromList [1.0,2.0,3.0,4.0,5.0] 84fromList [1.0,2.0,3.0,4.0,5.0]
85 85
86-} 86-}
87vect :: [ℝ] -> ℝn 87vect :: [ℝ] -> Vector
88vect = fromList 88vect = fromList
89 89
90{- | create a real matrix 90{- | create a real matrix
@@ -103,18 +103,6 @@ mat
103mat c = reshape c . fromList 103mat c = reshape c . fromList
104 104
105 105
106
107class ( Container Vector t
108 , Container Matrix t
109 , Konst t Int Vector
110 , Konst t (Int,Int) Matrix
111 ) => Numeric t
112
113instance Numeric Double
114instance 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