module Numeric.Integration.SphericalSimplexCubature
(integrateOnSphericalSimplex, SphericalSimplex, orthants, Result (..))
where
import Numeric.Integration.Simplex.Simplex ( canonicalSimplex )
import Numeric.Integration.SimplexCubature ( integrateOnSimplex'
, Result(..) )
import Numeric.Integration.SphericalSimplexCubature.Internal ( orthants
, transformedIntegrand
, SphericalSimplex )
integrateOnSphericalSimplex
:: ([Double] -> Double)
-> SphericalSimplex
-> Int
-> Double
-> Double
-> Int
-> IO Result
integrateOnSphericalSimplex :: ([Double] -> Double)
-> SphericalSimplex -> Int -> Double -> Double -> Int -> IO Result
integrateOnSphericalSimplex [Double] -> Double
f SphericalSimplex
ssimplex = (VectorD -> Double)
-> Simplices -> Int -> Double -> Double -> Int -> IO Result
integrateOnSimplex' VectorD -> Double
f' [SphericalSimplex
simplex]
where
f' :: VectorD -> Double
f' = SphericalSimplex -> ([Double] -> Double) -> VectorD -> Double
transformedIntegrand SphericalSimplex
ssimplex [Double] -> Double
f
simplex :: SphericalSimplex
simplex = Int -> SphericalSimplex
canonicalSimplex (forall (t :: * -> *) a. Foldable t => t a -> Int
length SphericalSimplex
ssimplex forall a. Num a => a -> a -> a
- Int
1)