Expand description
petgraph is a graph data structure library.
-
Graphwhich is an adjacency list graph with arbitrary associated data. -
StableGraphis similar toGraph, but it keeps indices stable across removals. -
GraphMapis an adjacency list graph which is backed by a hash table and the node identifiers are the keys into the table. -
CSRis a sparse adjacency matrix graph with arbitrary associated data.
Optional crate feature: "serde-1", see the Readme for more information.
Re-exports
Modules
- Graph algorithms.
- Compressed Sparse Row (CSR) is a sparse adjacency matrix graph.
- Graph traits for associated data and graph construction.
- Simple graphviz dot file format output.
Graph<N, E, Ty, Ix>is a graph datastructure using an adjacency list representation.GraphMap<N, E, Ty>is a graph datastructure where node values are mapping keys.- Commonly used items.
StableGraphkeeps indices stable across removals.UnionFind<K>is a disjoint-set data structure.- Graph traits and graph traversals.
Enums
- Marker type for a directed graph.
- Edge direction.
- Marker type for an undirected graph.
Traits
- A graph’s edge type determines whether is has directed edges or not.
- Convert an element like
(i, j)or(i, j, w)into a triple of source, target, edge weight.