Struct rustc_data_structures::graph::Graph
[−]
[src]
pub struct Graph<N, E> { /* fields omitted */ }
Methods
impl<N: Debug, E: Debug> Graph<N, E>
[src]
pub fn new() -> Graph<N, E>
[src]
pub fn with_capacity(nodes: usize, edges: usize) -> Graph<N, E>
[src]
pub fn all_nodes(&self) -> &[Node<N>]
[src]
pub fn len_nodes(&self) -> usize
[src]
pub fn all_edges(&self) -> &[Edge<E>]
[src]
pub fn len_edges(&self) -> usize
[src]
pub fn next_node_index(&self) -> NodeIndex
[src]
pub fn add_node(&mut self, data: N) -> NodeIndex
[src]
ⓘImportant traits for &'a mut Wpub fn mut_node_data(&mut self, idx: NodeIndex) -> &mut N
[src]
ⓘImportant traits for &'a mut W
ⓘImportant traits for &'a mut Wpub fn node_data(&self, idx: NodeIndex) -> &N
[src]
ⓘImportant traits for &'a mut W
pub fn node(&self, idx: NodeIndex) -> &Node<N>
[src]
pub fn next_edge_index(&self) -> EdgeIndex
[src]
pub fn add_edge(
&mut self,
source: NodeIndex,
target: NodeIndex,
data: E
) -> EdgeIndex
[src]
&mut self,
source: NodeIndex,
target: NodeIndex,
data: E
) -> EdgeIndex
pub fn edge(&self, idx: EdgeIndex) -> &Edge<E>
[src]
ⓘImportant traits for EnumeratedNodes<'g, N>pub fn enumerated_nodes(&self) -> EnumeratedNodes<N>
[src]
ⓘImportant traits for EnumeratedNodes<'g, N>
ⓘImportant traits for EnumeratedEdges<'g, E>pub fn enumerated_edges(&self) -> EnumeratedEdges<E>
[src]
ⓘImportant traits for EnumeratedEdges<'g, E>
pub fn each_node<'a, F>(&'a self, f: F) -> bool where
F: FnMut(NodeIndex, &'a Node<N>) -> bool,
[src]
F: FnMut(NodeIndex, &'a Node<N>) -> bool,
Iterates over all edges defined in the graph.
pub fn each_edge<'a, F>(&'a self, f: F) -> bool where
F: FnMut(EdgeIndex, &'a Edge<E>) -> bool,
[src]
F: FnMut(EdgeIndex, &'a Edge<E>) -> bool,
Iterates 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>
ⓘ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>
ⓘ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>
&self,
source: NodeIndex,
direction: Direction
) -> AdjacentEdges<N, E>
ⓘImportant traits for AdjacentTargets<'g, N, E>pub fn successor_nodes(&self, source: NodeIndex) -> AdjacentTargets<N, E>
[src]
ⓘImportant traits for AdjacentTargets<'g, N, E>
ⓘImportant traits for AdjacentSources<'g, N, E>pub fn predecessor_nodes(&self, target: NodeIndex) -> AdjacentSources<N, E>
[src]
ⓘImportant traits for AdjacentSources<'g, N, E>
ⓘ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>
&'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]
&'a self,
direction: Direction,
entry_node: NodeIndex
) -> Vec<NodeIndex>