Crate petgraph [−] [src]

petgraph is a graph data structure library.

The most interesting type is Graph which is a directed or undirected graph with owned mutably accessible arbitrary node and edge weights. It is based on rustc's graph implementation.

Reexports

pub use graphmap::GraphMap;
pub use graph::Graph;
pub use self::EdgeDirection::{Outgoing, Incoming};
pub use visit::{Bfs, Dfs};

Modules

algo

Graph algorithms.

graph

Graph<N, E, Ty, Ix> is a graph datastructure using an adjacency list representation.

graphmap

GraphMap<N, E> is an undirected graph where node values are mapping keys.

unionfind

UnionFind<K> is a disjoint-set data structure.

visit

Graph visitor algorithms.

Structs

Directed

Marker type for a directed graph.

MinScored

MinScored<K, T> holds a score K and a scored object T in a pair for use with a BinaryHeap.

Ptr

A reference that is hashed and compared by its pointer value.

Undirected

Marker type for an undirected graph.

Enums

EdgeDirection

Edge direction

Traits

EdgeType

A graph's edge type determines whether is has directed edges or not.