Struct GenerationIndividual

Source
pub struct GenerationIndividual<T, FI, SI, RI, const N: usize, const R: usize>{ /* private fields */ }

Implementations§

Source§

impl<T, FI, SI, RI, const N: usize, const R: usize> GenerationIndividual<T, FI, SI, RI, N, R>

Trait Implementations§

Source§

impl<T: Clone, FI, SI, RI, const N: usize, const R: usize> Clone for GenerationIndividual<T, FI, SI, RI, N, R>

Source§

fn clone(&self) -> GenerationIndividual<T, FI, SI, RI, N, R>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug, FI, SI, RI, const N: usize, const R: usize> Debug for GenerationIndividual<T, FI, SI, RI, N, R>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, FI, SI, RI, const N: usize, const R: usize> EachCrateIndividual for GenerationIndividual<T, FI, SI, RI, N, R>

Source§

type Item = T

Source§

fn new(individual: &Rc<Individual<T>>) -> Self

Make individual from base individual. Read more
Source§

fn get_individual(&self) -> &Individual<T>

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, FI, SI, RI, const N: usize, const R: usize> FitnessIndividualTrait for GenerationIndividual<T, FI, SI, RI, N, R>

Source§

fn fitness(&self, other: &Self) -> usize

Calculate a fitness 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
Source§

impl<T: PartialEq, FI, SI, RI, const N: usize, const R: usize> PartialEq for GenerationIndividual<T, FI, SI, RI, N, R>

Source§

fn eq(&self, other: &GenerationIndividual<T, FI, SI, RI, N, R>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T, FI, SI, RI, const N: usize, const R: usize> ReplenisherIndividualTrait<N, R> for GenerationIndividual<T, FI, SI, RI, N, R>

Source§

fn replenish<'a, U>(group: U) -> Vec<T>
where U: IntoIterator<Item = &'a Self>, Self: 'a,

Replenish individuals. Read more
Source§

impl<T, FI, SI, RI, const N: usize, const R: usize> SelectorIndividualTrait<R> for GenerationIndividual<T, FI, SI, RI, N, R>

Source§

type Err = <SI as SelectorIndividualTrait<R>>::Err

An error of selector. This is occurred when bad scores are given to this.
Source§

fn selected_ids<'a, U>( group: U, score: HashMap<usize, usize>, ) -> Result<HashSet<usize>, Self::Err>
where U: IntoIterator<Item = &'a Self>, Self: 'a,

Select individuals. Read more
Source§

impl<T: Eq, FI, SI, RI, const N: usize, const R: usize> Eq for GenerationIndividual<T, FI, SI, RI, N, R>

Source§

impl<T, FI, SI, RI, const N: usize, const R: usize> GenerationIndividualTrait<T, N, R> for GenerationIndividual<T, FI, SI, RI, N, R>

Source§

impl<T, FI, SI, RI, const N: usize, const R: usize> StructuralPartialEq for GenerationIndividual<T, FI, SI, RI, N, R>

Auto Trait Implementations§

§

impl<T, FI, SI, RI, const N: usize, const R: usize> Freeze for GenerationIndividual<T, FI, SI, RI, N, R>
where FI: Freeze, SI: Freeze, RI: Freeze,

§

impl<T, FI, SI, RI, const N: usize, const R: usize> !RefUnwindSafe for GenerationIndividual<T, FI, SI, RI, N, R>

§

impl<T, FI, SI, RI, const N: usize, const R: usize> !Send for GenerationIndividual<T, FI, SI, RI, N, R>

§

impl<T, FI, SI, RI, const N: usize, const R: usize> !Sync for GenerationIndividual<T, FI, SI, RI, N, R>

§

impl<T, FI, SI, RI, const N: usize, const R: usize> Unpin for GenerationIndividual<T, FI, SI, RI, N, R>
where FI: Unpin, SI: Unpin, RI: Unpin,

§

impl<T, FI, SI, RI, const N: usize, const R: usize> !UnwindSafe for GenerationIndividual<T, FI, SI, RI, N, R>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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