diff options
-rw-r--r-- | THANKS | 1 | ||||
-rw-r--r-- | lib/Data/Packed/Vector.hs | 3 | ||||
-rw-r--r-- | lib/Numeric/LinearAlgebra/Tests.hs | 16 |
3 files changed, 19 insertions, 1 deletions
@@ -76,3 +76,4 @@ and all the people in the Haskell mailing lists for their help. | |||
76 | case that /tmp is not writable. He also contributed Binary instances for | 76 | case that /tmp is not writable. He also contributed Binary instances for |
77 | Vector and Matrix. | 77 | Vector and Matrix. |
78 | 78 | ||
79 | - Vivian McPhail added support for Float and Complex Float elements. | ||
diff --git a/lib/Data/Packed/Vector.hs b/lib/Data/Packed/Vector.hs index bb89506..c5b8ba7 100644 --- a/lib/Data/Packed/Vector.hs +++ b/lib/Data/Packed/Vector.hs | |||
@@ -21,7 +21,8 @@ module Data.Packed.Vector ( | |||
21 | vecdisp, | 21 | vecdisp, |
22 | -- moved to Numeric.LinearAlgebra.Interface typeclass | 22 | -- moved to Numeric.LinearAlgebra.Interface typeclass |
23 | -- vectorFMax, vectorFMin, vectorFMaxIndex, vectorFMinIndex, | 23 | -- vectorFMax, vectorFMin, vectorFMaxIndex, vectorFMinIndex, |
24 | -- vectorMax, vectorMin, vectorMaxIndex, vectorMinIndex, | 24 | -- vectorMax, vectorMin, |
25 | vectorMaxIndex, vectorMinIndex, | ||
25 | mapVector, zipVector, | 26 | mapVector, zipVector, |
26 | fscanfVector, fprintfVector, freadVector, fwriteVector, | 27 | fscanfVector, fprintfVector, freadVector, fwriteVector, |
27 | foldLoop, foldVector, foldVectorG | 28 | foldLoop, foldVector, foldVectorG |
diff --git a/lib/Numeric/LinearAlgebra/Tests.hs b/lib/Numeric/LinearAlgebra/Tests.hs index 65b0e4c..24b5bb5 100644 --- a/lib/Numeric/LinearAlgebra/Tests.hs +++ b/lib/Numeric/LinearAlgebra/Tests.hs | |||
@@ -356,6 +356,7 @@ makeUnitary v | realPart n > 1 = v / scalar n | |||
356 | -- | Performance measurements. | 356 | -- | Performance measurements. |
357 | runBenchmarks :: IO () | 357 | runBenchmarks :: IO () |
358 | runBenchmarks = do | 358 | runBenchmarks = do |
359 | --cholBench | ||
359 | solveBench | 360 | solveBench |
360 | subBench | 361 | subBench |
361 | multBench | 362 | multBench |
@@ -455,3 +456,18 @@ solveBench = do | |||
455 | solveBenchN 500 | 456 | solveBenchN 500 |
456 | solveBenchN 1000 | 457 | solveBenchN 1000 |
457 | -- solveBenchN 1500 | 458 | -- solveBenchN 1500 |
459 | |||
460 | -------------------------------- | ||
461 | |||
462 | cholBenchN n = do | ||
463 | let x = uniformSample 777 (2*n) (replicate n (-1,1)) | ||
464 | a = trans x <> x | ||
465 | a `seq` putStrLn "" | ||
466 | time ("chol " ++ show n) (chol a) | ||
467 | |||
468 | cholBench = do | ||
469 | cholBenchN 1200 | ||
470 | cholBenchN 600 | ||
471 | cholBenchN 300 | ||
472 | -- cholBenchN 150 | ||
473 | -- cholBenchN 50 | ||