pub struct IndexedGraphMap<N, C> { /* private fields */ }Expand description
Helper that maps external node values to dense indices and builds an indexed graph.
Implementations§
Source§impl<N, C> IndexedGraphMap<N, C>
impl<N, C> IndexedGraphMap<N, C>
Sourcepub fn from_nodes_and_successors<I, FN, IN>(nodes: I, successors: FN) -> Self
pub fn from_nodes_and_successors<I, FN, IN>(nodes: I, successors: FN) -> Self
Build a mapped graph from seed nodes and a successor function.
Sourcepub const fn graph(&self) -> &IndexedGraph<C>
pub const fn graph(&self) -> &IndexedGraph<C>
Return the indexed graph.
Sourcepub fn into_graph(self) -> IndexedGraph<C>
pub fn into_graph(self) -> IndexedGraph<C>
Return the indexed graph, consuming the mapping helper.
Sourcepub const fn node_count(&self) -> usize
pub const fn node_count(&self) -> usize
Return the number of nodes in the mapped graph.
Trait Implementations§
Source§impl<N: Clone, C: Clone> Clone for IndexedGraphMap<N, C>
impl<N: Clone, C: Clone> Clone for IndexedGraphMap<N, C>
Source§fn clone(&self) -> IndexedGraphMap<N, C>
fn clone(&self) -> IndexedGraphMap<N, C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<N, C> Freeze for IndexedGraphMap<N, C>
impl<N, C> RefUnwindSafe for IndexedGraphMap<N, C>where
N: RefUnwindSafe,
C: RefUnwindSafe,
impl<N, C> Send for IndexedGraphMap<N, C>
impl<N, C> Sync for IndexedGraphMap<N, C>
impl<N, C> Unpin for IndexedGraphMap<N, C>
impl<N, C> UnsafeUnpin for IndexedGraphMap<N, C>
impl<N, C> UnwindSafe for IndexedGraphMap<N, C>where
N: UnwindSafe,
C: UnwindSafe,
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