This library provides safe access to the Cuba integration library.
Below we show an example of an integration of a test function with user data (this can be of any type):
```rust extern crate cuba; use cuba::CubaIntegrator;
struct TestUserData { f1: f64, f2: f64, }
fn testintegrand(x: &[f64], f: &mut [f64], userdata: &mut TestUserData) -> i32 { f[0] = (x[0] * x[1]).sin() * userdata.f1; f[1] = (x[1] * x[1]).cos() * userdata.f2; 0 }
fn main() { let mut ci = CubaIntegrator::new(testintegrand); ci.setmineval(10).set_maxeval(10000);
let r = ci.vegas(2, 2, TestUserData { f1: 5., f2: 7. });
println!("{:#?}", r);
} ```