Struct genevo::population::ValueEncodedGenomeBuilder
source · [−]pub struct ValueEncodedGenomeBuilder<V> { /* private fields */ }
Expand description
A GenomeBuilder
that builds value encoded genetic::Genotype
s.
The default implementation can build Vec<T>
genomes. The values of
T
are generated randomly in the range between a min value and a max
value.
Implementations
sourceimpl<V> ValueEncodedGenomeBuilder<V>
impl<V> ValueEncodedGenomeBuilder<V>
sourcepub fn new(genome_length: usize, min_value: V, max_value: V) -> Self
pub fn new(genome_length: usize, min_value: V, max_value: V) -> Self
Returns a new instance of the ValueEncodedGenomeBuilder
that builds
value encoded genomes of length specified by the given genome_length
.
The values of the generated genomes are in the range between the given
min_value
(inclusive) and max_value
(exclusive).
Trait Implementations
sourceimpl<V: Clone> Clone for ValueEncodedGenomeBuilder<V>
impl<V: Clone> Clone for ValueEncodedGenomeBuilder<V>
sourcefn clone(&self) -> ValueEncodedGenomeBuilder<V>
fn clone(&self) -> ValueEncodedGenomeBuilder<V>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<V: Debug> Debug for ValueEncodedGenomeBuilder<V>
impl<V: Debug> Debug for ValueEncodedGenomeBuilder<V>
sourceimpl<A, V> GenomeBuilder<SmallVec<A>> for ValueEncodedGenomeBuilder<V> where
A: Array<Item = V> + Sync,
V: Clone + Debug + PartialEq + PartialOrd + SampleUniform + Send + Sync,
impl<A, V> GenomeBuilder<SmallVec<A>> for ValueEncodedGenomeBuilder<V> where
A: Array<Item = V> + Sync,
V: Clone + Debug + PartialEq + PartialOrd + SampleUniform + Send + Sync,
sourceimpl<V> GenomeBuilder<Vec<V, Global>> for ValueEncodedGenomeBuilder<V> where
V: Clone + Debug + PartialEq + PartialOrd + SampleUniform + Send + Sync,
impl<V> GenomeBuilder<Vec<V, Global>> for ValueEncodedGenomeBuilder<V> where
V: Clone + Debug + PartialEq + PartialOrd + SampleUniform + Send + Sync,
sourceimpl<V: PartialEq> PartialEq<ValueEncodedGenomeBuilder<V>> for ValueEncodedGenomeBuilder<V>
impl<V: PartialEq> PartialEq<ValueEncodedGenomeBuilder<V>> for ValueEncodedGenomeBuilder<V>
sourcefn eq(&self, other: &ValueEncodedGenomeBuilder<V>) -> bool
fn eq(&self, other: &ValueEncodedGenomeBuilder<V>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ValueEncodedGenomeBuilder<V>) -> bool
fn ne(&self, other: &ValueEncodedGenomeBuilder<V>) -> bool
This method tests for !=
.
impl<V> StructuralPartialEq for ValueEncodedGenomeBuilder<V>
Auto Trait Implementations
impl<V> RefUnwindSafe for ValueEncodedGenomeBuilder<V> where
V: RefUnwindSafe,
impl<V> Send for ValueEncodedGenomeBuilder<V> where
V: Send,
impl<V> Sync for ValueEncodedGenomeBuilder<V> where
V: Sync,
impl<V> Unpin for ValueEncodedGenomeBuilder<V> where
V: Unpin,
impl<V> UnwindSafe for ValueEncodedGenomeBuilder<V> where
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more