Portability | portable |
---|---|
Stability | experimental |
Maintainer | mik@konecny.aow.cz |
Approximation of continuous real functions defined on the unit rectangle domain of a certain dimension.
To be imported qualified, usually with the synonym UFA.
- class ERFnApprox box varid domra ranra fa => ERUnitFnApprox box varid domra ranra fa | fa -> box varid domra ranra where
- bottomApprox :: fa
- const :: [ranra] -> fa
- affine :: [ranra] -> Map varid [ranra] -> fa
- composeWithThin :: fa -> Map varid fa -> fa
- volume :: [varid] -> fa -> ranra
- intersectMeasureImprovement :: EffortIndex -> [varid] -> fa -> fa -> (fa, ranra)
- integrate :: EffortIndex -> fa -> varid -> domra -> fa -> fa
- keyPointsConsistencyCheck :: ERUnitFnApprox box varid domra ranra fa => (box -> ranra) -> fa -> [(box, ranra, ranra)]
- keyPointsPointwiseConsistencyCheck :: ERUnitFnApprox box varid domra ranra fa => ([ranra] -> ranra) -> [fa] -> fa -> [(box, ranra, ranra)]
Documentation
class ERFnApprox box varid domra ranra fa => ERUnitFnApprox box varid domra ranra fa | fa -> box varid domra ranra whereSource
This class extends ERFnApprox
by:
- assuming that the domain of the function enclosures is always
[-1,1]^n
for somen
; - allowing the construction of basic function enclosures where the domain has to be known.
bottomApprox :: faSource
A function enclosure with no information about the function's values.
Construct a constant enclosure for a tuple of functions.
:: [ranra] | values at 0 |
-> Map varid [ranra] | ascents of each base vector |
-> fa |
Construct the exact enclosure of an affine function on [-1,1]^n
.
:: fa | enclosure of |
-> Map varid fa | specifies the variables to substitute and for each such variable |
-> fa | enclosure of BEWARE: Enclosure is probably incorrect where values of |
A simple and limited composition of functions.
It is primarily intended to be used for precomposition with affine functions.
volume :: [varid] -> fa -> ranraSource
Find close upper and lower bounds of the volume of the entire enclosure. A negative volume means that the enclosure is certainly inconsistent.
Explicitly specify the variables to identify the dimension of the domain.
intersectMeasureImprovementSource
:: EffortIndex | |
-> [varid] | |
-> fa | |
-> fa | |
-> (fa, ranra) | enclosure intersection and measurement of improvement analogous to the one
returned by the pointwise |
Intersect two enclosures and measure the global improvement as one number.
(Use intersectMeasureImprovement
defined in module Data.Number.ER.Real.Approx
to measure the improvement using a function enclosure.)
Explicitly specify the variables to identify the dimension of the domain.
:: EffortIndex | how hard to try |
-> fa | function to integrate |
-> varid |
|
-> domra | origin in terms of |
-> fa | values at origin |
-> fa |
Safely integrate a [-1,1]^n -> R^m
function enclosure
with some initial condition (origin and function at origin).
(ERUnitFnBaseElementary boxb boxra varid b ra fb, Show varid, Show boxra) => ERUnitFnApprox boxra varid ra ra (ERFnInterval fb) | |
(ERUnitFnBaseElementary boxb boxra varid b ra fb, ERUnitFnBaseIElementary boxb boxra varid b ra fb, Show varid, Show boxra) => ERUnitFnApprox boxra varid ra ra (ERFnIntervalOI fb) |
keyPointsConsistencyCheckSource
:: ERUnitFnApprox box varid domra ranra fa | |
=> (box -> ranra) | function |
-> fa | alleged approximation of |
-> [(box, ranra, ranra)] |
Check that a function approximation is consistent with a real function that is meant to compute the same function.
The result of this function is the list of points in which the consistency check failed. The result of the operation is also included both for the real number version and the function approximation version.
keyPointsPointwiseConsistencyCheckSource
:: ERUnitFnApprox box varid domra ranra fa | |
=> ([ranra] -> ranra) | function |
-> [fa] | approximations of input functions |
-> fa | alleged approximation of |
-> [(box, ranra, ranra)] |
Check that a pointwise operation previously performed on function approximations is consistent with the same operation performed on selected points in the domain of these functions. The selected points are the centres of all faces of all dimensions, which includes the corners.
The result of this function is the list of points in which the consistency check failed. The result of the operation is also included both for the real number version and the function approximation version.