Copyright | (c) ForSyDe Group KTH 2007-2008 |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | forsyde-dev@ict.kth.se |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell98 |
This is the polynomial arithematic library. The arithematic operations include addition, multiplication, division and power. However, the computation time is not optimized for multiplication and is O(n2), which could be considered to be optimized by FFT algorithms later on.
Synopsis
- data Poly a
- addPoly :: (Num a, Eq a) => Poly a -> Poly a -> Poly a
- mulPoly :: Num a => Poly a -> Poly a -> Poly a
- divPoly :: Num a => Poly a -> Poly a -> Poly a
- powerPoly :: Num a => Poly a -> Int -> Poly a
- getCoef :: Num a => Poly a -> ([a], [a])
- scalePoly :: Num a => a -> Poly a -> Poly a
- addPolyCoef :: Num a => [a] -> [a] -> [a]
- subPolyCoef :: RealFloat a => [a] -> [a] -> [a]
- scalePolyCoef :: Num a => a -> [a] -> [a]
Polynomial data type
Polynomial data type.
Addition, DmMultiplication, division and power operations
Some helper functions
getCoef :: Num a => Poly a -> ([a], [a]) Source #
Some helper functions below.
To get the coefficients of the polynomial.
addPolyCoef :: Num a => [a] -> [a] -> [a] Source #
subPolyCoef :: RealFloat a => [a] -> [a] -> [a] Source #
scalePolyCoef :: Num a => a -> [a] -> [a] Source #