pub struct NetworkGraph { /* private fields */ }Expand description
A network graph containing the petgraph graph and a map from gml node ids to petgraph node indexes.
Implementations§
Source§impl NetworkGraph
 
impl NetworkGraph
pub fn graph(&self) -> &GraphWrapper<ShadowNode, ShadowEdge, u32>
pub fn node_id_to_index(&self, id: u32) -> Option<&NodeIndex>
pub fn node_index_to_id(&self, index: NodeIndex) -> Option<u32>
pub fn parse( graph_text: &str, ) -> Result<Self, Box<dyn Error + Send + Sync + 'static>>
pub fn compute_shortest_paths( &self, nodes: &[NodeIndex], ) -> Result<HashMap<(NodeIndex, NodeIndex), PathProperties>, Box<dyn Error + Send + Sync + 'static>>
pub fn get_direct_paths( &self, nodes: &[NodeIndex], ) -> Result<HashMap<(NodeIndex, NodeIndex), PathProperties>, Box<dyn Error + Send + Sync + 'static>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NetworkGraph
impl RefUnwindSafe for NetworkGraph
impl Send for NetworkGraph
impl Sync for NetworkGraph
impl Unpin for NetworkGraph
impl UnwindSafe for NetworkGraph
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
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more