Struct floyd_warshall::PathMatrix [] [src]

pub struct PathMatrix<T> { /* fields omitted */ }

This matrix is a solution to the APSP problem, calculated by the Floyd-Warshall algorithm. It contains the intermediate nodes on the shortest path between every two nodes.

Methods

impl<T> PathMatrix<T>
[src]

[src]

Creates a new PathMatrix with the given dimension (n * n), where no paths were found yet. That means, no nodes are yet connected in this matrix.

[src]

This method returns the value at the given position.

[src]

This method returns the shortest path possible between i and i.

[src]

This method returns the shortest path possible between i and i as an iterator.

[src]

If the matrix contains a path between i and j (which means, it has a set length), this returns true.

[src]

This method updates the value at the given position.

Trait Implementations

impl<T: Debug> Debug for PathMatrix<T>
[src]

[src]

Formats the value using the given formatter.