Skip to main content

evaluate_trials_parallel

Function evaluate_trials_parallel 

Source
pub fn evaluate_trials_parallel<F>(
    trials: &[Array1<f64>],
    eval_fn: Arc<F>,
    config: &ParallelConfig,
) -> Vec<f64>
where F: Fn(&Array1<f64>) -> f64 + Send + Sync,
Expand description

Evaluate trials in parallel for differential evolution

This function evaluates multiple trial vectors in parallel, which is useful during the main DE loop where we generate and evaluate one trial per individual.

§Arguments

  • trials - Vector of trial vectors to evaluate
  • eval_fn - Function to evaluate each trial
  • config - Parallel configuration

§Returns

Vector of fitness values for each trial