AERN-RnToRm-0.3.0.1: polynomial function enclosures (PFEs) approximating exact real functions

Portabilityportable
Stabilityexperimental
Maintainermik@konecny.aow.cz

Data.Number.ER.RnToRm.UnitDom.ChebyshevBase.Polynom.Basic

Description

Internal module for Data.Number.ER.RnToRm.UnitDom.ChebyshevBase.Polynom.

Definition of the polynomial datatype and simple related functions.

Synopsis

Documentation

data ERChebPoly box b Source

A polynomial represented by its coefficients it the Chebyshev basis.

The polynomials are never to be used outside the domain [-1,1]^n.

All operations are rounded in such a way that the resulting polynomial is a point-wise upper or lower bound of the exact result.

Constructors

ERChebPoly 

Fields

chplCoeffs :: Map (TermKey box) b
 

Instances

Typeable2 ERChebPoly 
(ERRealBase rb, RealFrac rb, DomainBox box varid Int, Ord box, DomainBoxMappable boxb boxbb varid rb [(rb, rb)], DomainBoxMappable boxra boxras varid (ERInterval rb) [ERInterval rb], DomainIntBox boxra varid (ERInterval rb)) => ERUnitFnBase boxb boxra varid rb (ERInterval rb) (ERChebPoly box rb) 
(Eq box, Eq b) => Eq (ERChebPoly box b) 
(ERRealBase b, DomainBox box varid Int, Ord box) => Fractional (ERChebPoly box b) 
(Data box, Data b, Ord box) => Data (ERChebPoly box b) 
(ERRealBase b, DomainBox box varid Int, Ord box) => Num (ERChebPoly box b) 
(ERRealBase b, DomainBox box varid Int, Ord box) => Ord (ERChebPoly box b) 
(ERRealBase b, DomainBox box varid Int, Ord box) => Show (ERChebPoly box b) 
(Ord a, Binary a, Binary b) => Binary (ERChebPoly a b) 

type TermKey box = boxSource

chplConstTermKey :: DomainBox box varid d => boxSource

chplIsConstTermKey :: DomainBox box varid d => box -> BoolSource

chplTermOrder :: (DomainBox box varid d, Num d) => box -> dSource

chplTermArity :: DomainBox box varid d => box -> IntSource

chplGetDegree :: (ERRealBase b, DomainBox box varid d, Num d, Ord d) => ERChebPoly box b -> dSource

Inspect all terms of the polynomial and return the degree of the highest degree term.

chplConst :: (ERRealBase b, DomainBox box varid Int, Ord box) => b -> ERChebPoly box bSource

chplVar :: (ERRealBase b, DomainBox box varid Int, Ord box) => varid -> ERChebPoly box bSource

make a basic x polynomial for a given variable number

chplNormaliseUp :: (ERRealBase b, DomainBox box varid Int, Ord box) => ERChebPoly box b -> ERChebPoly box bSource

chplNormaliseDown :: (ERRealBase b, DomainBox box varid Int, Ord box) => ERChebPoly box b -> ERChebPoly box bSource

chplNormalise :: (ERRealBase b, DomainBox box varid Int, Ord box) => ERChebPoly box b -> (ERChebPoly box b, ERChebPoly box b)Source

chplShowSource

Arguments

:: (ERRealBase b, DomainBox box varid Int, Ord box) 
=> Bool

show the polynomial also in its native Chebyshev basis

-> ERChebPoly box b 
-> String 

Convert a polynomial to a string representation, using the ordinary x^n basis.

chebToXBasisSource

Arguments

:: (ERRealBase b, DomainBox box varid Int, Ord box) 
=> Map (TermKey box) b

polynomial in Chebyshev basis

-> Map (TermKey box) b

approxition of the equivalent polynomial in X^n basis

conversion of polynomials from Chebyshev basis to the X^n basis

(not exact - suffering from rounding in the coefficient conversions)

termXtermsSource

Arguments

:: (DomainBox box varid Int, Ord box) 
=> TermKey box

a Chebyshev term represented by the Chebyshev degrees for each variable in the term

-> Map (TermKey box) Integer

the polynomial equivalent to the given Chebyshev term (using integer coefficients)

conversion of one Chebyshev term to the X^n basis

chebyXCoeffsLists :: (Num d1, Enum d1, Num d2, Enum d2) => [[(d1, d2)]]Source

Chebyshev polynomials expressed as associative lists power -> coeff

chebyXCoeffs :: (Num d, Enum d) => [[d]]Source

Chebyshev polynomials expressed as lists of integer coefficients for powers 0,1,2...