pub struct Valuer<G, F, C>where
G: Genome,
F: EvaluateFitness<G>,
C: EvaluateObjectiveValue<G>,{ /* private fields */ }
Implementations§
source§impl<G, F, C> Valuer<G, F, C>where
G: Genome,
F: EvaluateFitness<G>,
C: EvaluateObjectiveValue<G>,
impl<G, F, C> Valuer<G, F, C>where G: Genome, F: EvaluateFitness<G>, C: EvaluateObjectiveValue<G>,
pub fn new() -> Self
sourcepub fn with_fitness(self, f: F) -> Self
pub fn with_fitness(self, f: F) -> Self
Set fitness evaluator for building population.
sourcepub fn with_creator(self, c: C) -> Self
pub fn with_creator(self, c: C) -> Self
Set evaluator of objective value for creating individuals.
sourcepub fn create_individuals(&self, genomes: Vec<G>) -> Vec<Individual<G>> ⓘ
pub fn create_individuals(&self, genomes: Vec<G>) -> Vec<Individual<G>> ⓘ
Create individuals from genomes.
sourcepub fn build_population(&mut self, indvs: Vec<Individual<G>>) -> Population<G>
pub fn build_population(&mut self, indvs: Vec<Individual<G>>) -> Population<G>
Build a population from individuals.
Auto Trait Implementations§
impl<G, F, C> RefUnwindSafe for Valuer<G, F, C>where C: RefUnwindSafe, F: RefUnwindSafe, G: RefUnwindSafe,
impl<G, F, C> Send for Valuer<G, F, C>where C: Send, F: Send,
impl<G, F, C> Sync for Valuer<G, F, C>where F: Sync, G: Sync,
impl<G, F, C> Unpin for Valuer<G, F, C>where C: Unpin, F: Unpin, G: Unpin,
impl<G, F, C> UnwindSafe for Valuer<G, F, C>where C: UnwindSafe, F: UnwindSafe, G: UnwindSafe,
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.