Enum map_model::pathfind::engine::PathfindEngine[][src]

pub enum PathfindEngine {
    Empty,
    Dijkstra {
        graph: DiGraph<usize, usize>,
    },
    CH {
        graph: FastGraph,
        path_calc: ThreadLocal<RefCell<PathCalculator>>,
    },
}

This operates on raw IDs and costs; no type safety. The thing containing this transforms to/from higher-level types.

Variants

Empty
Dijkstra
Show fields

Fields of Dijkstra

graph: DiGraph<usize, usize>
CH
Show fields

Fields of CH

graph: FastGraphpath_calc: ThreadLocal<RefCell<PathCalculator>>

Implementations

impl PathfindEngine[src]

pub fn calculate_path(
    &self,
    start: usize,
    end: usize
) -> Option<(usize, Vec<usize>)>
[src]

Returns (path cost, node IDs in path)

pub fn calculate_path_multiple_sources_and_targets(
    &self,
    starts: Vec<(usize, usize)>,
    ends: Vec<(usize, usize)>
) -> Option<(usize, Vec<usize>)>
[src]

Returns (path cost, node IDs in path). Input is pairs of (node ID, extra weight)

pub fn reuse_ordering(&self) -> CreateEngine<'_>[src]

pub fn is_dijkstra(&self) -> bool[src]

pub fn all_costs_from(&self, start: usize) -> HashMap<usize, usize>[src]

Trait Implementations

impl Clone for PathfindEngine[src]

impl<'de> Deserialize<'de> for PathfindEngine[src]

impl Serialize for PathfindEngine[src]

Auto Trait Implementations

impl RefUnwindSafe for PathfindEngine

impl Send for PathfindEngine

impl Sync for PathfindEngine

impl Unpin for PathfindEngine

impl UnwindSafe for PathfindEngine

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]