[][src]Trait rusty_planner::planner::ProblemSpace

pub trait ProblemSpace {
    type State: Copy + Eq + Hash;
    type Iter: Iterator<Item = (Self::State, f64)>;
    pub fn heuristic(&self, _: &Self::State, _: &Self::State) -> f64;
pub fn succ(&self, _: &Self::State) -> Self::Iter;
pub fn pred(&self, _: &Self::State) -> Self::Iter; }

Public trait which - once implemented - describes the problem space to solve.

Associated Types

type State: Copy + Eq + Hash[src]

Defines the type of your state.

type Iter: Iterator<Item = (Self::State, f64)>[src]

Iterator for containing states and cost/utility to transition to it.

Loading content...

Required methods

pub fn heuristic(&self, _: &Self::State, _: &Self::State) -> f64[src]

Heuristic function to calculate the "distance" between two states.

pub fn succ(&self, _: &Self::State) -> Self::Iter[src]

Given a state calculates the successor states.

pub fn pred(&self, _: &Self::State) -> Self::Iter[src]

Given a state calculates the predecessor states.

Loading content...

Implementors

Loading content...