pub struct ShortestPaths {
pub vertices: Vec<Vec<VertexId>>,
pub edges: Vec<Vec<EdgeId>>,
pub parents: Vec<VertexId>,
pub inbound_edges: Vec<EdgeId>,
}Expand description
Single-source shortest (or widest) paths towards a set of targets, as
returned by Graph::get_shortest_paths and friends.
Fields§
§vertices: Vec<Vec<VertexId>>vertices[i] lists the vertices on the path to the i-th target
(empty if the target is unreachable).
edges: Vec<Vec<EdgeId>>edges[i] lists the edges on the path to the i-th target.
parents: Vec<VertexId>The shortest path tree, indexed by vertex id: the vertex from which each
vertex was reached. The source has -1, and vertices not reached
during the search have -2 (the search stops as soon as all the
targets are reached).
inbound_edges: Vec<EdgeId>The shortest path tree, indexed by vertex id: the edge through which
each vertex was reached; -1 for the source and unreached vertices.
Implementations§
Trait Implementations§
Source§impl Clone for ShortestPaths
impl Clone for ShortestPaths
Source§fn clone(&self) -> ShortestPaths
fn clone(&self) -> ShortestPaths
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShortestPaths
impl Debug for ShortestPaths
Source§impl Default for ShortestPaths
impl Default for ShortestPaths
Source§fn default() -> ShortestPaths
fn default() -> ShortestPaths
Returns the “default value” for a type. Read more
impl Eq for ShortestPaths
Source§impl PartialEq for ShortestPaths
impl PartialEq for ShortestPaths
Source§fn eq(&self, other: &ShortestPaths) -> bool
fn eq(&self, other: &ShortestPaths) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ShortestPaths
Auto Trait Implementations§
impl Freeze for ShortestPaths
impl RefUnwindSafe for ShortestPaths
impl Send for ShortestPaths
impl Sync for ShortestPaths
impl Unpin for ShortestPaths
impl UnsafeUnpin for ShortestPaths
impl UnwindSafe for ShortestPaths
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