pub trait Algorithm {
type Output: Clone + Debug + PartialEq;
type Error: 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>;
}
Expand description
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.