Skip to main content

Crate graphica

Crate graphica 

Source
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§

BackEdge
An edge that is not part of the spanning tree, as it would form a loop.
CanonicalForm
Information about the graph and its canonical form.
Edge
An edge in a graph, with arbitrary data.
Empty
Empty data type.
GenerationSettings
Graph
A multigraph with support for arbitrary node and edge data.
HalfEdge
Represents a part of an edge that connects to one vertex. It can be directed or undirected.
HiddenData
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.
NodeInfo
Information about a node in a spanning tree.
SpanningTree
A spanning tree representation of a graph. Parts of the graph may not be in the tree.

Traits§

FilterFn
ProgressFn