Trait IncrementalConstraint
Source pub trait IncrementalConstraint<S, Sc>: Send + Sync{
// Required methods
fn evaluate(&self, solution: &S) -> Sc;
fn match_count(&self, solution: &S) -> usize;
fn initialize(&mut self, solution: &S) -> Sc;
fn on_insert(
&mut self,
solution: &S,
entity_index: usize,
descriptor_index: usize,
) -> Sc;
fn on_retract(
&mut self,
solution: &S,
entity_index: usize,
descriptor_index: usize,
) -> Sc;
fn reset(&mut self);
fn constraint_ref(&self) -> &ConstraintRef;
// Provided methods
fn name(&self) -> &str { ... }
fn is_hard(&self) -> bool { ... }
fn get_matches<'a>(
&'a self,
_solution: &S,
) -> Vec<DetailedConstraintMatch<'a, Sc>> { ... }
fn weight(&self) -> Sc { ... }
}