Crate petgraph [] [src]

petgraph is a graph data structure library.

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

Petgraph also provides GraphMap which is an undirected hashmap-backed graph which only allows simple node identifiers (such as integers or references).

Reexports

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

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.