pub struct GridAStarOpts<'a> {
pub width: usize,
pub height: usize,
pub diagonal: bool,
pub periodic: bool,
pub admissibility: f64,
pub walkable: Option<&'a dyn Fn(usize, usize) -> bool>,
pub cost_metric: Option<&'a dyn CostMetric>,
}Expand description
Options for the full-featured grid A* pathfinder.
Mirrors the keyword arguments of Agents.jl Pathfinding.AStar.
Fields§
§width: usizeGrid width.
height: usizeGrid height.
diagonal: boolAllow diagonal movement (8-connected vs 4-connected).
periodic: boolPeriodic (toroidal) boundary wrapping.
admissibility: f64Admissibility factor. 0.0 gives optimal paths. Higher values
allow suboptimal paths for faster search: the algorithm uses
f = g + (1 + admissibility) * h.
Mirrors Agents.jl admissibility keyword.
walkable: Option<&'a dyn Fn(usize, usize) -> bool>Walkability predicate: walkable(x, y) returns true if the
cell is passable. Defaults to all-walkable if None.
cost_metric: Option<&'a dyn CostMetric>Cost metric for heuristic and edge cost estimation.
Defaults to DirectDistance if None.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for GridAStarOpts<'a>
impl<'a> !RefUnwindSafe for GridAStarOpts<'a>
impl<'a> !Send for GridAStarOpts<'a>
impl<'a> !Sync for GridAStarOpts<'a>
impl<'a> Unpin for GridAStarOpts<'a>
impl<'a> UnsafeUnpin for GridAStarOpts<'a>
impl<'a> !UnwindSafe for GridAStarOpts<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more