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 name(&self) -> &str;
// Provided methods
fn is_hard(&self) -> bool { ... }
fn constraint_ref(&self) -> ConstraintRef { ... }
fn get_matches(&self, _solution: &S) -> Vec<DetailedConstraintMatch<Sc>> { ... }
fn weight(&self) -> Sc { ... }
}