Crate petgraph [] [src]

petgraph is a graph data structure library.

Optional crate feature: "serde-1", see the Readme for more information.

Re-exports

pub use graph::Graph;
pub use Direction::Outgoing;
pub use Direction::Incoming;

Modules

algo

Graph algorithms.

csr

Compressed Sparse Row (CSR) is a sparse adjacency matrix graph.

data

Graph traits for associated data and graph construction.

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, Ty> is a graph datastructure where node values are mapping keys.

prelude

Commonly used items.

stable_graph

StableGraph keeps indices stable across removals.

unionfind

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

visit

Graph traits and graph traversals.

Enums

Directed

Marker type for a directed graph.

Direction

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.