diff options
Diffstat (limited to 'packages/hmatrix/src/Numeric/GSL/Polynomials.hs')
-rw-r--r-- | packages/hmatrix/src/Numeric/GSL/Polynomials.hs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/packages/hmatrix/src/Numeric/GSL/Polynomials.hs b/packages/hmatrix/src/Numeric/GSL/Polynomials.hs index 290c615..b1be85d 100644 --- a/packages/hmatrix/src/Numeric/GSL/Polynomials.hs +++ b/packages/hmatrix/src/Numeric/GSL/Polynomials.hs | |||
@@ -1,25 +1,23 @@ | |||
1 | {-# LANGUAGE CPP, ForeignFunctionInterface #-} | ||
2 | ----------------------------------------------------------------------------- | ||
3 | {- | | 1 | {- | |
4 | Module : Numeric.GSL.Polynomials | 2 | Module : Numeric.GSL.Polynomials |
5 | Copyright : (c) Alberto Ruiz 2006 | 3 | Copyright : (c) Alberto Ruiz 2006 |
6 | License : GPL-style | 4 | License : GPL |
7 | 5 | Maintainer : Alberto Ruiz | |
8 | Maintainer : Alberto Ruiz (aruiz at um dot es) | ||
9 | Stability : provisional | 6 | Stability : provisional |
10 | Portability : uses ffi | ||
11 | 7 | ||
12 | Polynomials. | 8 | Polynomials. |
13 | 9 | ||
14 | <http://www.gnu.org/software/gsl/manual/html_node/General-Polynomial-Equations.html#General-Polynomial-Equations> | 10 | <http://www.gnu.org/software/gsl/manual/html_node/General-Polynomial-Equations.html#General-Polynomial-Equations> |
15 | 11 | ||
16 | -} | 12 | -} |
17 | ----------------------------------------------------------------------------- | 13 | |
14 | |||
18 | module Numeric.GSL.Polynomials ( | 15 | module Numeric.GSL.Polynomials ( |
19 | polySolve | 16 | polySolve |
20 | ) where | 17 | ) where |
21 | 18 | ||
22 | import Data.Packed.Internal | 19 | import Data.Packed |
20 | import Numeric.GSL.Internal | ||
23 | import Data.Complex | 21 | import Data.Complex |
24 | import System.IO.Unsafe (unsafePerformIO) | 22 | import System.IO.Unsafe (unsafePerformIO) |
25 | 23 | ||
@@ -55,4 +53,5 @@ polySolve' v | dim v > 1 = unsafePerformIO $ do | |||
55 | return r | 53 | return r |
56 | | otherwise = error "polySolve on a polynomial of degree zero" | 54 | | otherwise = error "polySolve on a polynomial of degree zero" |
57 | 55 | ||
58 | foreign import ccall unsafe "gsl-aux.h polySolve" c_polySolve:: TVCV | 56 | foreign import ccall unsafe "gsl-aux.h polySolve" c_polySolve:: TV (TCV Res) |
57 | |||