pub struct GroupedUniConstraint<S, A, K, E, KF, C, W, Sc>where
C: UniCollector<A>,
Sc: Score,{ /* private fields */ }Implementations§
Source§impl<S, A, K, E, KF, C, W, Sc> GroupedUniConstraint<S, A, K, E, KF, C, W, Sc>where
S: Send + Sync + 'static,
A: Clone + Send + Sync + 'static,
K: Clone + Eq + Hash + Send + Sync + 'static,
E: Fn(&S) -> &[A] + Send + Sync,
KF: Fn(&A) -> K + Send + Sync,
C: UniCollector<A> + Send + Sync + 'static,
C::Accumulator: Send + Sync,
C::Result: Send + Sync,
W: Fn(&C::Result) -> Sc + Send + Sync,
Sc: Score + 'static,
impl<S, A, K, E, KF, C, W, Sc> GroupedUniConstraint<S, A, K, E, KF, C, W, Sc>where
S: Send + Sync + 'static,
A: Clone + Send + Sync + 'static,
K: Clone + Eq + Hash + Send + Sync + 'static,
E: Fn(&S) -> &[A] + Send + Sync,
KF: Fn(&A) -> K + Send + Sync,
C: UniCollector<A> + Send + Sync + 'static,
C::Accumulator: Send + Sync,
C::Result: Send + Sync,
W: Fn(&C::Result) -> Sc + Send + Sync,
Sc: Score + 'static,
pub fn new( constraint_ref: ConstraintRef, impact_type: ImpactType, extractor: E, key_fn: KF, collector: C, weight_fn: W, is_hard: bool, ) -> Self
Trait Implementations§
Source§impl<S, A, K, E, KF, C, W, Sc> Debug for GroupedUniConstraint<S, A, K, E, KF, C, W, Sc>where
C: UniCollector<A>,
Sc: Score,
impl<S, A, K, E, KF, C, W, Sc> Debug for GroupedUniConstraint<S, A, K, E, KF, C, W, Sc>where
C: UniCollector<A>,
Sc: Score,
Source§impl<S, A, K, E, KF, C, W, Sc> IncrementalConstraint<S, Sc> for GroupedUniConstraint<S, A, K, E, KF, C, W, Sc>where
S: Send + Sync + 'static,
A: Clone + Send + Sync + 'static,
K: Clone + Eq + Hash + Send + Sync + 'static,
E: Fn(&S) -> &[A] + Send + Sync,
KF: Fn(&A) -> K + Send + Sync,
C: UniCollector<A> + Send + Sync + 'static,
C::Accumulator: Send + Sync,
C::Result: Send + Sync,
C::Value: Send + Sync,
W: Fn(&C::Result) -> Sc + Send + Sync,
Sc: Score + 'static,
impl<S, A, K, E, KF, C, W, Sc> IncrementalConstraint<S, Sc> for GroupedUniConstraint<S, A, K, E, KF, C, W, Sc>where
S: Send + Sync + 'static,
A: Clone + Send + Sync + 'static,
K: Clone + Eq + Hash + Send + Sync + 'static,
E: Fn(&S) -> &[A] + Send + Sync,
KF: Fn(&A) -> K + Send + Sync,
C: UniCollector<A> + Send + Sync + 'static,
C::Accumulator: Send + Sync,
C::Result: Send + Sync,
C::Value: Send + Sync,
W: Fn(&C::Result) -> Sc + Send + Sync,
Sc: Score + 'static,
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, KF, C, W, Sc> Freeze for GroupedUniConstraint<S, A, K, E, KF, C, W, Sc>
impl<S, A, K, E, KF, C, W, Sc> RefUnwindSafe for GroupedUniConstraint<S, A, K, E, KF, C, W, Sc>where
E: RefUnwindSafe,
KF: RefUnwindSafe,
C: RefUnwindSafe,
W: RefUnwindSafe,
K: RefUnwindSafe,
<C as UniCollector<A>>::Accumulator: RefUnwindSafe,
<C as UniCollector<A>>::Value: RefUnwindSafe,
impl<S, A, K, E, KF, C, W, Sc> Send for GroupedUniConstraint<S, A, K, E, KF, C, W, Sc>
impl<S, A, K, E, KF, C, W, Sc> Sync for GroupedUniConstraint<S, A, K, E, KF, C, W, Sc>
impl<S, A, K, E, KF, C, W, Sc> Unpin for GroupedUniConstraint<S, A, K, E, KF, C, W, Sc>where
E: Unpin,
KF: Unpin,
C: Unpin,
W: Unpin,
K: Unpin,
<C as UniCollector<A>>::Accumulator: Unpin,
<C as UniCollector<A>>::Value: Unpin,
impl<S, A, K, E, KF, C, W, Sc> UnsafeUnpin for GroupedUniConstraint<S, A, K, E, KF, C, W, Sc>
impl<S, A, K, E, KF, C, W, Sc> UnwindSafe for GroupedUniConstraint<S, A, K, E, KF, C, W, Sc>where
E: UnwindSafe,
KF: UnwindSafe,
C: 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