Struct evco::gp::Individual
[−]
[src]
pub struct Individual<T> where T: Tree {
pub tree: BoxTree<T>,
// some fields omitted
}
A genetic individual to mate and mutate in a Genetic Program.
Wraps around a BoxTree
and caches useful data.
Fields
tree: BoxTree<T>
The contained GP tree, starting at the head.
Methods
impl<T> Individual<T> where T: Tree
[src]
fn new<R: Rng>(tg: &mut TreeGen<R>) -> Individual<T>
Generate a new Tree and individual.
fn new_from_tree(boxtree: BoxTree<T>) -> Individual<T>
Create from a Tree.
fn nodes_count(&self) -> usize
Get cached number of nodes in tree.
fn recalculate_metadata(&mut self)
Update cached metadata such at the number of nodes in the tree.
Trait Implementations
impl<T: Debug> Debug for Individual<T> where T: Tree
[src]
impl<T: Clone> Clone for Individual<T> where T: Tree
[src]
fn clone(&self) -> Individual<T>
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