Trait rosomaxa::evolution::strategies::EvolutionStrategy
source · pub trait EvolutionStrategy {
type Context: HeuristicContext<Objective = Self::Objective, Solution = Self::Solution>;
type Objective: HeuristicObjective<Solution = Self::Solution>;
type Solution: HeuristicSolution;
// Required method
fn run(
&mut self,
heuristic_ctx: Self::Context,
termination: Box<dyn Termination<Context = Self::Context, Objective = Self::Objective>>
) -> EvolutionResult<Self::Solution>;
}
Expand description
An evolution algorithm strategy.
Required Associated Types§
sourcetype Context: HeuristicContext<Objective = Self::Objective, Solution = Self::Solution>
type Context: HeuristicContext<Objective = Self::Objective, Solution = Self::Solution>
A heuristic context type.
sourcetype Objective: HeuristicObjective<Solution = Self::Solution>
type Objective: HeuristicObjective<Solution = Self::Solution>
A heuristic objective type.
sourcetype Solution: HeuristicSolution
type Solution: HeuristicSolution
A solution type.
Required Methods§
sourcefn run(
&mut self,
heuristic_ctx: Self::Context,
termination: Box<dyn Termination<Context = Self::Context, Objective = Self::Objective>>
) -> EvolutionResult<Self::Solution>
fn run( &mut self, heuristic_ctx: Self::Context, termination: Box<dyn Termination<Context = Self::Context, Objective = Self::Objective>> ) -> EvolutionResult<Self::Solution>
Runs evolution and returns a population with solution(-s).