pub trait SelectionHandler: Send + Sync {
// Required methods
fn before_selection(&self, population_size: usize, generation: usize);
fn after_selection(&self, record: &SelectionRecord);
// Provided method
fn modify_probabilities(&self, probabilities: Vec<f64>) -> Vec<f64> { ... }
}Expand description
Effect handler trait for selection operations
Required Methods§
Sourcefn before_selection(&self, population_size: usize, generation: usize)
fn before_selection(&self, population_size: usize, generation: usize)
Called before selection
Sourcefn after_selection(&self, record: &SelectionRecord)
fn after_selection(&self, record: &SelectionRecord)
Called after selection