Struct revonet::ne::NEIndividual
[−]
[src]
pub struct NEIndividual { /* fields omitted */ }
Represents individual for neuroevolution. The main difference is that the NE individual also
has a network
field, which stores current neural network.
Trait Implementations
impl Clone for NEIndividual
[src]
fn clone(&self) -> NEIndividual
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for NEIndividual
[src]
impl Individual for NEIndividual
[src]
fn new() -> NEIndividual
Creates a new individual with empty set of genes and NAN fitness.
fn init<R: Rng>(&mut self, size: usize, rng: &mut R)
Initializes an individual by allocating random vector of genes using Gaussian distribution. Read more
fn get_fitness(&self) -> f32
Return current fitness value.
fn set_fitness(&mut self, fitness: f32)
Update fitness value.
fn to_vec(&self) -> Option<&[f32]>
Return vector of genes.
fn to_vec_mut(&mut self) -> Option<&mut Vec<f32>>
Return mutable vector of genes.
fn to_net(&mut self) -> Option<&MultilayeredNetwork>
Return MultilayeredNetwork
object with weights assigned according to the genes' values.
fn to_net_mut(&mut self) -> Option<&mut MultilayeredNetwork>
Return mutable MultilayeredNetwork
object with weights assigned according to the genes' values.
fn set_net(&mut self, net: MultilayeredNetwork)
Update individual's MultilayeredNetwork
object and update genes according to the network weights. Read more