Copyright | (c) Michal Konecny |
---|---|
License | BSD3 |
Maintainer | mikkonecny@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Classes for real number function operations
Synopsis
- class HasDomain f where
- data SameDomFnPair f = SameDomFnPair (f, f)
- class HasDomain f => ArbitraryWithDom f where
- arbitraryWithDom :: Domain f -> Gen f
- class CanApply f x where
- class CanApplyApprox f x where
- type ApplyApproxType f x
- applyApprox :: f -> x -> ApplyApproxType f x
- sampledRange :: (CanApply f t, ApplyType f t ~ t, CanMinMaxSameType t, ConvertibleExactly Dyadic t, Show t) => DyadicInterval -> Integer -> f -> Interval t t
- class HasFnConstructorInfo f where
- type FnConstructorInfo f
- getFnConstructorInfo :: f -> FnConstructorInfo f
- type HasConstFunctions t f = ConvertibleExactly (FnConstructorInfo f, t) f
- constFn :: HasConstFunctions t f => FnConstructorInfo f -> t -> f
- specEvalConstFn :: _ => T c -> T f -> T x -> Spec
- class HasVars f where
- type Var f
- varFn :: FnConstructorInfo f -> Var f -> f
- specEvalUnaryVarFn :: _ => T f -> T x -> Spec
- class CanMaximiseOverDom f d where
- type MaximumOverDomType f d
- maximumOverDom :: f -> d -> MaximumOverDomType f d
- class CanMinimiseOverDom f d where
- type MinimumOverDomType f d
- minimumOverDom :: f -> d -> MinimumOverDomType f d
- specCanMaximiseOverDom :: _ => T f -> T x -> Spec
- class CanIntegrateOverDom f bounds where
- type IntegralOverDomType f bounds
- integrateOverDom :: f -> bounds -> IntegralOverDomType f bounds
Documentation
class HasDomain f where Source #
Instances
HasDomain f => HasDomain (FnAndDescr f) Source # | |
Defined in AERN2.RealFun.Tests type Domain (FnAndDescr f) Source # getDomain :: FnAndDescr f -> Domain (FnAndDescr f) Source # |
data SameDomFnPair f Source #
SameDomFnPair (f, f) |
Instances
Show f => Show (SameDomFnPair f) Source # | |
Defined in AERN2.RealFun.Operations showsPrec :: Int -> SameDomFnPair f -> ShowS # show :: SameDomFnPair f -> String # showList :: [SameDomFnPair f] -> ShowS # | |
(ArbitraryWithDom f, Arbitrary f) => Arbitrary (SameDomFnPair f) Source # | |
Defined in AERN2.RealFun.Operations arbitrary :: Gen (SameDomFnPair f) # shrink :: SameDomFnPair f -> [SameDomFnPair f] # |
class HasDomain f => ArbitraryWithDom f where Source #
arbitraryWithDom :: Domain f -> Gen f Source #
class CanApplyApprox f x where Source #
Give an unsafe etimate of the function's range which is fast to compute. Intended to be used in optimisation heuristics.
type ApplyApproxType f x Source #
:: f | f |
-> x | x |
-> ApplyApproxType f x |
compute a cheap and unsafe approximation of f(x)
sampledRange :: (CanApply f t, ApplyType f t ~ t, CanMinMaxSameType t, ConvertibleExactly Dyadic t, Show t) => DyadicInterval -> Integer -> f -> Interval t t Source #
Evaluate a function on a regular grid of the given size and return
the largerst and smallest values found. Useful for making instances
of class CanApplyApprox
.
class HasFnConstructorInfo f where Source #
type FnConstructorInfo f Source #
getFnConstructorInfo :: f -> FnConstructorInfo f Source #
type HasConstFunctions t f = ConvertibleExactly (FnConstructorInfo f, t) f Source #
constFn :: HasConstFunctions t f => FnConstructorInfo f -> t -> f Source #
class HasVars f where Source #
:: FnConstructorInfo f | eg domain and/or accuracy guide |
-> Var f | x |
-> f |
the function x
, ie the function that project the domain to the given variable x
class CanMaximiseOverDom f d where Source #
type MaximumOverDomType f d Source #
maximumOverDom :: f -> d -> MaximumOverDomType f d Source #
class CanMinimiseOverDom f d where Source #
type MinimumOverDomType f d Source #
minimumOverDom :: f -> d -> MinimumOverDomType f d Source #
class CanIntegrateOverDom f bounds where Source #
type IntegralOverDomType f bounds Source #
integrateOverDom :: f -> bounds -> IntegralOverDomType f bounds Source #