Struct rustc_data_structures::graph::Graph [] [src]

pub struct Graph<N, E> {
    // some fields omitted
}
Unstable (rustc_private)

Methods

impl<N: Debug, E: Debug> Graph<N, E>
[src]

fn new() -> Graph<N, E>

fn all_nodes(&self) -> &[Node<N>]

fn len_nodes(&self) -> usize

fn all_edges(&self) -> &[Edge<E>]

fn len_edges(&self) -> usize

fn next_node_index(&self) -> NodeIndex

fn add_node(&mut self, data: N) -> NodeIndex

fn mut_node_data(&mut self, idx: NodeIndex) -> &mut N

fn node_data(&self, idx: NodeIndex) -> &N

fn node(&self, idx: NodeIndex) -> &Node<N>

fn next_edge_index(&self) -> EdgeIndex

fn add_edge(&mut self, source: NodeIndex, target: NodeIndex, data: E) -> EdgeIndex

fn mut_edge_data(&mut self, idx: EdgeIndex) -> &mut E

fn edge_data(&self, idx: EdgeIndex) -> &E

fn edge(&self, idx: EdgeIndex) -> &Edge<E>

fn first_adjacent(&self, node: NodeIndex, dir: Direction) -> EdgeIndex

Unstable (rustc_private)

Accesses the index of the first edge adjacent to node. This is useful if you wish to modify the graph while walking the linked list of edges.

fn next_adjacent(&self, edge: EdgeIndex, dir: Direction) -> EdgeIndex

Unstable (rustc_private)

Accesses the next edge in a given direction. This is useful if you wish to modify the graph while walking the linked list of edges.

fn each_node<'a, F>(&'a self, f: F) -> bool where F: FnMut(NodeIndex, &'a Node<N>) -> bool

Unstable (rustc_private)

Iterates over all edges defined in the graph.

fn each_edge<'a, F>(&'a self, f: F) -> bool where F: FnMut(EdgeIndex, &'a Edge<E>) -> bool

Unstable (rustc_private)

Iterates over all edges defined in the graph

fn outgoing_edges(&self, source: NodeIndex) -> AdjacentEdges<N, E>

fn incoming_edges(&self, source: NodeIndex) -> AdjacentEdges<N, E>

fn adjacent_edges(&self, source: NodeIndex, direction: Direction) -> AdjacentEdges<N, E>

fn successor_nodes(&self, source: NodeIndex) -> AdjacentTargets<N, E>

fn predecessor_nodes(&self, target: NodeIndex) -> AdjacentSources<N, E>

fn iterate_until_fixed_point<'a, F>(&'a self, op: F) where F: FnMut(usize, EdgeIndex, &'a Edge<E>) -> bool

fn depth_traverse<'a>(&'a self, start: NodeIndex, direction: Direction) -> DepthFirstTraversal<'a, N, E>