Trait jeepers::tree::Tree [] [src]

pub trait Tree where Self: Sized {
    const TERMINAL_PROPORTION: f32;

    fn rand_terminal<R: Rng>(tg: &mut TreeGen<R>, current_depth: usize) -> Self;
    fn rand_nonterminal<R: Rng>(tg: &mut TreeGen<R>,
                                current_depth: usize)
                                -> Self; fn rand_tree<R: Rng>(tg: &mut TreeGen<R>) -> Self { ... } fn rand_node<R: Rng>(tg: &mut TreeGen<R>, current_depth: usize) -> Self { ... } }

The Tree trait will be implemented by the trees of all Genetic Programs.

Generally only rand_terminal and rand_nonterminal will need redefining as other methods have default implementations.

Associated Constants

What proportion of possible tree nodes are terminals? 0.0 to 1.0.

Required Methods

Generate a Terminal node (a leaf) to go into a tree.

Generate a Non-Terminal node to go into a tree.

Provided Methods

Generate a new tree within the bounds specified by TreeGen.

Generate a random new node to go into a tree.

Implementors