From 1925c123d7d8184a1d2ddc0a413e0fd2776e1083 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Thu, 8 May 2014 08:48:12 +0200 Subject: empty hmatrix-base --- examples/root.hs | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 examples/root.hs (limited to 'examples/root.hs') diff --git a/examples/root.hs b/examples/root.hs deleted file mode 100644 index 8546ff5..0000000 --- a/examples/root.hs +++ /dev/null @@ -1,31 +0,0 @@ --- root finding examples -import Numeric.GSL -import Numeric.LinearAlgebra -import Text.Printf(printf) - -rosenbrock a b [x,y] = [ a*(1-x), b*(y-x^2) ] - -test method = do - print method - let (s,p) = root method 1E-7 30 (rosenbrock 1 10) [-10,-5] - print s -- solution - disp p -- evolution of the algorithm - -jacobian a b [x,y] = [ [-a , 0] - , [-2*b*x, b] ] - -testJ method = do - print method - let (s,p) = rootJ method 1E-7 30 (rosenbrock 1 10) (jacobian 1 10) [-10,-5] - print s - disp p - -disp = putStrLn . format " " (printf "%.3f") - -main = do - test Hybrids - test Hybrid - test DNewton - test Broyden - - mapM_ testJ [HybridsJ .. GNewton] -- cgit v1.2.3