[−][src]Struct ddo::core::utils::Func
A zero-cost abstraction adapter for function pointers. This is typically useful to pass a pointer to function/closure as an heuristic to use in the solver/mdd configuration.
Note that, it implements different heuristics trait depending on the signature of the wrapped function F.
Trait Implementations
impl<F: Clone> Clone for Func<F>
[src]
impl<T, F> Compare<Node<T>, Node<T>> for Func<F> where
F: Clone + Fn(&Node<T>, &Node<T>) -> Ordering,
[src]
F: Clone + Fn(&Node<T>, &Node<T>) -> Ordering,
If the function is a node comparator, then Func
will auto implement the
Compare
trait for that function.
fn compare(&self, a: &Node<T>, b: &Node<T>) -> Ordering
[src]
fn compares_lt(&self, l: &L, r: &R) -> bool
[src]
fn compares_le(&self, l: &L, r: &R) -> bool
[src]
fn compares_ge(&self, l: &L, r: &R) -> bool
[src]
fn compares_gt(&self, l: &L, r: &R) -> bool
[src]
fn compares_eq(&self, l: &L, r: &R) -> bool
[src]
fn compares_ne(&self, l: &L, r: &R) -> bool
[src]
fn borrowing(self) -> Borrowing<Self, L, R>
[src]
fn rev(self) -> Rev<Self>
[src]
fn swap(self) -> Swap<Self>
[src]
fn then<D>(self, then: D) -> Then<Self, D> where
D: Compare<L, R>,
[src]
D: Compare<L, R>,
impl<T, F> LoadVars<T> for Func<F> where
F: Fn(&Node<T>) -> VarSet,
[src]
F: Fn(&Node<T>) -> VarSet,
If Func
will auto implement the LoadVars
trait for that function.
impl<T, F> VariableHeuristic<T> for Func<F> where
F: Fn(&VarSet, Layer<T>, Layer<T>) -> Option<Variable>,
[src]
F: Fn(&VarSet, Layer<T>, Layer<T>) -> Option<Variable>,
Whenever the parameter function Func
is a function/closure that
possibly returns a variable based on a set of free variables and two layers
(current and next), then Func
will auto implement the VariableHeuristic
trait for that function.
impl<F> WidthHeuristic for Func<F> where
F: Fn(&VarSet) -> usize,
[src]
F: Fn(&VarSet) -> usize,
If the function Func
will auto implement WidthHeuristic
for that function.
Auto Trait Implementations
impl<F> RefUnwindSafe for Func<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<F> Send for Func<F> where
F: Send,
F: Send,
impl<F> Sync for Func<F> where
F: Sync,
F: Sync,
impl<F> Unpin for Func<F> where
F: Unpin,
F: Unpin,
impl<F> UnwindSafe for Func<F> where
F: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<F, L, R> Compare<L, R> for F where
F: Fn(&L, &R) -> Ordering + ?Sized,
L: ?Sized,
R: ?Sized,
[src]
F: Fn(&L, &R) -> Ordering + ?Sized,
L: ?Sized,
R: ?Sized,
fn compare(&self, l: &L, r: &R) -> Ordering
[src]
fn compares_lt(&self, l: &L, r: &R) -> bool
[src]
fn compares_le(&self, l: &L, r: &R) -> bool
[src]
fn compares_ge(&self, l: &L, r: &R) -> bool
[src]
fn compares_gt(&self, l: &L, r: &R) -> bool
[src]
fn compares_eq(&self, l: &L, r: &R) -> bool
[src]
fn compares_ne(&self, l: &L, r: &R) -> bool
[src]
fn borrowing(self) -> Borrowing<Self, L, R>
[src]
fn rev(self) -> Rev<Self>
[src]
fn swap(self) -> Swap<Self>
[src]
fn then<D>(self, then: D) -> Then<Self, D> where
D: Compare<L, R>,
[src]
D: Compare<L, R>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,