diff options
Diffstat (limited to 'packages/hmatrix/src/Numeric/GSL/Root.hs')
-rw-r--r-- | packages/hmatrix/src/Numeric/GSL/Root.hs | 14 |
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 @@ | |||
2 | Module : Numeric.GSL.Root | 2 | Module : Numeric.GSL.Root |
3 | Copyright : (c) Alberto Ruiz 2009 | 3 | Copyright : (c) Alberto Ruiz 2009 |
4 | License : GPL | 4 | License : GPL |
5 | 5 | Maintainer : Alberto Ruiz | |
6 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
7 | Stability : provisional | 6 | Stability : provisional |
8 | Portability : uses ffi | ||
9 | 7 | ||
10 | Multidimensional root finding. | 8 | Multidimensional root finding. |
11 | 9 | ||
@@ -41,14 +39,16 @@ module Numeric.GSL.Root ( | |||
41 | rootJ, RootMethodJ(..), | 39 | rootJ, RootMethodJ(..), |
42 | ) where | 40 | ) where |
43 | 41 | ||
44 | import Data.Packed.Internal | 42 | import Data.Packed |
45 | import Data.Packed.Matrix | ||
46 | import Numeric.GSL.Internal | 43 | import Numeric.GSL.Internal |
47 | import Foreign.Ptr(FunPtr, freeHaskellFunPtr) | 44 | import Foreign.Ptr(FunPtr, freeHaskellFunPtr) |
48 | import Foreign.C.Types | 45 | import Foreign.C.Types |
49 | import System.IO.Unsafe(unsafePerformIO) | 46 | import System.IO.Unsafe(unsafePerformIO) |
50 | 47 | ||
51 | ------------------------------------------------------------------------- | 48 | ------------------------------------------------------------------------- |
49 | type TVV = TV (TV Res) | ||
50 | type TVM = TV (TM Res) | ||
51 | |||
52 | 52 | ||
53 | data UniRootMethod = Bisection | 53 | data 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 | ||
78 | foreign import ccall safe "root" | 78 | foreign 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 | ------------------------------------------------------------------------- |
82 | data UniRootMethodJ = UNewton | 82 | data UniRootMethodJ = UNewton |
@@ -108,7 +108,7 @@ uniRootJGen m f df x epsrel maxit = unsafePerformIO $ do | |||
108 | 108 | ||
109 | foreign import ccall safe "rootj" | 109 | foreign 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 | ||