Skip to main content

ComplementedConstraintStream

Struct ComplementedConstraintStream 

Source
pub struct ComplementedConstraintStream<S, A, B, K, EA, EB, KA, KB, C, D, Sc>
where Sc: Score,
{ /* private fields */ }

Implementations§

Source§

impl<S, A, B, K, EA, EB, KA, KB, C, D, Sc> ComplementedConstraintStream<S, A, B, K, EA, EB, KA, KB, C, D, Sc>
where S: Send + Sync + 'static, A: Clone + Send + Sync + 'static, B: Clone + Send + Sync + 'static, K: Clone + Eq + Hash + Send + Sync + 'static, EA: CollectionExtract<S, Item = A>, EB: CollectionExtract<S, Item = B>, KA: Fn(&A) -> Option<K> + Send + Sync, KB: Fn(&B) -> K + Send + Sync, C: UniCollector<A> + Send + Sync + 'static, C::Accumulator: Send + Sync, C::Result: Clone + Send + Sync, D: Fn(&B) -> C::Result + Send + Sync, Sc: Score + 'static,

Source

pub fn penalize_with<W>( self, weight_fn: W, ) -> ComplementedConstraintBuilder<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>
where W: Fn(&C::Result) -> Sc + Send + Sync,

Source

pub fn penalize_hard_with<W>( self, weight_fn: W, ) -> ComplementedConstraintBuilder<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>
where W: Fn(&C::Result) -> Sc + Send + Sync,

Source

pub fn reward_with<W>( self, weight_fn: W, ) -> ComplementedConstraintBuilder<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>
where W: Fn(&C::Result) -> Sc + Send + Sync,

Source

pub fn reward_hard_with<W>( self, weight_fn: W, ) -> ComplementedConstraintBuilder<S, A, B, K, EA, EB, KA, KB, C, D, W, Sc>
where W: Fn(&C::Result) -> Sc + Send + Sync,

Source

pub fn penalize_hard( self, ) -> ComplementedConstraintBuilder<S, A, B, K, EA, EB, KA, KB, C, D, impl Fn(&C::Result) -> Sc + Send + Sync, Sc>
where Sc: Copy,

Source

pub fn penalize_soft( self, ) -> ComplementedConstraintBuilder<S, A, B, K, EA, EB, KA, KB, C, D, impl Fn(&C::Result) -> Sc + Send + Sync, Sc>
where Sc: Copy,

Source

pub fn reward_hard( self, ) -> ComplementedConstraintBuilder<S, A, B, K, EA, EB, KA, KB, C, D, impl Fn(&C::Result) -> Sc + Send + Sync, Sc>
where Sc: Copy,

Source

pub fn reward_soft( self, ) -> ComplementedConstraintBuilder<S, A, B, K, EA, EB, KA, KB, C, D, impl Fn(&C::Result) -> Sc + Send + Sync, Sc>
where Sc: Copy,

Trait Implementations§

Source§

impl<S, A, B, K, EA, EB, KA, KB, C, D, Sc: Score> Debug for ComplementedConstraintStream<S, A, B, K, EA, EB, KA, KB, C, D, Sc>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<S, A, B, K, EA, EB, KA, KB, C, D, Sc> Freeze for ComplementedConstraintStream<S, A, B, K, EA, EB, KA, KB, C, D, Sc>
where EA: Freeze, EB: Freeze, KA: Freeze, KB: Freeze, C: Freeze, D: Freeze,

§

impl<S, A, B, K, EA, EB, KA, KB, C, D, Sc> RefUnwindSafe for ComplementedConstraintStream<S, A, B, K, EA, EB, KA, KB, C, D, Sc>

§

impl<S, A, B, K, EA, EB, KA, KB, C, D, Sc> Send for ComplementedConstraintStream<S, A, B, K, EA, EB, KA, KB, C, D, Sc>
where EA: Send, EB: Send, KA: Send, KB: Send, C: Send, D: Send,

§

impl<S, A, B, K, EA, EB, KA, KB, C, D, Sc> Sync for ComplementedConstraintStream<S, A, B, K, EA, EB, KA, KB, C, D, Sc>
where EA: Sync, EB: Sync, KA: Sync, KB: Sync, C: Sync, D: Sync,

§

impl<S, A, B, K, EA, EB, KA, KB, C, D, Sc> Unpin for ComplementedConstraintStream<S, A, B, K, EA, EB, KA, KB, C, D, Sc>
where EA: Unpin, EB: Unpin, KA: Unpin, KB: Unpin, C: Unpin, D: Unpin,

§

impl<S, A, B, K, EA, EB, KA, KB, C, D, Sc> UnsafeUnpin for ComplementedConstraintStream<S, A, B, K, EA, EB, KA, KB, C, D, Sc>

§

impl<S, A, B, K, EA, EB, KA, KB, C, D, Sc> UnwindSafe for ComplementedConstraintStream<S, A, B, K, EA, EB, KA, KB, C, D, Sc>

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.