pub struct IncrementalQuadConstraint<S, A, K, E, KE, F, W, Sc>where
Sc: Score,{ /* private fields */ }Implementations§
Source§impl<S, A, K, E, KE, F, W, Sc> IncrementalQuadConstraint<S, A, K, E, KE, F, W, Sc>
impl<S, A, K, E, KE, F, W, Sc> IncrementalQuadConstraint<S, A, K, E, KE, F, W, Sc>
pub fn new( constraint_ref: ConstraintRef, impact_type: ImpactType, extractor: E, key_extractor: KE, filter: F, weight: W, is_hard: bool, ) -> Self
Trait Implementations§
Source§impl<S, A, K, E, KE, F, W, Sc: Score> Debug for IncrementalQuadConstraint<S, A, K, E, KE, F, W, Sc>
impl<S, A, K, E, KE, F, W, Sc: Score> Debug for IncrementalQuadConstraint<S, A, K, E, KE, F, W, Sc>
Source§impl<S, A, K, E, KE, F, W, Sc> IncrementalConstraint<S, Sc> for IncrementalQuadConstraint<S, A, K, E, KE, F, W, Sc>where
S: Send + Sync + 'static,
A: Clone + Debug + Send + Sync + 'static,
K: Eq + Hash + Clone + Send + Sync,
E: Fn(&S) -> &[A] + Send + Sync,
KE: Fn(&S, &A, usize) -> K + Send + Sync,
F: Fn(&S, &A, &A, &A, &A) -> bool + Send + Sync,
W: Fn(&S, usize, usize, usize, usize) -> Sc + Send + Sync,
Sc: Score,
impl<S, A, K, E, KE, F, W, Sc> IncrementalConstraint<S, Sc> for IncrementalQuadConstraint<S, A, K, E, KE, F, W, Sc>where
S: Send + Sync + 'static,
A: Clone + Debug + Send + Sync + 'static,
K: Eq + Hash + Clone + Send + Sync,
E: Fn(&S) -> &[A] + Send + Sync,
KE: Fn(&S, &A, usize) -> K + Send + Sync,
F: Fn(&S, &A, &A, &A, &A) -> bool + Send + Sync,
W: Fn(&S, usize, usize, usize, usize) -> Sc + Send + Sync,
Sc: Score,
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
fn is_hard(&self) -> bool
fn constraint_ref(&self) -> ConstraintRef
fn get_matches(&self, solution: &S) -> Vec<DetailedConstraintMatch<Sc>>
fn weight(&self) -> Sc
Auto Trait Implementations§
impl<S, A, K, E, KE, F, W, Sc> Freeze for IncrementalQuadConstraint<S, A, K, E, KE, F, W, Sc>
impl<S, A, K, E, KE, F, W, Sc> RefUnwindSafe for IncrementalQuadConstraint<S, A, K, E, KE, F, W, Sc>
impl<S, A, K, E, KE, F, W, Sc> Send for IncrementalQuadConstraint<S, A, K, E, KE, F, W, Sc>
impl<S, A, K, E, KE, F, W, Sc> Sync for IncrementalQuadConstraint<S, A, K, E, KE, F, W, Sc>
impl<S, A, K, E, KE, F, W, Sc> Unpin for IncrementalQuadConstraint<S, A, K, E, KE, F, W, Sc>
impl<S, A, K, E, KE, F, W, Sc> UnsafeUnpin for IncrementalQuadConstraint<S, A, K, E, KE, F, W, Sc>
impl<S, A, K, E, KE, F, W, Sc> UnwindSafe for IncrementalQuadConstraint<S, A, K, E, KE, F, W, Sc>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more