Struct GtFitness

Source
pub struct GtFitness<T>
where T: Ord,
{ /* private fields */ }

Trait Implementations§

Source§

impl<T> EachCrateIndividual for GtFitness<T>
where T: Ord,

Source§

type Item = T

Source§

fn new( individual: &Rc<Individual<<GtFitness<T> as EachCrateIndividual>::Item>>, ) -> GtFitness<T>

Make individual from base individual. Read more
Source§

fn get_individual( &self, ) -> &Individual<<GtFitness<T> as EachCrateIndividual>::Item>

Get this individual.
Source§

fn get_id(&self) -> usize

Get an id of this individual.
Source§

fn get_value(&self) -> &Self::Item

Get a value of this individual.
Source§

impl<T> FitnessIndividualTrait for GtFitness<T>
where T: Ord,

Source§

fn fitness(&self, other: &GtFitness<T>) -> usize

Calculate a fitness score to an other individual. Read more
Source§

fn fitness_group<'a, G>(group: G) -> HashMap<usize, usize>
where G: IntoIterator<Item = &'a Self>, Self: 'a,

Calculate a fitness to a group. Read more

Auto Trait Implementations§

§

impl<T> Freeze for GtFitness<T>

§

impl<T> !RefUnwindSafe for GtFitness<T>

§

impl<T> !Send for GtFitness<T>

§

impl<T> !Sync for GtFitness<T>

§

impl<T> Unpin for GtFitness<T>

§

impl<T> !UnwindSafe for GtFitness<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V