[−][src]Struct ddo::core::implementation::mdd::builder::PbRef
This structure provides typesafewrapper to turn a reference (a borrow) to
some problem into something that actually implements the Problem
trait.
Such a pbref may be created directly with a call to new But these instances
are typically built using a call to mdd_builder_ref
.
Example
let problem = MockProblem; let relax = MockRelax; // This call creates an mdd configured with a configuration object that // holds a copy of PbRef to the actual problem object. let mdd = mdd_builder_ref(&problem, relax) .with_max_width(FixedWidth(100)) .build(); // thus, the problem can still be used here. assert_eq!(0, problem.nb_vars());
Methods
impl<X, P> PbRef<X, P>
[src]
Trait Implementations
impl<X: Clone, P: Clone> Clone for PbRef<X, P>
[src]
impl<T, P, X> Problem<T> for PbRef<X, P> where
P: Problem<T>,
X: Borrow<P>,
[src]
P: Problem<T>,
X: Borrow<P>,
fn nb_vars(&self) -> usize
[src]
fn initial_state(&self) -> T
[src]
fn initial_value(&self) -> i32
[src]
fn domain_of<'a>(&self, state: &'a T, var: Variable) -> Domain<'a>
[src]
fn transition(&self, state: &T, vars: &VarSet, d: Decision) -> T
[src]
fn transition_cost(&self, state: &T, vars: &VarSet, d: Decision) -> i32
[src]
fn impacted_by(&self, state: &T, variable: Variable) -> bool
[src]
fn root_node(&self) -> Node<T>
[src]
fn all_vars(&self) -> VarSet
[src]
Auto Trait Implementations
impl<X, P> RefUnwindSafe for PbRef<X, P> where
P: RefUnwindSafe,
X: RefUnwindSafe,
P: RefUnwindSafe,
X: RefUnwindSafe,
impl<X, P> Send for PbRef<X, P> where
P: Send,
X: Send,
P: Send,
X: Send,
impl<X, P> Sync for PbRef<X, P> where
P: Sync,
X: Sync,
P: Sync,
X: Sync,
impl<X, P> Unpin for PbRef<X, P> where
P: Unpin,
X: Unpin,
P: Unpin,
X: Unpin,
impl<X, P> UnwindSafe for PbRef<X, P> where
P: UnwindSafe,
X: UnwindSafe,
P: UnwindSafe,
X: 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<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>,