pub struct CoverageGroupBinding<S> {
pub group_name: &'static str,
pub target: ScalarVariableSlot<S>,
pub required_slot: fn(&S, usize) -> bool,
pub capacity_key: Option<fn(&S, usize, usize) -> Option<usize>>,
pub entity_order: Option<fn(&S, usize) -> i64>,
pub value_order: Option<fn(&S, usize, usize) -> i64>,
pub limits: CoverageGroupLimits,
}Fields§
§group_name: &'static str§target: ScalarVariableSlot<S>§required_slot: fn(&S, usize) -> bool§capacity_key: Option<fn(&S, usize, usize) -> Option<usize>>§entity_order: Option<fn(&S, usize) -> i64>§value_order: Option<fn(&S, usize, usize) -> i64>§limits: CoverageGroupLimitsImplementations§
Source§impl<S> CoverageGroupBinding<S>
impl<S> CoverageGroupBinding<S>
pub fn bind( group: CoverageGroup<S>, scalar_slots: &[ScalarVariableSlot<S>], ) -> Self
pub fn entity_count(&self, solution: &S) -> usize
pub fn current_value(&self, solution: &S, entity_index: usize) -> Option<usize>
pub fn is_required(&self, solution: &S, entity_index: usize) -> bool
pub fn capacity_key( &self, solution: &S, entity_index: usize, value: usize, ) -> Option<usize>
pub fn entity_order_key(&self, solution: &S, entity_index: usize) -> i64
pub fn value_order_key( &self, solution: &S, entity_index: usize, value: usize, ) -> i64
pub fn candidate_values( &self, solution: &S, entity_index: usize, value_candidate_limit: Option<usize>, ) -> Vec<usize>
pub fn value_is_legal( &self, solution: &S, entity_index: usize, value: Option<usize>, ) -> bool
pub fn edit(&self, entity_index: usize, value: Option<usize>) -> ScalarEdit<S>
Trait Implementations§
Source§impl<S> Clone for CoverageGroupBinding<S>
impl<S> Clone for CoverageGroupBinding<S>
Source§impl<S> Debug for CoverageGroupBinding<S>
impl<S> Debug for CoverageGroupBinding<S>
impl<S> Copy for CoverageGroupBinding<S>
Auto Trait Implementations§
impl<S> Freeze for CoverageGroupBinding<S>
impl<S> RefUnwindSafe for CoverageGroupBinding<S>
impl<S> Send for CoverageGroupBinding<S>
impl<S> Sync for CoverageGroupBinding<S>
impl<S> Unpin for CoverageGroupBinding<S>
impl<S> UnsafeUnpin for CoverageGroupBinding<S>
impl<S> UnwindSafe for CoverageGroupBinding<S>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more