talira

petgraph

Graph data structures and algorithms for Rust

open sourceMIT OR Apache-2.0free

petgraph provides fast, flexible graph data structures and algorithms in Rust, for directed and undirected graphs with arbitrary node and edge data. It has several graph types (Graph, StableGraph, GraphMap and MatrixGraph), algorithms such as shortest paths, minimum spanning trees and graph isomorphism with traits for writing your own, and DOT import and export for visualising graphs with Graphviz.

Problems it solves

  • find shortest paths in a graph in Rust
  • model a dependency graph in Rust
  • graph algorithms like minimum spanning tree in Rust

Features

  • Graph, StableGraph, GraphMap and MatrixGraph types
  • path-finding, spanning trees and isomorphism algorithms
  • traits for custom algorithms
  • DOT import and export