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(&self, _solution: &S) -> Vec<DetailedConstraintMatch<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>
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>
impl<S, A, K, E, F, KF, Sc> UnwindSafe for BalanceConstraint<S, A, K, E, F, KF, 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