[][src]Struct floyd_warshall_alg::result::FloydWarshallResult

pub struct FloydWarshallResult<N, E> {
    pub path: Graph<N, E>,
    pub next: Graph<N, N>,
}

Floyd-Warshall algorithm Result structure.

'FloydWarshallResult' struct is parametrized over:

  • Node index/label N.
  • Number type E giving a weight to edges.

Fields

path: Graph<N, E>next: Graph<N, N>

Methods

impl<N, E> FloydWarshallResult<N, E> where
    N: NodeTrait
[src]

pub fn get_path_rate(&self, a: N, b: N) -> Option<&E>[src]

Get path rate.

The path is specified by starting node a and end node b.

This is just a wrapper around Graph::edge_weight() method.

pub fn collect_path_nodes(&self, a: N, b: N) -> Vec<N>[src]

Collect path nodes.

The collected nodes list starts with a, ends with b and contains all the intermediate steps on the best rated (shortest) path from a to b.

Auto Trait Implementations

impl<N, E> Send for FloydWarshallResult<N, E> where
    E: Send,
    N: Send

impl<N, E> Sync for FloydWarshallResult<N, E> where
    E: Sync,
    N: Sync

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.