Trait genevo::algorithm::Algorithm
[−]
[src]
pub trait Algorithm {
type Output: Clone + Debug + PartialEq;
type Error: Clone + Debug + PartialEq;
fn next(
&mut self,
iteration: u64,
rng: &mut Prng
) -> Result<Self::Output, Self::Error>;
fn reset(&mut self) -> Result<bool, Self::Error>;
}An Algorithm defines the steps to be processed in a
simulation::Simulation. The Simulation uses an implementation of an
Algorithm to perform one iteration of the evaluation stage.
Associated Types
Required Methods
fn next(
&mut self,
iteration: u64,
rng: &mut Prng
) -> Result<Self::Output, Self::Error>
&mut self,
iteration: u64,
rng: &mut Prng
) -> Result<Self::Output, Self::Error>
fn reset(&mut self) -> Result<bool, Self::Error>
Implementors
impl<G, F, E, S, C, M, R> Algorithm for GeneticAlgorithm<G, F, E, S, C, M, R> where
G: Genotype,
F: Fitness + Send + Sync,
E: FitnessFunction<G, F> + Sync,
S: SelectionOp<G, F>,
C: CrossoverOp<G> + Sync,
M: MutationOp<G> + Sync,
R: ReinsertionOp<G, F>, type Output = State<G, F>; type Error = GeneticAlgorithmError;