pub struct MapAdjacencyList<NI, E, M>{ /* private fields */ }Implementations§
Source§impl<NI, E, M> MapAdjacencyList<NI, E, M>
impl<NI, E, M> MapAdjacencyList<NI, E, M>
Sourcepub fn new(nodes: M) -> Result<Self, GraphError<NI>>
pub fn new(nodes: M) -> Result<Self, GraphError<NI>>
Create new map adjacency list with validation
This function validates that all edge destinations exist in the node set. Returns an error if any edge references a non-existent node.
pub fn new_unchecked(nodes: M) -> Self
Trait Implementations§
Source§impl<NI, E, M> FromGraph<NI, GraphError<NI>> for MapAdjacencyList<NI, E, M>where
NI: NodeIndex,
E: NodesIterable<Node = NI> + MutableNodes<NI> + Default,
M: MapTrait<NI, E> + Default,
impl<NI, E, M> FromGraph<NI, GraphError<NI>> for MapAdjacencyList<NI, E, M>where
NI: NodeIndex,
E: NodesIterable<Node = NI> + MutableNodes<NI> + Default,
M: MapTrait<NI, E> + Default,
Source§fn from_graph<G>(source_graph: &G) -> Result<Self, GraphError<NI>>
fn from_graph<G>(source_graph: &G) -> Result<Self, GraphError<NI>>
Creates a new graph by copying data from the source graph Read more
Source§impl<NI, E, M> Graph<NI> for MapAdjacencyList<NI, E, M>
impl<NI, E, M> Graph<NI> for MapAdjacencyList<NI, E, M>
Source§fn contains_node(&self, node: NI) -> Result<bool, Self::Error>
fn contains_node(&self, node: NI) -> Result<bool, Self::Error>
Optimized O(1) contains_node for map adjacency list
Source§fn outgoing_edges(
&self,
node: NI,
) -> Result<impl Iterator<Item = NI>, Self::Error>
fn outgoing_edges( &self, node: NI, ) -> Result<impl Iterator<Item = NI>, Self::Error>
Optimized O(out-degree) outgoing_edges for map adjacency list
type Error = GraphError<NI>
Source§fn iter_nodes(&self) -> Result<impl Iterator<Item = NI>, Self::Error>
fn iter_nodes(&self) -> Result<impl Iterator<Item = NI>, Self::Error>
Return an iterator over all nodes in the graph
Source§impl<NI, E, M> GraphWithMutableEdges<NI> for MapAdjacencyList<NI, E, M>where
NI: NodeIndex + Eq + Hash + Copy + PartialEq,
E: NodesIterable<Node = NI> + MutableNodes<NI>,
M: MapTrait<NI, E>,
impl<NI, E, M> GraphWithMutableEdges<NI> for MapAdjacencyList<NI, E, M>where
NI: NodeIndex + Eq + Hash + Copy + PartialEq,
E: NodesIterable<Node = NI> + MutableNodes<NI>,
M: MapTrait<NI, E>,
Source§impl<NI, E, M> GraphWithMutableNodes<NI> for MapAdjacencyList<NI, E, M>
impl<NI, E, M> GraphWithMutableNodes<NI> for MapAdjacencyList<NI, E, M>
Auto Trait Implementations§
impl<NI, E, M> Freeze for MapAdjacencyList<NI, E, M>where
M: Freeze,
impl<NI, E, M> RefUnwindSafe for MapAdjacencyList<NI, E, M>where
M: RefUnwindSafe,
E: RefUnwindSafe,
impl<NI, E, M> Send for MapAdjacencyList<NI, E, M>
impl<NI, E, M> Sync for MapAdjacencyList<NI, E, M>
impl<NI, E, M> Unpin for MapAdjacencyList<NI, E, M>
impl<NI, E, M> UnsafeUnpin for MapAdjacencyList<NI, E, M>where
M: UnsafeUnpin,
impl<NI, E, M> UnwindSafe for MapAdjacencyList<NI, E, M>where
M: UnwindSafe,
E: 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