diff options
Diffstat (limited to 'packages/base')
-rw-r--r-- | packages/base/src/Internal/Container.hs | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/packages/base/src/Internal/Container.hs b/packages/base/src/Internal/Container.hs index 46e9cf3..a498069 100644 --- a/packages/base/src/Internal/Container.hs +++ b/packages/base/src/Internal/Container.hs | |||
@@ -43,12 +43,9 @@ import Prelude hiding ((<>)) | |||
43 | [-3.0,-0.5,2.0,4.5,7.0] | 43 | [-3.0,-0.5,2.0,4.5,7.0] |
44 | it :: Vector Double | 44 | it :: Vector Double |
45 | 45 | ||
46 | >>> linspace 5 (8,2+i) :: Vector (Complex Double) | 46 | >>> linspace 5 (8,2:+1) :: Vector (Complex Double) |
47 | 47 | [8.0 :+ 0.0,6.5 :+ 0.25,5.0 :+ 0.5,3.5 :+ 0.75,2.0 :+ 1.0] | |
48 | <interactive>:6:17: ERROR: | 48 | it :: Vector (Complex Double) |
49 | Variable not in scope: i :: Complex Double | ||
50 | |||
51 | fromList [8.0 :+ 0.0,6.5 :+ 0.25,5.0 :+ 0.5,3.5 :+ 0.75,2.0 :+ 1.0] | ||
52 | 49 | ||
53 | Logarithmic spacing can be defined as follows: | 50 | Logarithmic spacing can be defined as follows: |
54 | 51 | ||
@@ -213,23 +210,11 @@ optimiseMult = mconcat | |||
213 | 210 | ||
214 | {- | Compute mean vector and covariance matrix of the rows of a matrix. | 211 | {- | Compute mean vector and covariance matrix of the rows of a matrix. |
215 | 212 | ||
216 | >>> meanCov $ gaussianSample 666 1000 (fromList[4,5]) (diagl[2,3]) | 213 | >>> meanCov $ gaussianSample 666 1000 (fromList[4,5]) (trustSym $ diagl [2,3]) |
217 | 214 | ([3.9933155655086696,5.061409102770331],Herm (2><2) | |
218 | <interactive>:4:52: ERROR: | 215 | [ 1.9963242906624408, -4.227815571404954e-2 |
219 | • Couldn't match expected type ‘Herm Double’ | 216 | , -4.227815571404954e-2, 3.2003833097832857 ]) |
220 | with actual type ‘Matrix Double’ | 217 | it :: (Vector Double, Herm Double) |
221 | • In the fourth argument of ‘gaussianSample’, namely | ||
222 | ‘(diagl [2, 3])’ | ||
223 | In the second argument of ‘($)’, namely | ||
224 | ‘gaussianSample 666 1000 (fromList [4, 5]) (diagl [2, 3])’ | ||
225 | In the expression: | ||
226 | meanCov $ gaussianSample 666 1000 (fromList [4, 5]) (diagl [2, 3]) | ||
227 | |||
228 | (fromList [4.010341078059521,5.0197204699640405], | ||
229 | (2><2) | ||
230 | [ 1.9862461923890056, -1.0127225830525157e-2 | ||
231 | , -1.0127225830525157e-2, 3.0373954915729318 ]) | ||
232 | |||
233 | -} | 218 | -} |
234 | meanCov :: Matrix Double -> (Vector Double, Herm Double) | 219 | meanCov :: Matrix Double -> (Vector Double, Herm Double) |
235 | meanCov x = (med,cov) where | 220 | meanCov x = (med,cov) where |