pub struct SimpleGraph<N, E> { /* private fields */ }
Expand description
A simple graph representation that is inefficient to use, but cheap to construct.
For actual usage, the graph should be converted into a different representation.
Trait Implementations§
Source§impl<N, E> Default for SimpleGraph<N, E>
impl<N, E> Default for SimpleGraph<N, E>
Source§impl<N: Clone, E: Clone> From<&AdjacencyArray<N, E>> for SimpleGraph<N, E>
impl<N: Clone, E: Clone> From<&AdjacencyArray<N, E>> for SimpleGraph<N, E>
Source§fn from(source: &AdjacencyArray<N, E>) -> Self
fn from(source: &AdjacencyArray<N, E>) -> Self
Converts to this type from the input type.
Source§impl<N: Clone, E: Default + Clone> From<&SimpleGraph<N, E>> for AdjacencyArray<N, E>
impl<N: Clone, E: Default + Clone> From<&SimpleGraph<N, E>> for AdjacencyArray<N, E>
Source§fn from(source: &SimpleGraph<N, E>) -> Self
fn from(source: &SimpleGraph<N, E>) -> Self
Converts to this type from the input type.
Source§impl<N, E> Graph<N, E> for SimpleGraph<N, E>
impl<N, E> Graph<N, E> for SimpleGraph<N, E>
Source§type NodeIdIterator = Map<Range<u32>, fn(u32) -> NodeId>
type NodeIdIterator = Map<Range<u32>, fn(u32) -> NodeId>
An iterator over all node ids of a graph.
Source§type EdgeIdIterator = Map<Range<u32>, fn(u32) -> EdgeId>
type EdgeIdIterator = Map<Range<u32>, fn(u32) -> EdgeId>
An iterator over all edge ids of a graph.
Source§fn node_id_iter(&self) -> Self::NodeIdIterator
fn node_id_iter(&self) -> Self::NodeIdIterator
Returns an iterator over all node ids in the graph.
Source§fn edge_id_iter(&self) -> Self::EdgeIdIterator
fn edge_id_iter(&self) -> Self::EdgeIdIterator
Returns an iterator over all edge ids in the graph.
Source§fn node_data(&self, id: NodeId) -> &N
fn node_data(&self, id: NodeId) -> &N
Returns a reference to a nodes data, identified by the given id.
Source§fn edge_data(&self, id: EdgeId) -> &E
fn edge_data(&self, id: EdgeId) -> &E
Returns a reference to an edges data, identified by the given id.
Source§fn edge(&self, id: EdgeId) -> EdgeRef<'_, E>
fn edge(&self, id: EdgeId) -> EdgeRef<'_, E>
Returns an edge instance, identified by the given id.
Source§fn edge_start(&self, id: EdgeId) -> NodeId
fn edge_start(&self, id: EdgeId) -> NodeId
Returns the start node of the edge identified by the given id.
Source§fn edge_end(&self, id: EdgeId) -> NodeId
fn edge_end(&self, id: EdgeId) -> NodeId
Returns the end node of the edge identified by the given id.
Source§fn is_node_id_valid(&self, id: NodeId) -> bool
fn is_node_id_valid(&self, id: NodeId) -> bool
Returns true if the given
NodeId
refers to a node in this graph.Source§fn is_edge_id_valid(&self, id: EdgeId) -> bool
fn is_edge_id_valid(&self, id: EdgeId) -> bool
Returns true if the given
EdgeId
refers to an edge in this graph.Source§impl<N, E> MutableGraph<N, E> for SimpleGraph<N, E>
impl<N, E> MutableGraph<N, E> for SimpleGraph<N, E>
Auto Trait Implementations§
impl<N, E> Freeze for SimpleGraph<N, E>
impl<N, E> RefUnwindSafe for SimpleGraph<N, E>where
N: RefUnwindSafe,
E: RefUnwindSafe,
impl<N, E> Send for SimpleGraph<N, E>
impl<N, E> Sync for SimpleGraph<N, E>
impl<N, E> Unpin for SimpleGraph<N, E>
impl<N, E> UnwindSafe for SimpleGraph<N, E>where
N: 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