summaryrefslogtreecommitdiff
path: root/packages/hmatrix/src/Numeric/GSL/Root.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2014-05-08 13:43:07 +0200
committerAlberto Ruiz <aruiz@um.es>2014-05-08 13:43:07 +0200
commit551cf7498c33bc0948bb4cb8444ae6f8af7278ea (patch)
treeec86ff73151746f5e13b83549ea5c60ed442764d /packages/hmatrix/src/Numeric/GSL/Root.hs
parent561a6c0e21bb77c21114ccbbd86d3af5ddb5a3f1 (diff)
separation ok
Diffstat (limited to 'packages/hmatrix/src/Numeric/GSL/Root.hs')
-rw-r--r--packages/hmatrix/src/Numeric/GSL/Root.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/hmatrix/src/Numeric/GSL/Root.hs b/packages/hmatrix/src/Numeric/GSL/Root.hs
index 9d561c4..b9f3b94 100644
--- a/packages/hmatrix/src/Numeric/GSL/Root.hs
+++ b/packages/hmatrix/src/Numeric/GSL/Root.hs
@@ -2,10 +2,8 @@
2Module : Numeric.GSL.Root 2Module : Numeric.GSL.Root
3Copyright : (c) Alberto Ruiz 2009 3Copyright : (c) Alberto Ruiz 2009
4License : GPL 4License : GPL
5 5Maintainer : Alberto Ruiz
6Maintainer : Alberto Ruiz (aruiz at um dot es)
7Stability : provisional 6Stability : provisional
8Portability : uses ffi
9 7
10Multidimensional root finding. 8Multidimensional root finding.
11 9
@@ -41,14 +39,16 @@ module Numeric.GSL.Root (
41 rootJ, RootMethodJ(..), 39 rootJ, RootMethodJ(..),
42) where 40) where
43 41
44import Data.Packed.Internal 42import Data.Packed
45import Data.Packed.Matrix
46import Numeric.GSL.Internal 43import Numeric.GSL.Internal
47import Foreign.Ptr(FunPtr, freeHaskellFunPtr) 44import Foreign.Ptr(FunPtr, freeHaskellFunPtr)
48import Foreign.C.Types 45import Foreign.C.Types
49import System.IO.Unsafe(unsafePerformIO) 46import System.IO.Unsafe(unsafePerformIO)
50 47
51------------------------------------------------------------------------- 48-------------------------------------------------------------------------
49type TVV = TV (TV Res)
50type TVM = TV (TM Res)
51
52 52
53data UniRootMethod = Bisection 53data UniRootMethod = Bisection
54 | FalsePos 54 | FalsePos
@@ -76,7 +76,7 @@ uniRootGen m f xl xu epsrel maxit = unsafePerformIO $ do
76 return (sol !! 1, path) 76 return (sol !! 1, path)
77 77
78foreign import ccall safe "root" 78foreign import ccall safe "root"
79 c_root:: CInt -> FunPtr (Double -> Double) -> Double -> CInt -> Double -> Double -> TM 79 c_root:: CInt -> FunPtr (Double -> Double) -> Double -> CInt -> Double -> Double -> TM Res
80 80
81------------------------------------------------------------------------- 81-------------------------------------------------------------------------
82data UniRootMethodJ = UNewton 82data UniRootMethodJ = UNewton
@@ -108,7 +108,7 @@ uniRootJGen m f df x epsrel maxit = unsafePerformIO $ do
108 108
109foreign import ccall safe "rootj" 109foreign import ccall safe "rootj"
110 c_rootj :: CInt -> FunPtr (Double -> Double) -> FunPtr (Double -> Double) 110 c_rootj :: CInt -> FunPtr (Double -> Double) -> FunPtr (Double -> Double)
111 -> Double -> CInt -> Double -> TM 111 -> Double -> CInt -> Double -> TM Res
112 112
113------------------------------------------------------------------------- 113-------------------------------------------------------------------------
114 114