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

MathObj.PowerSeries2

Contents

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 Fieldscoeffs :: Core 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)

type Core a = [[a]]Source

isValid :: [[a]] -> BoolSource

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

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

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

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

lift0 :: Core a -> T aSource

lift1 :: (Core a -> Core a) -> T a -> T aSource

lift2 :: (Core a -> Core a -> Core a) -> T a -> T a -> T aSource

lift1fromPowerSeries :: ([T a] -> [T a]) -> Core a -> Core aSource

lift2fromPowerSeries :: ([T a] -> [T a] -> [T a]) -> Core a -> Core a -> Core aSource

const :: a -> T aSource

# Series arithmetic

sub :: C a => Core a -> Core a -> Core aSource

add :: C a => Core a -> Core a -> Core aSource

negate :: C a => Core a -> Core aSource

scale :: C a => a -> Core a -> Core aSource

mul :: C a => Core a -> Core a -> Core aSource

divide :: C a => Core a -> Core a -> Core aSource

sqrt :: C a => (a -> a) -> Core a -> Core aSource

integrate0 :: C a => [a] -> Core a -> Core aSource

integrate1 :: C a => [a] -> Core a -> Core aSource

comp :: C a => [a] -> Core a -> Core aSource

Since the inner series must start with a zero, the first term is omitted in y.