[−][src]Type Definition cuba::VegasIntegrand
type VegasIntegrand<T> = fn(x: &[f64], f: &mut [f64], user_data: &mut T, nvec: usize, core: i32, weight: &[f64], iter: usize) -> Result<(), &'static str>;
Vegas integrand evaluation function.
The dimensions of random input variables x
and output f
are provided to the integration routine as dimension and components respectively.
T
can be any type. If you don't want to provide user data,
simply make T
a usize
and provide any number.
core
specifies the current core that is being used. This can be used to write to
the user data in a thread-safe way.
On returning an error, the integration will be aborted.