Skip to main content

SharedOperatorTerminal

Struct SharedOperatorTerminal 

Source
pub struct SharedOperatorTerminal<S, O, A, Scorers, Sc> { /* private fields */ }

Implementations§

Source§

impl<S, O, A, Scorers, Sc> SharedOperatorTerminal<S, O, A, Scorers, Sc>
where S: Send + Sync + 'static, O: Operator<S> + Send + Sync, Sc: Score,

Source

pub fn penalize<W>( self, weight: W, ) -> SharedOperatorBuilder<S, O, A, Scorers, W, Sc>

Source

pub fn reward<W>( self, weight: W, ) -> SharedOperatorBuilder<S, O, A, Scorers, W, Sc>

Source

pub fn evaluate(&self, solution: &S) -> Sc
where Scorers: OperatorScorerSet<S, O, Sc>,

Source

pub fn initialize(&mut self, solution: &S) -> Sc
where Scorers: OperatorScorerSet<S, O, Sc>,

Source

pub fn on_retract( &mut self, solution: &S, index: usize, descriptor: usize, ) -> Sc
where Scorers: OperatorScorerSet<S, O, Sc>,

Source

pub fn on_insert(&mut self, solution: &S, index: usize, descriptor: usize) -> Sc
where Scorers: OperatorScorerSet<S, O, Sc>,

Source

pub fn update_count(&self) -> usize

Source

pub fn changed_key_count(&self) -> usize

Auto Trait Implementations§

§

impl<S, O, A, Scorers, Sc> Freeze for SharedOperatorTerminal<S, O, A, Scorers, Sc>
where O: Freeze, A: Freeze, Scorers: Freeze, Option<fn(&O, &S, RowHandle, &mut Vec<EntityRef>)>: Freeze, PhantomData<fn() -> (S, Sc)>: Freeze,

§

impl<S, O, A, Scorers, Sc> RefUnwindSafe for SharedOperatorTerminal<S, O, A, Scorers, Sc>

§

impl<S, O, A, Scorers, Sc> Send for SharedOperatorTerminal<S, O, A, Scorers, Sc>
where O: Send, A: Send, Scorers: Send, Option<fn(&O, &S, RowHandle, &mut Vec<EntityRef>)>: Send, PhantomData<fn() -> (S, Sc)>: Send,

§

impl<S, O, A, Scorers, Sc> Sync for SharedOperatorTerminal<S, O, A, Scorers, Sc>
where O: Sync, A: Sync, Scorers: Sync, Option<fn(&O, &S, RowHandle, &mut Vec<EntityRef>)>: Sync, PhantomData<fn() -> (S, Sc)>: Sync,

§

impl<S, O, A, Scorers, Sc> Unpin for SharedOperatorTerminal<S, O, A, Scorers, Sc>
where O: Unpin, A: Unpin, Scorers: Unpin, Option<fn(&O, &S, RowHandle, &mut Vec<EntityRef>)>: Unpin, PhantomData<fn() -> (S, Sc)>: Unpin,

§

impl<S, O, A, Scorers, Sc> UnsafeUnpin for SharedOperatorTerminal<S, O, A, Scorers, Sc>
where O: UnsafeUnpin, A: UnsafeUnpin, Scorers: UnsafeUnpin, Option<fn(&O, &S, RowHandle, &mut Vec<EntityRef>)>: UnsafeUnpin, PhantomData<fn() -> (S, Sc)>: UnsafeUnpin,

§

impl<S, O, A, Scorers, Sc> UnwindSafe for SharedOperatorTerminal<S, O, A, Scorers, Sc>
where O: UnwindSafe, A: UnwindSafe, Scorers: UnwindSafe, Option<fn(&O, &S, RowHandle, &mut Vec<EntityRef>)>: UnwindSafe, PhantomData<fn() -> (S, Sc)>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<S, Sc, C> ConstraintSet<S, Sc> for C
where S: Send + Sync, Sc: Score, C: IncrementalConstraint<S, Sc>,

Source§

fn evaluate_all(&self, solution: &S) -> Sc

Source§

fn constraint_count(&self) -> usize

Source§

fn constraint_metadata_entries(&self) -> Vec<ConstraintMetadata<'_>>

Source§

fn evaluate_each<'a>(&'a self, solution: &S) -> Vec<ConstraintResult<'a, Sc>>

Source§

fn evaluate_detailed<'a>( &'a self, solution: &S, ) -> Vec<ConstraintAnalysis<'a, Sc>>

Source§

fn initialize_all(&mut self, solution: &S) -> Sc

Source§

fn on_insert_all( &mut self, solution: &S, entity_index: usize, descriptor_index: usize, ) -> Sc

Source§

fn on_retract_all( &mut self, solution: &S, entity_index: usize, descriptor_index: usize, ) -> Sc

Source§

fn reset_all(&mut self)

Source§

fn constraint_metadata(&self) -> Vec<ConstraintMetadata<'_>>

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.