pub struct BalanceConstraint<S, A, K, E, F, KF, Sc>where
Sc: Score,{ /* private fields */ }Implementations§
Source§impl<S, A, K, E, F, KF, Sc> BalanceConstraint<S, A, K, E, F, KF, Sc>
impl<S, A, K, E, F, KF, Sc> BalanceConstraint<S, A, K, E, F, KF, Sc>
pub fn new( constraint_ref: ConstraintRef, impact_type: ImpactType, extractor: E, filter: F, key_fn: KF, base_score: Sc, is_hard: bool, ) -> Self
Trait Implementations§
Source§impl<S, A, K, E, F, KF, Sc> Debug for BalanceConstraint<S, A, K, E, F, KF, Sc>where
Sc: Score,
impl<S, A, K, E, F, KF, Sc> Debug for BalanceConstraint<S, A, K, E, F, KF, Sc>where
Sc: Score,
Source§impl<S, A, K, E, F, KF, Sc> IncrementalConstraint<S, Sc> for BalanceConstraint<S, A, K, E, F, KF, Sc>
impl<S, A, K, E, F, KF, Sc> IncrementalConstraint<S, Sc> for BalanceConstraint<S, A, K, E, F, KF, Sc>
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<'a>( &'a self, _solution: &S, ) -> Vec<DetailedConstraintMatch<'a, Sc>>
fn weight(&self) -> Sc
Auto Trait Implementations§
impl<S, A, K, E, F, KF, Sc> Freeze for BalanceConstraint<S, A, K, E, F, KF, Sc>
impl<S, A, K, E, F, KF, Sc> RefUnwindSafe for BalanceConstraint<S, A, K, E, F, KF, Sc>where
E: RefUnwindSafe,
F: RefUnwindSafe,
KF: RefUnwindSafe,
Sc: RefUnwindSafe,
HashMap<K, i64>: RefUnwindSafe,
HashMap<usize, K>: RefUnwindSafe,
PhantomData<(fn() -> S, fn() -> A)>: RefUnwindSafe,
impl<S, A, K, E, F, KF, Sc> Send for BalanceConstraint<S, A, K, E, F, KF, Sc>
impl<S, A, K, E, F, KF, Sc> Sync for BalanceConstraint<S, A, K, E, F, KF, Sc>
impl<S, A, K, E, F, KF, Sc> Unpin for BalanceConstraint<S, A, K, E, F, KF, Sc>
impl<S, A, K, E, F, KF, Sc> UnsafeUnpin for BalanceConstraint<S, A, K, E, F, KF, Sc>where
E: UnsafeUnpin,
F: UnsafeUnpin,
KF: UnsafeUnpin,
Sc: UnsafeUnpin,
HashMap<K, i64>: UnsafeUnpin,
HashMap<usize, K>: UnsafeUnpin,
PhantomData<(fn() -> S, fn() -> A)>: UnsafeUnpin,
impl<S, A, K, E, F, KF, Sc> UnwindSafe for BalanceConstraint<S, A, K, E, F, KF, Sc>where
E: UnwindSafe,
F: UnwindSafe,
KF: UnwindSafe,
Sc: UnwindSafe,
HashMap<K, i64>: UnwindSafe,
HashMap<usize, K>: UnwindSafe,
PhantomData<(fn() -> S, fn() -> A)>: 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