pub trait MultiObjectiveFitness<G>: Send + Sync {
// Required methods
fn num_objectives(&self) -> usize;
fn evaluate(&self, genome: &G) -> Vec<f64>;
}Expand description
Multi-objective fitness function trait
Send + Sync only with the parallel feature, for the same reason and
with the same caveat as Fitness: a
deliberate, known non-additive feature that keeps !Send (JavaScript
callback) fitnesses valid in single-threaded WASM builds.
Required Methods§
Sourcefn num_objectives(&self) -> usize
fn num_objectives(&self) -> usize
Number of objectives
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<G, F> MultiObjectiveFitness<G> for ClosureMultiObjective<G, F>
Available on crate feature
parallel only.