AERN-RnToRm-0.4.1: polynomial function enclosures (PFEs) approximating exact real functionsSource codeContentsIndex
Data.Number.ER.RnToRm.UnitDom.Base
Portabilityportable
Stabilityexperimental
Maintainermik@konecny.aow.cz
Description

A class abstracting function arithmetic with directed rounding. It is used to describe a boundary for an approximation to a real function on the interval [-1,1]^n.

To be imported qualified, usually with the synonym UFB.

Documentation
class (ERRealBase b, ERIntApprox ra, Fractional ufb, Ord ufb, DomainBox boxb varid b, DomainIntBox boxra varid ra) => ERUnitFnBase boxb boxra varid b ra ufb | ufb -> boxb boxra varid b ra whereSource
Methods
initialiseBaseArithmetic :: ufb -> IO ()Source
checkSource
:: Stringindentification of caller location for easier debugging
-> ufb
-> ufb
Check internal consistency of the function and report problem if any.
getGranularity :: ufb -> GranularitySource
setMinGranularity :: Granularity -> ufb -> ufbSource
setGranularity :: Granularity -> ufb -> ufbSource
const :: b -> ufbSource
Construct a constant function.
affineSource
:: bvalue at 0
-> Map varid bascent of each base vector
-> ufb
Construct an affine function.
scale :: b -> ufb -> (ufb, ufb)Source
Multiply a function by a scalar, rounding downwards and upwards.
scaleApprox :: ra -> ufb -> (ufb, ufb)Source
Multiply a function by an approximation of a scalar, rounding downwards and upwards.
scaleApproxDown :: ra -> ufb -> ufbSource
Multiply a function by an approximation of a scalar, rounding downwards.
scaleApproxUp :: ra -> ufb -> ufbSource
Multiply a function by an approximation of a scalar, rounding upwards.
getDegree :: ufb -> IntSource

Get the degree of this particular function.

If the function is a polynomial, this function should return its degree.

reduceDegree :: Int -> ufb -> (ufb, ufb)Source
Decrease the degree of function approximation, rounding pointwise downwards and upwards.
reduceDegreeDown :: Int -> ufb -> ufbSource
Decrease the degree of function approximation, rounding pointwise downwards.
reduceDegreeUp :: Int -> ufb -> ufbSource
Decrease the degree of function approximation, rounding pointwise upwards.
integrateSource
:: varidvariable to integrate by
-> ufbp(x)
-> (ufb, ufb)
Approximate the integral of p (with 0 at 0) from below and from above.
integrateDownSource
:: varidvariable to integrate by
-> ufbp(x)
-> ufb
Approximate the integral of p (with 0 at 0) from below.
integrateUpSource
:: varidvariable to integrate by
-> ufbp(x)
-> ufb
Approximate the integral of p (with 0 at 0) from above.
volumeAboveZeroSource
:: [varid]axes to include in the measuring domain
-> ufb
-> (b, b)
Measure the volume between a function and the zero hyperplane on the domain [-1,1]^n.
upperBound :: EffortIndex -> ufb -> bSource
Find an upper bound of the function over [-1,1]^n.
lowerBound :: EffortIndex -> ufb -> bSource
Find a lower bound of the function over [-1,1]^n.
nonnegSource
:: Intmax degree for result
-> ufbp(x)
-> (ufb, ufb)
Approximate the function max(0,p(x)) from below and from above.
recipSource
:: Intmax degree for result
-> EffortIndex
-> ufbp(x)
-> (ufb, ufb)
Approximate the function 1/p(x) from below and from above.
recipDown :: Int -> EffortIndex -> ufb -> ufbSource
Approximate the function 1/p(x) from below.
recipUp :: Int -> EffortIndex -> ufb -> ufbSource
Approximate the function 1/p(x) from above.
maxSource
:: Intmax degree for result
-> ufbp_1(x)
-> ufbp_2(x)
-> (ufb, ufb)
Approximate the function max(p_1(x),p_2(x)) from below and from above.
maxDownSource
:: Intmax degree for result
-> ufbp_1(x)
-> ufbp_2(x)
-> ufb
Approximate the function max(p_1(x),p_2(x)) from below.
maxUpSource
:: Intmax degree for result
-> ufbp_1(x)
-> ufbp_2(x)
-> ufb
Approximate the function max(p_1(x),p_2(x)) from above.
minSource
:: Intmax degree for result
-> ufbp_1(x)
-> ufbp_2(x)
-> (ufb, ufb)
Approximate the function min(p_1(x),p_2(x)) from below and from above.
minDownSource
:: Intmax degree for result
-> ufbp_1(x)
-> ufbp_2(x)
-> ufb
Approximate the function min(p_1(x),p_2(x)) from below.
minUpSource
:: Intmax degree for result
-> ufbp_1(x)
-> ufbp_2(x)
-> ufb
Approximate the function min(p_1(x),p_2(x)) from above.
sqrtSource
:: Intmax degree for result
-> EffortIndexhow hard to try when approximating exp as a polynomial
-> ufbp(x)
-> (ufb, ufb)
Approximate sqrt(p(x)) from below and from above.
expSource
:: Intmax degree for result
-> EffortIndexhow hard to try when approximating exp as a polynomial
-> ufbp(x)
-> (ufb, ufb)
Approximate exp(p(x)) from below and from above.
logSource
:: Intmax degree for result
-> EffortIndexhow hard to try when approximating log as a polynomial
-> ufbp(x)
-> (ufb, ufb)
Approximate log(p(x)) from below and from above.
sinSource
:: Intmax degree for result
-> EffortIndexhow hard to try when approximating sin as a polynomial
-> ufbp(x)
-> (ufb, ufb)
Approximate sin(p(x)) from below and from above, assuming the range of p is within [-pi2,pi2].
cosSource
:: Intmax degree for result
-> EffortIndexhow hard to try when approximating cos as a polynomial
-> ufbp(x)
-> (ufb, ufb)
Approximate cos(p(x)) from below and from above, assuming the range of p is within [-pi2,pi2].
atanSource
:: Intmax degree for result
-> EffortIndexhow hard to try when approximating cos as a polynomial
-> ufbp(x)
-> (ufb, ufb)
Approximate atan(p(x)) from below and from above.
eval :: boxb -> ufb -> (b, b)Source
Evaluate at a point, rounding upwards and downwards.
evalDown :: boxb -> ufb -> bSource
Evaluate at a point, rounding downwards.
evalUp :: boxb -> ufb -> bSource
Evaluate at a point, rounding downwards.
evalApprox :: boxra -> ufb -> raSource
Safely evaluate at a point using a real number approximation for both the point and the result.
partialEvalApprox :: boxra -> ufb -> (ufb, ufb)Source
Partially evaluate at a lower-dimensional point given using a real number approximation. Approximate the resulting function from below and from above.
partialEvalApproxDown :: boxra -> ufb -> ufbSource
Partially evaluate at a lower-dimensional point given using a real number approximation. Approximate the resulting function from below.
partialEvalApproxUp :: boxra -> ufb -> ufbSource
Partially evaluate at a lower-dimensional point given using a real number approximation. Approximate the resulting function from above.
composeSource
:: Intmax degree for result
-> ufbfunction f
-> Map varid ufbvariables to substitute and for each variable v, function f_v to substitute for v that maps [-1,1] into [-1,1]
-> (ufb, ufb)upper and lower bounds of f[v |-> f_v]
Compose two functions, rounding upwards and downwards provided each f_v ranges within the domain [-1,1].
composeDownSource
:: Intmax degree for result
-> ufbfunction f1
-> Map varid ufbvariables to substitute and for each variable v, function f_v to substitute for v that maps [-1,1] into [-1,1]
-> ufba lower bound of f1.f2
Compose two functions, rounding downwards provided each f_v ranges within the domain [-1,1].
composeUpSource
:: Intmax degree for result
-> ufbfunction f1
-> Map varid ufbvariables to substitute and for each variable v, function f_v to substitute for v that maps [-1,1] into [-1,1]
-> ufban upper bound of f1.f2
Compose two functions, rounding upwards provided each f_v ranges within the domain [-1,1].
raEndpointsSource
:: ufbthis parameter is not used except for type checking
-> ra
-> (b, b)
Convert from the interval type to the base type. (The types are determined by the given example function.)
raFromEndpointsSource
:: ufbthis parameter is not used except for type checking
-> (b, b)
-> ra
Convert from the base type to the interval type. (The types are determined by the given example function.)
show/hide Instances
(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)
(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)
Produced by Haddock version 2.4.2