numeric-prelude-0.4.2: An experimental alternative hierarchy of numeric type classes

Safe HaskellNone
LanguageHaskell98

MathObj.PowerSeries2

Description

Two-variate power series.

Synopsis

Documentation

newtype T a Source

In order to handle both variables equivalently we maintain a list of coefficients for terms of the same total degree. That is

eval [[a], [b,c], [d,e,f]] (x,y) ==
   a + b*x+c*y + d*x^2+e*x*y+f*y^2

Although the sub-lists are always finite and thus are more like polynomials than power series, division and square root computation are easier to implement for power series.

Constructors

Cons 

Fields

coeffs :: T a
 

Instances

Functor T 
C T 
(Eq a, C a) => Eq (T a) 
(Ord a, C a) => Ord (T a) 
Show a => Show (T a) 
C a => C (T a) 
C a => C (T a) 
C a => C (T a) 
C a => C (T a) 

isValid :: [[a]] -> Bool Source

check :: [[a]] -> [[a]] Source

fromCoeffs :: [[a]] -> T a Source

fromPowerSeries0 :: C a => T a -> T a Source

fromPowerSeries1 :: C a => T a -> T a Source

lift0 :: T a -> T a Source

lift1 :: (T a -> T a) -> T a -> T a Source

lift2 :: (T a -> T a -> T a) -> T a -> T a -> T a Source

const :: a -> T a Source

truncate :: Int -> T a -> T a Source