Struct spdkit::individual::Individual
source · pub struct Individual<G>where
G: Genome,{ /* private fields */ }
Implementations§
source§impl<G> Individual<G>where
G: Genome,
impl<G> Individual<G>where G: Genome,
sourcepub fn new<E>(genome: G, func: &mut E) -> Selfwhere
E: EvaluateObjectiveValue<G>,
pub fn new<E>(genome: G, func: &mut E) -> Selfwhere E: EvaluateObjectiveValue<G>,
Create a new individual from a genome and evaluation function for raw score.
sourcepub fn objective_value(&self) -> f64
pub fn objective_value(&self) -> f64
Return the evaluated objective value of this individual.
This is sometimes referred to as objective fitness since this measurement is based solely on an individual’s geno/phenotype and is not affected by other factors such as the current makeup of the population
Reference
- De Jong 2006
Trait Implementations§
source§impl<G> AsRef<Individual<G>> for Individual<G>where
G: Genome,
impl<G> AsRef<Individual<G>> for Individual<G>where G: Genome,
Auto Trait Implementations§
impl<G> RefUnwindSafe for Individual<G>where G: RefUnwindSafe,
impl<G> Send for Individual<G>
impl<G> Sync for Individual<G>where G: Sync,
impl<G> Unpin for Individual<G>where G: Unpin,
impl<G> UnwindSafe for Individual<G>where 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.