Skip to main content

HasIntegrand

Trait HasIntegrand 

Source
pub trait HasIntegrand {
    // Required methods
    fn create_grid(&self) -> Grid<F<f64>>;
    fn name(&self) -> String;
    fn evaluate_sample(
        &mut self,
        sample: &Sample<F<f64>>,
        model: &Model,
        wgt: F<f64>,
        iter: usize,
        use_arb_prec: bool,
        max_eval: Complex<F<f64>>,
    ) -> Result<EvaluationResult>;
    fn get_n_dim(&self) -> usize;

    // Provided methods
    fn get_integrator_settings(&self) -> IntegratorSettings { ... }
    fn merge_results<I: HasIntegrand>(&mut self, _other: &mut I, _iter: usize) { ... }
    fn update_results(&mut self, _iter: usize) { ... }
}

Required Methods§

Source

fn create_grid(&self) -> Grid<F<f64>>

Constructs the continuous or discrete integration grid required by this integrand.

Source

fn name(&self) -> String

Returns the integrand name used in state inspection, logs, and status output.

Source

fn evaluate_sample( &mut self, sample: &Sample<F<f64>>, model: &Model, wgt: F<f64>, iter: usize, use_arb_prec: bool, max_eval: Complex<F<f64>>, ) -> Result<EvaluationResult>

Evaluates one weighted grid sample against the supplied model and numerical controls.

Source

fn get_n_dim(&self) -> usize

Returns the number of continuous sampling dimensions used by the integrand.

Provided Methods§

Source

fn get_integrator_settings(&self) -> IntegratorSettings

Returns integrator settings specialized for this integrand, or the defaults.

Source

fn merge_results<I: HasIntegrand>(&mut self, _other: &mut I, _iter: usize)

Merges iteration-local result state from another worker integrand.

Source

fn update_results(&mut self, _iter: usize)

Finalizes or writes iteration-local result state after an integration iteration.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§