Struct rustc_data_structures::graph::Graph [−][src]
pub struct Graph<N, E> { /* fields omitted */ }Methods
impl<N: Debug, E: Debug> Graph<N, E>[src]
impl<N: Debug, E: Debug> Graph<N, E>pub fn new() -> Graph<N, E>[src]
pub fn new() -> Graph<N, E>pub fn with_capacity(nodes: usize, edges: usize) -> Graph<N, E>[src]
pub fn with_capacity(nodes: usize, edges: usize) -> Graph<N, E>pub fn all_nodes(&self) -> &[Node<N>][src]
pub fn all_nodes(&self) -> &[Node<N>]pub fn len_nodes(&self) -> usize[src]
pub fn len_nodes(&self) -> usizepub fn all_edges(&self) -> &[Edge<E>][src]
pub fn all_edges(&self) -> &[Edge<E>]pub fn len_edges(&self) -> usize[src]
pub fn len_edges(&self) -> usizepub fn next_node_index(&self) -> NodeIndex[src]
pub fn next_node_index(&self) -> NodeIndexpub fn add_node(&mut self, data: N) -> NodeIndex[src]
pub fn add_node(&mut self, data: N) -> NodeIndexⓘImportant traits for &'a mut Rpub fn mut_node_data(&mut self, idx: NodeIndex) -> &mut N[src]
ⓘImportant traits for &'a mut R
pub fn mut_node_data(&mut self, idx: NodeIndex) -> &mut NⓘImportant traits for &'a mut Rpub fn node_data(&self, idx: NodeIndex) -> &N[src]
ⓘImportant traits for &'a mut R
pub fn node_data(&self, idx: NodeIndex) -> &Npub fn node(&self, idx: NodeIndex) -> &Node<N>[src]
pub fn node(&self, idx: NodeIndex) -> &Node<N>pub fn next_edge_index(&self) -> EdgeIndex[src]
pub fn next_edge_index(&self) -> EdgeIndexpub fn add_edge(
&mut self,
source: NodeIndex,
target: NodeIndex,
data: E
) -> EdgeIndex[src]
pub fn add_edge(
&mut self,
source: NodeIndex,
target: NodeIndex,
data: E
) -> EdgeIndexpub fn edge(&self, idx: EdgeIndex) -> &Edge<E>[src]
pub fn edge(&self, idx: EdgeIndex) -> &Edge<E>pub fn enumerated_nodes(
&self
) -> impl Iterator<Item = (NodeIndex, &Node<N>)>[src]
pub fn enumerated_nodes(
&self
) -> impl Iterator<Item = (NodeIndex, &Node<N>)>pub fn enumerated_edges(
&self
) -> impl Iterator<Item = (EdgeIndex, &Edge<E>)>[src]
pub fn enumerated_edges(
&self
) -> impl Iterator<Item = (EdgeIndex, &Edge<E>)>pub fn each_node<'a>(
&'a self,
f: impl FnMut(NodeIndex, &'a Node<N>) -> bool
) -> bool[src]
pub fn each_node<'a>(
&'a self,
f: impl FnMut(NodeIndex, &'a Node<N>) -> bool
) -> boolIterates over all edges defined in the graph.
pub fn each_edge<'a>(
&'a self,
f: impl FnMut(EdgeIndex, &'a Edge<E>) -> bool
) -> bool[src]
pub fn each_edge<'a>(
&'a self,
f: impl FnMut(EdgeIndex, &'a Edge<E>) -> bool
) -> boolIterates over all edges defined in the graph
ⓘImportant traits for AdjacentEdges<'g, N, E>pub fn outgoing_edges(&self, source: NodeIndex) -> AdjacentEdges<N, E>[src]
ⓘImportant traits for AdjacentEdges<'g, N, E>
pub fn outgoing_edges(&self, source: NodeIndex) -> AdjacentEdges<N, E>ⓘImportant traits for AdjacentEdges<'g, N, E>pub fn incoming_edges(&self, source: NodeIndex) -> AdjacentEdges<N, E>[src]
ⓘImportant traits for AdjacentEdges<'g, N, E>
pub fn incoming_edges(&self, source: NodeIndex) -> AdjacentEdges<N, E>ⓘImportant traits for AdjacentEdges<'g, N, E>pub fn adjacent_edges(
&self,
source: NodeIndex,
direction: Direction
) -> AdjacentEdges<N, E>[src]
ⓘImportant traits for AdjacentEdges<'g, N, E>
pub fn adjacent_edges(
&self,
source: NodeIndex,
direction: Direction
) -> AdjacentEdges<N, E>pub fn successor_nodes<'a>(
&'a self,
source: NodeIndex
) -> impl Iterator<Item = NodeIndex> + 'a[src]
pub fn successor_nodes<'a>(
&'a self,
source: NodeIndex
) -> impl Iterator<Item = NodeIndex> + 'apub fn predecessor_nodes<'a>(
&'a self,
target: NodeIndex
) -> impl Iterator<Item = NodeIndex> + 'a[src]
pub fn predecessor_nodes<'a>(
&'a self,
target: NodeIndex
) -> impl Iterator<Item = NodeIndex> + 'aⓘImportant traits for DepthFirstTraversal<'g, N, E>pub fn depth_traverse<'a>(
&'a self,
start: NodeIndex,
direction: Direction
) -> DepthFirstTraversal<'a, N, E>[src]
ⓘImportant traits for DepthFirstTraversal<'g, N, E>
pub fn depth_traverse<'a>(
&'a self,
start: NodeIndex,
direction: Direction
) -> DepthFirstTraversal<'a, N, E>pub fn nodes_in_postorder<'a>(
&'a self,
direction: Direction,
entry_node: NodeIndex
) -> Vec<NodeIndex>[src]
pub fn nodes_in_postorder<'a>(
&'a self,
direction: Direction,
entry_node: NodeIndex
) -> Vec<NodeIndex>