Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- type AFM t a = AFMT t AFIndex Identity a
- data AF s a
- newEps :: Num a => AFM t (AF t a)
- newFromInterval :: (Eq a, Fractional a, ExplicitRounding a) => Interval a -> AFM t (AF t a)
- singleton :: Num a => a -> AF s a
- evalAFM :: forall a b. (forall t. AFM t b) -> b
- radius :: (Num a, ExplicitRounding a) => AF s a -> a
- midpoint :: AF s a -> a
- inf :: (Num a, ExplicitRounding a) => AF s a -> a
- sup :: (Num a, ExplicitRounding a) => AF s a -> a
- interval :: (Num a, Ord a, ExplicitRounding a) => AF s a -> Interval a
- member :: (Num a, Ord a, ExplicitRounding a) => a -> AF s a -> Bool
- epscount_ :: AF s a -> Int
- setMidpoint :: (Num a, ExplicitRounding a) => a -> AF s a -> AF s a
- fix :: (Num a, Ord a, ExplicitRounding a) => AF s a -> [a] -> Interval a
- addError :: (Num a, Ord a) => AF s a -> a -> AF s a
- (.+) :: (Num a, ExplicitRounding a) => a -> AF s a -> AF s a
- (.*) :: (Eq a, Num a, Ord a, ExplicitRounding a) => a -> AF s a -> AF s a
Documentation
An affine form is defined by its midpoint, list of epsilon coefficients and an error coefficient
Instances
(Floating a, RealFrac a, ExplicitRounding a, Ord a) => Floating (AF s a) Source # | |
(Fractional a, ExplicitRounding a, Ord a) => Fractional (AF s a) Source # | |
(Fractional a, ExplicitRounding a, Ord a) => Num (AF s a) Source # | |
Show a => Show (AF s a) Source # | |
newEps :: Num a => AFM t (AF t a) Source #
This gives an affine form with midpoint 0 and radius 1. This affine form does not share epsilons with any affine forms created before it. It can be used to instantiate new affine forms.
newFromInterval :: (Eq a, Fractional a, ExplicitRounding a) => Interval a -> AFM t (AF t a) Source #
Creates a new affine form that covers the interval. This affine form does not share epsilons with any affine forms created before it.
singleton :: Num a => a -> AF s a Source #
Creates a new affine form that represents some exact value
evalAFM :: forall a b. (forall t. AFM t b) -> b Source #
Evaluates the AFM monad. It is not possible to get an AF out of an AFM monad.
midpoint :: AF s a -> a Source #
Gives the midpoint of the affine form (the first term of the affine form).
inf :: (Num a, ExplicitRounding a) => AF s a -> a Source #
Gives the minimal possible value of the affine form
sup :: (Num a, ExplicitRounding a) => AF s a -> a Source #
Gives the maximal possible value of the affine form
interval :: (Num a, Ord a, ExplicitRounding a) => AF s a -> Interval a Source #
Gives the corresponding interval of the affine form
member :: (Num a, Ord a, ExplicitRounding a) => a -> AF s a -> Bool Source #
Returns whether the element is representable by the affine form
setMidpoint :: (Num a, ExplicitRounding a) => a -> AF s a -> AF s a Source #
Sets the midpoint of the affine form
fix :: (Num a, Ord a, ExplicitRounding a) => AF s a -> [a] -> Interval a Source #
Fixes the epsilons of the affine form to the values in the list. The list will be padded with zeroes to match the number of coefficients.
addError :: (Num a, Ord a) => AF s a -> a -> AF s a Source #
Adds the value to the error term of the affine form