Skip to main content

evaluate_population_parallel

Function evaluate_population_parallel 

Source
pub fn evaluate_population_parallel<F>(
    population: &Array2<f64>,
    eval_fn: Arc<F>,
    config: &ParallelConfig,
) -> Array1<f64>
where F: Fn(&Array1<f64>) -> f64 + Send + Sync,
Expand description

Evaluate a population in parallel

§Arguments

  • population - 2D array where each row is an individual
  • eval_fn - Function to evaluate each individual
  • config - Parallel configuration

§Returns

Array of fitness values for each individual