Copyright | (c) Stéphane Laurent 2023-2024 |
---|---|
License | GPL-3 |
Maintainer | laurent_step@outlook.fr |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Evaluation of integrals over a convex polytope. See README for examples.
Synopsis
- data Result = Result {
- value :: Double
- errorEstimate :: Double
- evaluations :: Int
- success :: Bool
- data Results = Results {
- values :: [Double]
- errorEstimates :: [Double]
- evaluations :: Int
- success :: Bool
- data Constraint a = Constraint (LinearCombination a) Sense (LinearCombination a)
- type VectorD = Vector Double
- integrateOnPolytopeN :: (VectorD -> VectorD) -> [[Double]] -> Int -> Int -> Double -> Double -> Int -> IO Results
- integrateOnPolytope :: (VectorD -> Double) -> [[Double]] -> Int -> Double -> Double -> Int -> IO Result
- integrateOnPolytopeN' :: Real a => (VectorD -> VectorD) -> [Constraint a] -> Int -> Int -> Double -> Double -> Int -> IO Results
- integrateOnPolytope' :: Real a => (VectorD -> Double) -> [Constraint a] -> Int -> Double -> Double -> Int -> IO Result
- integratePolynomialOnPolytope :: (RealFrac a, C a) => Spray a -> [[a]] -> IO a
- integratePolynomialOnPolytope' :: Spray Double -> [Constraint Double] -> IO Double
Documentation
Result | |
|
Results | |
|
data Constraint a #
Instances
Show a => Show (Constraint a) | |
Defined in Geometry.VertexEnum.Constraint showsPrec :: Int -> Constraint a -> ShowS # show :: Constraint a -> String # showList :: [Constraint a] -> ShowS # |
:: (VectorD -> VectorD) | integrand |
-> [[Double]] | vertices of the polytope |
-> Int | number of components of the integrand |
-> Int | maximum number of evaluations |
-> Double | desired absolute error |
-> Double | desired relative error |
-> Int | integration rule: 1, 2, 3 or 4 |
-> IO Results | values, error estimate, evaluations, success |
Integral of a multivariate function over a convex polytope given by its vertices.
:: (VectorD -> Double) | integrand |
-> [[Double]] | vertices of the polytope |
-> Int | maximum number of evaluations |
-> Double | desired absolute error |
-> Double | desired relative error |
-> Int | integration rule: 1, 2, 3 or 4 |
-> IO Result | values, error estimate, evaluations, success |
Integral of a real-valued function over a convex polytope given by its vertices.
integrateOnPolytopeN' Source #
:: Real a | |
=> (VectorD -> VectorD) | integrand |
-> [Constraint a] | linear inequalities defining the polytope |
-> Int | number of components of the integrand |
-> Int | maximum number of evaluations |
-> Double | desired absolute error |
-> Double | desired relative error |
-> Int | integration rule: 1, 2, 3 or 4 |
-> IO Results | values, error estimate, evaluations, success |
Integral of a multivariate function over a convex polytope given by linear inequalities.
:: Real a | |
=> (VectorD -> Double) | integrand |
-> [Constraint a] | linear inequalities defining the polytope |
-> Int | maximum number of evaluations |
-> Double | desired absolute error |
-> Double | desired relative error |
-> Int | integration rule: 1, 2, 3 or 4 |
-> IO Result | values, error estimate, evaluations, success |
Integral of a scalar-valued function over a convex polytope given by linear inequalities.
integratePolynomialOnPolytope Source #
:: (RealFrac a, C a) | |
=> Spray a | polynomial to be integrated |
-> [[a]] | vertices of the polytope to integrate over |
-> IO a |
Integral of a polynomial over a convex polytope given by its vertices.
integratePolynomialOnPolytope' Source #
:: Spray Double | polynomial to be integrated |
-> [Constraint Double] | linear inequalities defining the polytope |
-> IO Double |
Integral of a polynomial over a convex polytope given by linear inequalities.