pub trait Constraint<const N: usize, const NSYMS: usize> {
    fn run(&self, chromosone: &[Gene; N]) -> usize;
}
Expand description

Constraints are used to filter out nonviable chromosone’s. In other words, a candidate without a constraint violation will always beat a candidate with one. More specifically, the number of constraint violations is what is important. If all candidates have constraint violations, one of the candidates with the fewest violations will win a tournament.

Required Methods

Implementors