pub struct OperatorTerminal<S, O, W, Sc> { /* private fields */ }Expand description
Scoring terminal over a concrete operator tree, independent of row arity. Weight closures borrow the complete row; retention stores signed scores, never entities or solution references.
Implementations§
Source§impl<S, O, W, Sc> OperatorTerminal<S, O, W, Sc>
impl<S, O, W, Sc> OperatorTerminal<S, O, W, Sc>
pub fn new( constraint_ref: ConstraintRef, impact: ImpactType, operator: O, weight: W, hard: bool, ) -> Self
Trait Implementations§
Source§impl<S, O, W, Sc> IncrementalConstraint<S, Sc> for OperatorTerminal<S, O, W, Sc>
impl<S, O, W, Sc> IncrementalConstraint<S, Sc> for OperatorTerminal<S, O, W, Sc>
fn evaluate(&self, solution: &S) -> Sc
fn match_count(&self, solution: &S) -> usize
fn initialize(&mut self, solution: &S) -> Sc
fn on_retract(&mut self, solution: &S, index: usize, descriptor: usize) -> Sc
fn on_insert(&mut self, solution: &S, index: usize, descriptor: usize) -> Sc
fn reset(&mut self)
fn name(&self) -> &str
fn constraint_ref(&self) -> &ConstraintRef
fn is_hard(&self) -> bool
fn get_matches<'a>( &'a self, solution: &S, ) -> Vec<DetailedConstraintMatch<'a, Sc>>
fn weight(&self) -> Sc
Auto Trait Implementations§
impl<S, O, W, Sc> Freeze for OperatorTerminal<S, O, W, Sc>
impl<S, O, W, Sc> RefUnwindSafe for OperatorTerminal<S, O, W, Sc>where
O: RefUnwindSafe,
W: RefUnwindSafe,
HandleMap<Sc>: RefUnwindSafe,
PhantomData<fn() -> S>: RefUnwindSafe,
impl<S, O, W, Sc> Send for OperatorTerminal<S, O, W, Sc>
impl<S, O, W, Sc> Sync for OperatorTerminal<S, O, W, Sc>
impl<S, O, W, Sc> Unpin for OperatorTerminal<S, O, W, Sc>
impl<S, O, W, Sc> UnsafeUnpin for OperatorTerminal<S, O, W, Sc>where
O: UnsafeUnpin,
W: UnsafeUnpin,
HandleMap<Sc>: UnsafeUnpin,
PhantomData<fn() -> S>: UnsafeUnpin,
impl<S, O, W, Sc> UnwindSafe for OperatorTerminal<S, O, W, 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