Skip to main content

SasProblem

Struct SasProblem 

Source
pub struct SasProblem<'a> { /* private fields */ }
Expand description

A Task viewed as a WidthProblem: one feature per fact var = value, and the number of unsatisfied goal facts as #g.

Implementations§

Source§

impl<'a> SasProblem<'a>

Source

pub fn new(task: &'a Task) -> Self

Wraps task, numbering its facts variable by variable.

Source

pub fn task(&self) -> &Task

The wrapped task, for validating or printing plans.

Trait Implementations§

Source§

impl GoalCount for SasProblem<'_>

Source§

fn unsatisfied_goals(&self, state: &State) -> usize

Number of goal conditions not yet satisfied (#g).
Source§

impl RelaxedPlan for SasProblem<'_>

The relaxed plan is extracted from h_add best supporters, and its features are all effects of its operators, as in LAPKT. Axioms on the way are followed but contribute no features of their own.

Source§

fn relaxed_plan_features(&self, state: &State, out: &mut Vec<u32>)

Push into out the features a relaxed plan from state makes true, for example the add effects of its actions (LAPKT’s choice). Read more
Source§

impl WidthProblem for SasProblem<'_>

Source§

type State = State

A search state. Cloned when a node is stored.
Source§

type Action = usize

The label of a transition; plans are sequences of actions.
Source§

fn initial_state(&self) -> State

The state the search starts from.
Source§

fn successors(&self, state: &State, out: &mut Vec<(OpId, State)>)

Push all (action, successor) pairs of state into out.
Source§

fn features(&self, state: &State, out: &mut Vec<u32>)

Push the feature ids (< num_features()) true in state into out.
Source§

fn num_features(&self) -> usize

Number of distinct features; every id from WidthProblem::features must be below it.
Source§

fn is_goal(&self, state: &State) -> bool

Whether state satisfies the goal.

Auto Trait Implementations§

§

impl<'a> !Freeze for SasProblem<'a>

§

impl<'a> Forget for SasProblem<'a>

§

impl<'a> Move for SasProblem<'a>

§

impl<'a> RefUnwindSafe for SasProblem<'a>

§

impl<'a> Send for SasProblem<'a>

§

impl<'a> Sync for SasProblem<'a>

§

impl<'a> Unpin for SasProblem<'a>

§

impl<'a> UnsafeUnpin for SasProblem<'a>

§

impl<'a> UnwindSafe for SasProblem<'a>

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.