Struct grid_search::SearchContext
source · pub struct SearchContext<Cost: PartialOrd<Cost>> { /* private fields */ }
Implementations
sourceimpl<Cost: Copy + Add<Cost> + PartialOrd<Cost> + NumCast + Zero> SearchContext<Cost>
impl<Cost: Copy + Add<Cost> + PartialOrd<Cost> + NumCast + Zero> SearchContext<Cost>
pub fn astar_cardinal_manhatten_distance_heuristic<G>(
&mut self,
grid: &G,
start: Coord,
goal: Coord,
config: SearchConfig,
path: &mut Vec<Direction>
) -> Result<SearchMetadata<Cost>, Error>where
G: CostGrid<Cost = Cost>,
sourceimpl<Cost> SearchContext<Cost>where
Cost: Copy + Add<Cost, Output = Cost> + Mul<Cost, Output = Cost> + PartialOrd<Cost> + NumCast + Zero,
impl<Cost> SearchContext<Cost>where
Cost: Copy + Add<Cost, Output = Cost> + Mul<Cost, Output = Cost> + PartialOrd<Cost> + NumCast + Zero,
pub fn astar_diagonal_distance_heuristic<G>(
&mut self,
grid: &G,
start: Coord,
goal: Coord,
weights: HeuristicDirectionWeights<Cost>,
config: SearchConfig,
path: &mut Vec<Direction>
) -> Result<SearchMetadata<Cost>, Error>where
G: CostGrid<Cost = Cost>,
sourceimpl<Cost: Copy + Add<Cost> + PartialOrd<Cost> + NumCast + Zero + One> SearchContext<Cost>
impl<Cost: Copy + Add<Cost> + PartialOrd<Cost> + NumCast + Zero + One> SearchContext<Cost>
pub fn jump_point_search_cardinal_manhatten_distance_heuristic<G>(
&mut self,
grid: &G,
start: Coord,
goal: Coord,
config: SearchConfig,
path: &mut Vec<Direction>
) -> Result<SearchMetadata<Cost>, Error>where
G: SolidGrid,
sourceimpl<Cost: Copy + Add<Cost> + PartialOrd<Cost> + Zero> SearchContext<Cost>
impl<Cost: Copy + Add<Cost> + PartialOrd<Cost> + Zero> SearchContext<Cost>
pub fn dijkstra<G, V, D>(
&mut self,
grid: &G,
start: Coord,
goal: Coord,
directions: D,
config: SearchConfig,
path: &mut Vec<Direction>
) -> Result<SearchMetadata<Cost>, Error>where
G: CostGrid<Cost = Cost>,
V: Into<Direction>,
D: Copy + IntoIterator<Item = V>,
pub fn dijkstra_predicate<G, V, D, F>(
&mut self,
grid: &G,
start: Coord,
predicate: F,
directions: D,
config: SearchConfig,
path: &mut Vec<Direction>
) -> Result<SearchMetadata<Cost>, Error>where
G: CostGrid<Cost = Cost>,
V: Into<Direction>,
D: Copy + IntoIterator<Item = V>,
F: Fn(Coord) -> bool,
sourceimpl<C> SearchContext<C>where
C: Copy + Zero + One + Add<C, Output = C> + Mul<C, Output = C> + FloatConst + NumCast + PartialOrd<C>,
impl<C> SearchContext<C>where
C: Copy + Zero + One + Add<C, Output = C> + Mul<C, Output = C> + FloatConst + NumCast + PartialOrd<C>,
pub fn jump_point_search_octile_distance_heuristic<G>(
&mut self,
grid: &G,
start: Coord,
goal: Coord,
config: SearchConfig,
path: &mut Vec<Direction>
) -> Result<SearchMetadata<C>, Error>where
G: SolidGrid,
sourceimpl<Cost: PartialOrd<Cost> + Zero> SearchContext<Cost>
impl<Cost: PartialOrd<Cost> + Zero> SearchContext<Cost>
sourceimpl<Cost> SearchContext<Cost>where
Cost: Copy + Add + PartialOrd + Zero + One,
impl<Cost> SearchContext<Cost>where
Cost: Copy + Add + PartialOrd + Zero + One,
pub fn populate_distance_map<G, V, D>(
&mut self,
grid: &G,
start: Coord,
directions: D,
config: SearchConfig,
distance_map: &mut DistanceMap<Cost>
) -> Result<DistanceMapMetadata, Error>where
G: CostGrid<Cost = Cost>,
V: Into<Direction>,
D: Copy + IntoIterator<Item = V>,
sourceimpl<Cost> SearchContext<Cost>where
Cost: Copy + Add + PartialOrd + Zero + One + Sub<Output = Cost>,
impl<Cost> SearchContext<Cost>where
Cost: Copy + Add + PartialOrd + Zero + One + Sub<Output = Cost>,
pub fn best_search_uniform_distance_map<G, V, D>(
&mut self,
grid: &G,
start: Coord,
config: SearchConfig,
max_depth: Cost,
distance_map: &UniformDistanceMap<Cost, D>,
path: &mut Vec<Direction>
) -> Result<SearchMetadata<Cost>, Error>where
G: SolidGrid,
V: Into<Direction>,
D: Copy + IntoIterator<Item = V>,
Trait Implementations
sourceimpl<Cost: Clone + PartialOrd<Cost>> Clone for SearchContext<Cost>
impl<Cost: Clone + PartialOrd<Cost>> Clone for SearchContext<Cost>
sourcefn clone(&self) -> SearchContext<Cost>
fn clone(&self) -> SearchContext<Cost>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<Cost: Debug + PartialOrd<Cost>> Debug for SearchContext<Cost>
impl<Cost: Debug + PartialOrd<Cost>> Debug for SearchContext<Cost>
Auto Trait Implementations
impl<Cost> RefUnwindSafe for SearchContext<Cost>where
Cost: RefUnwindSafe,
impl<Cost> Send for SearchContext<Cost>where
Cost: Send,
impl<Cost> Sync for SearchContext<Cost>where
Cost: Sync,
impl<Cost> Unpin for SearchContext<Cost>where
Cost: Unpin,
impl<Cost> UnwindSafe for SearchContext<Cost>where
Cost: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more