Skip to main content

DirectedBi

Struct DirectedBi 

Source
pub struct DirectedBi<S, Out, K, Src, F, KL, KR, PF, Sc>
where Sc: Score,
{ /* private fields */ }

Implementations§

Source§

impl<S, Out, K, Src, F, KL, KR, PF, Sc> DirectedBi<S, Out, K, Src, F, KL, KR, PF, Sc>
where S: Send + Sync + 'static, Out: Send + Sync + 'static, K: Eq + Hash + Send + Sync + 'static, Src: Source<S, Out>, F: UniFilter<S, Out>, KL: Fn(&Out) -> K + Send + Sync, KR: Fn(&Out) -> K + Send + Sync, PF: BiFilter<S, Out, Out>, Sc: Score + 'static,

Source

pub fn filter<P>( self, predicate: P, ) -> DirectedBi<S, Out, K, Src, F, KL, KR, AndBiFilter<PF, FnBiFilter<impl Fn(&S, &Out, &Out, usize, usize) -> bool + Send + Sync>>, Sc>
where P: Fn(&Out, &Out) -> bool + Send + Sync + 'static,

Source

pub fn penalize<W>( self, weight: W, ) -> DirectedBiBuilder<S, Out, K, Src, F, KL, KR, PF, impl Fn(&Out, &Out) -> Sc + Send + Sync, Sc>
where W: for<'w> ConstraintWeight<(&'w Out, &'w Out), Sc> + Send + Sync,

Source

pub fn reward<W>( self, weight: W, ) -> DirectedBiBuilder<S, Out, K, Src, F, KL, KR, PF, impl Fn(&Out, &Out) -> Sc + Send + Sync, Sc>
where W: for<'w> ConstraintWeight<(&'w Out, &'w Out), Sc> + Send + Sync,

Auto Trait Implementations§

§

impl<S, Out, K, Src, F, KL, KR, PF, Sc> Freeze for DirectedBi<S, Out, K, Src, F, KL, KR, PF, Sc>
where Src: Freeze, F: Freeze, KL: Freeze, KR: Freeze, PF: Freeze, PhantomData<(fn() -> S, fn() -> Out, fn() -> K, fn() -> Sc)>: Freeze,

§

impl<S, Out, K, Src, F, KL, KR, PF, Sc> RefUnwindSafe for DirectedBi<S, Out, K, Src, F, KL, KR, PF, Sc>
where Src: RefUnwindSafe, F: RefUnwindSafe, KL: RefUnwindSafe, KR: RefUnwindSafe, PF: RefUnwindSafe, PhantomData<(fn() -> S, fn() -> Out, fn() -> K, fn() -> Sc)>: RefUnwindSafe,

§

impl<S, Out, K, Src, F, KL, KR, PF, Sc> Send for DirectedBi<S, Out, K, Src, F, KL, KR, PF, Sc>
where Src: Send, F: Send, KL: Send, KR: Send, PF: Send, PhantomData<(fn() -> S, fn() -> Out, fn() -> K, fn() -> Sc)>: Send,

§

impl<S, Out, K, Src, F, KL, KR, PF, Sc> Sync for DirectedBi<S, Out, K, Src, F, KL, KR, PF, Sc>
where Src: Sync, F: Sync, KL: Sync, KR: Sync, PF: Sync, PhantomData<(fn() -> S, fn() -> Out, fn() -> K, fn() -> Sc)>: Sync,

§

impl<S, Out, K, Src, F, KL, KR, PF, Sc> Unpin for DirectedBi<S, Out, K, Src, F, KL, KR, PF, Sc>
where Src: Unpin, F: Unpin, KL: Unpin, KR: Unpin, PF: Unpin, PhantomData<(fn() -> S, fn() -> Out, fn() -> K, fn() -> Sc)>: Unpin,

§

impl<S, Out, K, Src, F, KL, KR, PF, Sc> UnsafeUnpin for DirectedBi<S, Out, K, Src, F, KL, KR, PF, Sc>
where Src: UnsafeUnpin, F: UnsafeUnpin, KL: UnsafeUnpin, KR: UnsafeUnpin, PF: UnsafeUnpin, PhantomData<(fn() -> S, fn() -> Out, fn() -> K, fn() -> Sc)>: UnsafeUnpin,

§

impl<S, Out, K, Src, F, KL, KR, PF, Sc> UnwindSafe for DirectedBi<S, Out, K, Src, F, KL, KR, PF, Sc>
where Src: UnwindSafe, F: UnwindSafe, KL: UnwindSafe, KR: UnwindSafe, PF: UnwindSafe, PhantomData<(fn() -> S, fn() -> Out, fn() -> K, fn() -> 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<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.