mod noop;
mod simple;
mod duration;
pub use noop::NoopReporter;
pub use simple::SimpleReporter;
pub use duration::DurationReporter;
use crate::ga::TerminationCause;
use crate::stats::GenerationStats;
use crate::traits::ChromosomeT;
#[deprecated(
since = "2.2.0",
note = "use GaObserver<U> instead. Reporter will be removed in v3.0.0."
)]
pub trait Reporter<U: ChromosomeT>: Send {
fn on_start(&mut self) {}
fn on_generation_complete(&mut self, _stats: &GenerationStats) {}
fn on_new_best(&mut self, _generation: usize, _best: U) {}
fn on_finish(&mut self, _cause: TerminationCause, _all_stats: &[GenerationStats]) {}
}