pub struct ComplementedGroupConstraint<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>where
C: UniCollector<A>,
Sc: Score,{ /* private fields */ }Implementations§
Source§impl<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc> ComplementedGroupConstraint<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>
impl<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc> ComplementedGroupConstraint<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>
pub fn new( constraint_ref: ConstraintRef, impact_type: ImpactType, extractor_a: EA, extractor_b: EB, key_a: KA, key_b: KB, collector: C, default_fn: D, weight_fn: W, is_hard: bool, ) -> Self
Trait Implementations§
Source§impl<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc> Debug for ComplementedGroupConstraint<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>where
C: UniCollector<A>,
Sc: Score,
impl<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc> Debug for ComplementedGroupConstraint<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>where
C: UniCollector<A>,
Sc: Score,
Source§impl<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc> IncrementalConstraint<S, Sc> for ComplementedGroupConstraint<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>where
S: Send + Sync + 'static,
A: Clone + Send + Sync + 'static,
B: Clone + Send + Sync + 'static,
K: Clone + Eq + Hash + Send + Sync,
EA: Fn(&S) -> &[A] + Send + Sync,
EB: Fn(&S) -> &[B] + Send + Sync,
KA: Fn(&A) -> Option<K> + Send + Sync,
KB: Fn(&B) -> K + Send + Sync,
C: UniCollector<A> + Send + Sync,
C::Accumulator: Send + Sync,
C::Result: Clone + Send + Sync,
C::Value: Send + Sync,
D: Fn(&B) -> C::Result + Send + Sync,
W: Fn(&C::Result) -> Sc + Send + Sync,
Sc: Score,
impl<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc> IncrementalConstraint<S, Sc> for ComplementedGroupConstraint<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>where
S: Send + Sync + 'static,
A: Clone + Send + Sync + 'static,
B: Clone + Send + Sync + 'static,
K: Clone + Eq + Hash + Send + Sync,
EA: Fn(&S) -> &[A] + Send + Sync,
EB: Fn(&S) -> &[B] + Send + Sync,
KA: Fn(&A) -> Option<K> + Send + Sync,
KB: Fn(&B) -> K + Send + Sync,
C: UniCollector<A> + Send + Sync,
C::Accumulator: Send + Sync,
C::Result: Clone + Send + Sync,
C::Value: Send + Sync,
D: Fn(&B) -> C::Result + Send + Sync,
W: Fn(&C::Result) -> 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, B, K, EA, EB, KA, KB, C, D, W, Sc> Freeze for ComplementedGroupConstraint<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>
impl<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc> RefUnwindSafe for ComplementedGroupConstraint<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>where
EA: RefUnwindSafe,
EB: RefUnwindSafe,
KA: RefUnwindSafe,
KB: RefUnwindSafe,
C: RefUnwindSafe,
D: RefUnwindSafe,
W: RefUnwindSafe,
K: RefUnwindSafe,
<C as UniCollector<A>>::Accumulator: RefUnwindSafe,
<C as UniCollector<A>>::Value: RefUnwindSafe,
impl<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc> Send for ComplementedGroupConstraint<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>
impl<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc> Sync for ComplementedGroupConstraint<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>
impl<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc> Unpin for ComplementedGroupConstraint<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>where
EA: Unpin,
EB: Unpin,
KA: Unpin,
KB: Unpin,
C: Unpin,
D: Unpin,
W: Unpin,
K: Unpin,
<C as UniCollector<A>>::Accumulator: Unpin,
<C as UniCollector<A>>::Value: Unpin,
impl<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc> UnsafeUnpin for ComplementedGroupConstraint<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>where
EA: UnsafeUnpin,
EB: UnsafeUnpin,
KA: UnsafeUnpin,
KB: UnsafeUnpin,
C: UnsafeUnpin,
D: UnsafeUnpin,
W: UnsafeUnpin,
impl<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc> UnwindSafe for ComplementedGroupConstraint<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>where
EA: UnwindSafe,
EB: UnwindSafe,
KA: UnwindSafe,
KB: UnwindSafe,
C: UnwindSafe,
D: UnwindSafe,
W: UnwindSafe,
K: UnwindSafe,
<C as UniCollector<A>>::Accumulator: UnwindSafe,
<C as UniCollector<A>>::Value: UnwindSafe,
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