pub struct GeneticExecution<T, Ind: Genotype<T>> { /* private fields */ }
Expand description

Struct that defines a genetic algorithm execution.

Implementations§

Creates a new default genetic algorithm execution.

Sets the population size.

Sets the initial population individuals. If lower individuals than population_size are received, the rest of population will be generated randomly.

Sets the genotype size.

Sets the mutation rate.

Sets the number of tournament stages whose individuals are selected for crossover.

Sets the selection function of the genetic algorithm.

Sets the age function of the genetic algorithm.

Sets the crossover function of the genetic algorithm.

Sets the survival pressure function of the genetic algorithm.

Sets the stop criterion of the genetic algorithm.

Sets the cache fitness flag.

Sets the progress log.

Sets the progress log.

Run the genetic algorithm executiion until the stop_criterion is satisfied.

Returns
  • A vector with the individuals of the population that are solution of the problem.
  • The number of generations run.
  • The average progress in the last generations.
  • The entire population in the last generation (useful for resuming the execution).

Trait Implementations§

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.