module Numeric.Integration.SphericalSimplexCubature
(integrateOnSphericalSimplex, SphericalSimplex, orthants, Result (..))
where
import Numeric.Integration.Simplex.Simplex
import Numeric.Integration.SimplexCubature
import Numeric.Integration.SphericalSimplexCubature.Internal
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 (SphericalSimplex -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length SphericalSimplex
ssimplex Int -> Int -> Int
forall a. Num a => a -> a -> a
- Int
1)