[][src]Trait rdcl_aoc_helpers::search::Navigable

pub trait Navigable {
    type Point;
    pub fn distance_score(&self, a: &Self::Point, b: &Self::Point) -> u64;
pub fn get_neighbours(&self, point: &Self::Point) -> Vec<Self::Point>; pub fn find_shortest_path(
        &self,
        start: &Self::Point,
        end: &Self::Point
    ) -> Option<Vec<Self::Point>>
    where
        Self::Point: Hash + PartialEq + Eq + Clone
, { ... } }

This trait allows searching algorithms to navigate a space.

Associated Types

type Point[src]

Describes a single point in the searchable space.

Loading content...

Required methods

pub fn distance_score(&self, a: &Self::Point, b: &Self::Point) -> u64[src]

The distance score between points a and b.

pub fn get_neighbours(&self, point: &Self::Point) -> Vec<Self::Point>[src]

Returns the points that can be reached directly from point.

Loading content...

Provided methods

pub fn find_shortest_path(
    &self,
    start: &Self::Point,
    end: &Self::Point
) -> Option<Vec<Self::Point>> where
    Self::Point: Hash + PartialEq + Eq + Clone
[src]

Use A* to find the shortest path between two points within a Navigable space.

Loading content...

Implementors

Loading content...