Skip to main content

PentaConstraintStream

Struct PentaConstraintStream 

Source
pub struct PentaConstraintStream<S, A, K, E, KE, F, Sc>
where Sc: Score,
{ /* private fields */ }

Implementations§

Source§

impl<S, A, K, E, KE, Sc> PentaConstraintStream<S, A, K, E, KE, TrueFilter, Sc>
where S: Send + Sync + 'static, A: Clone + Hash + PartialEq + Send + Sync + 'static, K: Eq + Hash + Clone + Send + Sync, E: Fn(&S) -> &[A] + Send + Sync, KE: KeyExtract<S, A, K>, Sc: Score + 'static,

Source

pub fn new_self_join(extractor: E, key_extractor: KE) -> Self

Source§

impl<S, A, K, E, KE, F, Sc> PentaConstraintStream<S, A, K, E, KE, F, Sc>
where S: Send + Sync + 'static, A: Clone + Hash + PartialEq + Send + Sync + 'static, K: Eq + Hash + Clone + Send + Sync, E: Fn(&S) -> &[A] + Send + Sync, KE: KeyExtract<S, A, K>, F: PentaFilter<S, A, A, A, A, A>, Sc: Score + 'static,

Source

pub fn new_self_join_with_filter( extractor: E, key_extractor: KE, filter: F, ) -> Self

Source

pub fn filter<P>( self, predicate: P, ) -> PentaConstraintStream<S, A, K, E, KE, AndPentaFilter<F, FnPentaFilter<impl Fn(&S, &A, &A, &A, &A, &A) -> bool + Send + Sync>>, Sc>
where P: Fn(&A, &A, &A, &A, &A) -> bool + Send + Sync + 'static,

Source

pub fn penalize( self, weight: Sc, ) -> PentaConstraintBuilder<S, A, K, E, KE, F, impl Fn(&A, &A, &A, &A, &A) -> Sc + Send + Sync, Sc>
where Sc: Copy,

Source

pub fn penalize_with<W>( self, weight_fn: W, ) -> PentaConstraintBuilder<S, A, K, E, KE, F, W, Sc>
where W: Fn(&A, &A, &A, &A, &A) -> Sc + Send + Sync,

Source

pub fn penalize_hard_with<W>( self, weight_fn: W, ) -> PentaConstraintBuilder<S, A, K, E, KE, F, W, Sc>
where W: Fn(&A, &A, &A, &A, &A) -> Sc + Send + Sync,

Source

pub fn reward( self, weight: Sc, ) -> PentaConstraintBuilder<S, A, K, E, KE, F, impl Fn(&A, &A, &A, &A, &A) -> Sc + Send + Sync, Sc>
where Sc: Copy,

Source

pub fn reward_with<W>( self, weight_fn: W, ) -> PentaConstraintBuilder<S, A, K, E, KE, F, W, Sc>
where W: Fn(&A, &A, &A, &A, &A) -> Sc + Send + Sync,

Source

pub fn reward_hard_with<W>( self, weight_fn: W, ) -> PentaConstraintBuilder<S, A, K, E, KE, F, W, Sc>
where W: Fn(&A, &A, &A, &A, &A) -> Sc + Send + Sync,

Source

pub fn penalize_hard( self, ) -> PentaConstraintBuilder<S, A, K, E, KE, F, impl Fn(&A, &A, &A, &A, &A) -> Sc + Send + Sync, Sc>
where Sc: Copy,

Source

pub fn penalize_soft( self, ) -> PentaConstraintBuilder<S, A, K, E, KE, F, impl Fn(&A, &A, &A, &A, &A) -> Sc + Send + Sync, Sc>
where Sc: Copy,

Source

pub fn reward_hard( self, ) -> PentaConstraintBuilder<S, A, K, E, KE, F, impl Fn(&A, &A, &A, &A, &A) -> Sc + Send + Sync, Sc>
where Sc: Copy,

Source

pub fn reward_soft( self, ) -> PentaConstraintBuilder<S, A, K, E, KE, F, impl Fn(&A, &A, &A, &A, &A) -> Sc + Send + Sync, Sc>
where Sc: Copy,

Trait Implementations§

Source§

impl<S, A, K, E, KE, F, Sc: Score> Debug for PentaConstraintStream<S, A, K, E, KE, F, Sc>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<S, A, K, E, KE, F, Sc> Freeze for PentaConstraintStream<S, A, K, E, KE, F, Sc>
where E: Freeze, KE: Freeze, F: Freeze,

§

impl<S, A, K, E, KE, F, Sc> RefUnwindSafe for PentaConstraintStream<S, A, K, E, KE, F, Sc>

§

impl<S, A, K, E, KE, F, Sc> Send for PentaConstraintStream<S, A, K, E, KE, F, Sc>
where E: Send, KE: Send, F: Send,

§

impl<S, A, K, E, KE, F, Sc> Sync for PentaConstraintStream<S, A, K, E, KE, F, Sc>
where E: Sync, KE: Sync, F: Sync,

§

impl<S, A, K, E, KE, F, Sc> Unpin for PentaConstraintStream<S, A, K, E, KE, F, Sc>
where E: Unpin, KE: Unpin, F: Unpin,

§

impl<S, A, K, E, KE, F, Sc> UnsafeUnpin for PentaConstraintStream<S, A, K, E, KE, F, Sc>

§

impl<S, A, K, E, KE, F, Sc> UnwindSafe for PentaConstraintStream<S, A, K, E, KE, F, Sc>
where E: UnwindSafe, KE: UnwindSafe, F: 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<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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.