Expand description
Graphs and related algorithms.
§Examples
let mut g = Graph::new();
let n0 = g.add_node(0);
let n1 = g.add_node(1);
let n2 = g.add_node(2);
g.add_edge(n2, n1, true, 0).unwrap();
g.add_edge(n0, n0, false, 0).unwrap();
g.add_edge(n0, n1, true, 0).unwrap();
g.add_edge(n1, n0, false, 2).unwrap();
g.canonize_edges();
assert_eq!(g.node(0).edges, [0, 1, 2]);Structs§
- Back
Edge - An edge that is not part of the spanning tree, as it would form a loop.
- Canonical
Form - Information about the graph and its canonical form.
- Edge
- An edge in a graph, with arbitrary data.
- Empty
- Empty data type.
- Generation
Settings - Graph
- A multigraph with support for arbitrary node and edge data.
- Half
Edge - Represents a part of an edge that connects to one vertex. It can be directed or undirected.
- Hidden
Data - Data that has a public part and a private part. The private part is not used for equality or hashing.
- Node
- A node in a graph, with arbitrary data.
- Node
Info - Information about a node in a spanning tree.
- Spanning
Tree - A spanning tree representation of a graph. Parts of the graph may not be in the tree.