Crate petgraph [] [src]

petgraph is a graph data structure library.

The most prominent type is Graph which is an adjacency list graph with undirected or directed edges and arbitrary associated data.

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

Reexports

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

Modules

algo

Graph algorithms.

dot

Simple graphviz dot file format output.

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.

Enums

Directed

Marker type for a directed graph.

EdgeDirection

Edge direction

Undirected

Marker type for an undirected graph.

Traits

EdgeType

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

IntoWeightedEdge

Convert an element like (i, j) or (i, j, w) into a triple of source, target, edge weight.