diff options
Diffstat (limited to 'lib/Numeric')
-rw-r--r-- | lib/Numeric/GSL/Matrix.hs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/Numeric/GSL/Matrix.hs b/lib/Numeric/GSL/Matrix.hs index cb3fa8f..f62bb82 100644 --- a/lib/Numeric/GSL/Matrix.hs +++ b/lib/Numeric/GSL/Matrix.hs | |||
@@ -92,23 +92,6 @@ foreign import ccall "gsl-aux.h eigensystemC" c_eigH :: TCMVCM | |||
92 | 92 | ||
93 | {- | Singular value decomposition of a real matrix, using /gsl_linalg_SV_decomp_mod/: | 93 | {- | Singular value decomposition of a real matrix, using /gsl_linalg_SV_decomp_mod/: |
94 | 94 | ||
95 | @\> let (u,s,v) = svdg $ 'fromLists' [[1,2,3],[-4,1,7]] | ||
96 | \ | ||
97 | \> u | ||
98 | 0.310 -0.951 | ||
99 | 0.951 0.310 | ||
100 | \ | ||
101 | \> s | ||
102 | 8.497 2.792 | ||
103 | \ | ||
104 | \> v | ||
105 | -0.411 -0.785 | ||
106 | 0.185 -0.570 | ||
107 | 0.893 -0.243 | ||
108 | \ | ||
109 | \> u \<\> 'diag' s \<\> 'trans' v | ||
110 | 1. 2. 3. | ||
111 | -4. 1. 7.@ | ||
112 | 95 | ||
113 | -} | 96 | -} |
114 | svdg :: Matrix Double -> (Matrix Double, Vector Double, Matrix Double) | 97 | svdg :: Matrix Double -> (Matrix Double, Vector Double, Matrix Double) |
@@ -128,20 +111,6 @@ foreign import ccall "gsl-aux.h svd" c_svd :: TMMVM | |||
128 | 111 | ||
129 | {- | QR decomposition of a real matrix using /gsl_linalg_QR_decomp/ and /gsl_linalg_QR_unpack/. | 112 | {- | QR decomposition of a real matrix using /gsl_linalg_QR_decomp/ and /gsl_linalg_QR_unpack/. |
130 | 113 | ||
131 | @\> let (q,r) = qr $ 'fromLists' [[1,3,5,7],[2,0,-2,4]] | ||
132 | \ | ||
133 | \> q | ||
134 | -0.447 -0.894 | ||
135 | -0.894 0.447 | ||
136 | \ | ||
137 | \> r | ||
138 | -2.236 -1.342 -0.447 -6.708 | ||
139 | 0. -2.683 -5.367 -4.472 | ||
140 | \ | ||
141 | \> q \<\> r | ||
142 | 1.000 3.000 5.000 7.000 | ||
143 | 2.000 0. -2.000 4.000@ | ||
144 | |||
145 | -} | 114 | -} |
146 | qr :: Matrix Double -> (Matrix Double, Matrix Double) | 115 | qr :: Matrix Double -> (Matrix Double, Matrix Double) |
147 | qr = qr' . cmat | 116 | qr = qr' . cmat |