Struct cuba::CubaIntegrator
source · pub struct CubaIntegrator<T> { /* private fields */ }
Expand description
A Cuba integrator. It should be created with an integrand function.
Implementations
sourceimpl<T> CubaIntegrator<T>
impl<T> CubaIntegrator<T>
sourcepub fn new(integrand: Integrand<T>) -> CubaIntegrator<T>
pub fn new(integrand: Integrand<T>) -> CubaIntegrator<T>
Create a new Cuba integrator. Use the set_
functions
to set integration parameters.
sourcepub fn set_cores(&mut self, cores: usize, max_points_per_core: usize) -> &mut Self
pub fn set_cores(&mut self, cores: usize, max_points_per_core: usize) -> &mut Self
Set the number of cores and the maximum number of points per core.
The default is the number of idle cores for cores
and
1000 for max_points_per_core
.
pub fn set_mineval(&mut self, mineval: i64) -> &mut Self
pub fn set_maxeval(&mut self, maxeval: i64) -> &mut Self
pub fn set_nstart(&mut self, nstart: i64) -> &mut Self
pub fn set_nincrease(&mut self, nincrease: i64) -> &mut Self
pub fn set_epsrel(&mut self, epsrel: f64) -> &mut Self
pub fn set_epsabs(&mut self, epsabs: f64) -> &mut Self
pub fn set_batch(&mut self, batch: i64) -> &mut Self
pub fn set_seed(&mut self, seed: i32) -> &mut Self
pub fn set_use_only_last_sample(
&mut self,
use_only_last_sample: bool
) -> &mut Self
pub fn set_save_state_file(&mut self, save_state_file: String) -> &mut Self
pub fn set_keep_state_file(&mut self, keep_state_file: bool) -> &mut Self
pub fn set_reset_vegas_integrator(
&mut self,
reset_vegas_integrator: bool
) -> &mut Self
sourcepub fn vegas(
&mut self,
ndim: usize,
ncomp: usize,
verbosity: CubaVerbosity,
gridno: i32,
user_data: T
) -> CubaResult
pub fn vegas(
&mut self,
ndim: usize,
ncomp: usize,
verbosity: CubaVerbosity,
gridno: i32,
user_data: T
) -> CubaResult
Integrate using the Vegas integrator.
ndim
- Dimension of the inputncomp
- Dimension (components) of the outputverbosity
- Verbosity levelgridno
- Grid number between -10 and 10. If 0, no grid is stored. If it is positive, the grid is storedin thegridno
th slot. With a negative number the grid is cleared.user_data
- User data used by the integrand function
Auto Trait Implementations
impl<T> RefUnwindSafe for CubaIntegrator<T>
impl<T> Send for CubaIntegrator<T>
impl<T> Sync for CubaIntegrator<T>
impl<T> Unpin for CubaIntegrator<T>
impl<T> UnwindSafe for CubaIntegrator<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more