Struct mli_mep::Mep [] [src]

pub struct Mep<Ins> { /* fields omitted */ }

A multi-expression program represented using a series of operations that can reuse results of previous operations.

Methods

impl<Ins> Mep<Ins>
[src]

[src]

Generates a new Mep with a particular size. Takes an RNG as well to generate random instructions using the instruction's Rng implementation.

inputs determines exactly how many inputs will be passed each time processing is done. Anything else will panic.

outputs determines exactly how many outputs will be consumed each time processing is done. Anything else will panic.

internal_instruction_count determines how many instructions aren't used for outputs, but just do internal processing (hidden instructions).

mutate_lambda corresponds to the lambda of a poisson distribution. It is proportional to the average unit mutate cycles between mutations. It is biased by 1, so a mutate_lambda of 0 means, on average, the instruction distance between mutations is about 1.

crossover_points corresponds to the maximum amount of crossover locations on the chromosome when mating. When mating the crossover_points is chosen randomly between the two Meps.

Trait Implementations

impl<Ins: Debug> Debug for Mep<Ins>
[src]

[src]

Formats the value using the given formatter.

impl<Ins: Clone> Clone for Mep<Ins>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<Ins, R> MateRand<R> for Mep<Ins> where
    R: Rng,
    Ins: Clone
[src]

[src]

The mate function takes two parent references and an Rng (r), then returns a new child. So long as r is deterministic, the output is also deterministic as no other sources of randomness are involved. Read more

impl<Ins, R> Mutate<R> for Mep<Ins> where
    Ins: Mutate<R>,
    R: Rng
[src]

[src]

Perform a unit mutation.

impl<'a, Ins, Param> Stateless<'a, &'a [Param], ResultIterator<'a, Ins, Param>> for Mep<Ins> where
    Param: Clone
[src]

[src]

Takes an input slice which must be exactly equal in length to self.inputs, or it will panic. Produces an iterator which must be entirely consumed or else it will panic on drop().