| commit | 162903562ce5b00cdba390a0d9c1bb80f1c75bf5 | [log] [tgz] |
|---|---|---|
| author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | Tue Sep 30 13:13:30 2025 +0000 |
| committer | GitHub <noreply@github.com> | Tue Sep 30 13:13:30 2025 +0000 |
| tree | 05d198c6cce7352e34d1dbbc191826ff121d189d | |
| parent | ce234451068c427ae7550dcbddd6c3692462f111 [diff] |
chore: release v0.8.3 (#826) ## 🤖 New release * `petgraph`: 0.8.2 -> 0.8.3 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.8.3](https://github.com/petgraph/petgraph/compare/petgraph@v0.8.2...petgraph@v0.8.3) - 2025-09-28 ### Bug Fixes - Infinite `subgraph_isomorphisms_iter` for empty isomorphisms ([#780](https://github.com/petgraph/petgraph/pull/780)) - Algos don't work on `UndirectedAdaptor` ([#870](https://github.com/petgraph/petgraph/pull/870)) ([#871](https://github.com/petgraph/petgraph/pull/871)) - use a queue for SPFA ([#893](https://github.com/petgraph/petgraph/pull/893)) - `StableGraph::reverse` breaks free lists ([#890](https://github.com/petgraph/petgraph/pull/890)) ### Documentation - Fix examples link in README and unify typesetting of one word ([#823](https://github.com/petgraph/petgraph/pull/823)) - Add link to multigraph definition to isomorphism algos ([#824](https://github.com/petgraph/petgraph/pull/824)) - Fix auxiliary space (and time) complexity of bron-kerbosch ([#825](https://github.com/petgraph/petgraph/pull/825)) - Fix Typo in Operator Module Documentation ([#831](https://github.com/petgraph/petgraph/pull/831)) - Sync the crate feature flags in the README and docs ([#832](https://github.com/petgraph/petgraph/pull/832)) - Remove all \[Generic\] tags from algo docstrings ([#835](https://github.com/petgraph/petgraph/pull/835)) - Fix typos in comments ([#836](https://github.com/petgraph/petgraph/pull/836)) - Revamp CONTRIBUTING.md ([#833](https://github.com/petgraph/petgraph/pull/833)) - Update `GraphMap` link in README ([#857](https://github.com/petgraph/petgraph/pull/857)) - Add doc comment for `Dot::with_attr_getters` ([#850](https://github.com/petgraph/petgraph/pull/850)) - Specify iteration order for neighbors and edges and their variants ([#790](https://github.com/petgraph/petgraph/pull/790)) - Collection of Doc fixes ([#856](https://github.com/petgraph/petgraph/pull/856)) ### New Features - Add `into_nodes_edges_iters` to `StableGraph` ([#841](https://github.com/petgraph/petgraph/pull/841)) - Add methods to reserve & shrink `StableGraph` capacity ([#846](https://github.com/petgraph/petgraph/pull/846)) - Add Dinic's Maximum Flow Algorithm ([#739](https://github.com/petgraph/petgraph/pull/739)) - make Csr::from_sorted_edges generic over edge type and properly increase edge_count in Csr::from_sorted_edges ([#861](https://github.com/petgraph/petgraph/pull/861)) - Add `map_owned` and `filter_map_owned` for `Graph` and `StableGraph` ([#863](https://github.com/petgraph/petgraph/pull/863)) - Add dijkstra::with_dynamic_goal ([#855](https://github.com/petgraph/petgraph/pull/855)) - Fix self-loop bug in all_simple_paths and enable multiple targets ([#865](https://github.com/petgraph/petgraph/pull/865)) - mark petgraph::dot::Dot::graph_fmt as public ([#866](https://github.com/petgraph/petgraph/pull/866)) - Add bidirectional Dijkstra algorithm ([#782](https://github.com/petgraph/petgraph/pull/782)) ### Performance - Make A* tie break on lower h-values ([#882](https://github.com/petgraph/petgraph/pull/882)) ### Refactor - add examples for scc algorithms and reorganize into dedicated module ([#830](https://github.com/petgraph/petgraph/pull/830)) - Remove unnecessary trait bounds from impls/methods ([#828](https://github.com/petgraph/petgraph/pull/828)) - replace uses of 'crate::util::zip' with 'core::iter::zip' ([#849](https://github.com/petgraph/petgraph/pull/849)) - Fix clippy (and other) lints ([#851](https://github.com/petgraph/petgraph/pull/851)) - Cleanup repo ([#854](https://github.com/petgraph/petgraph/pull/854)) - replace crate::util::enumerate with Iterator::enumerate ([#881](https://github.com/petgraph/petgraph/pull/881)) ### Testing - Add dependency list for 'quickcheck' feature ([#822](https://github.com/petgraph/petgraph/pull/822)) - Fix feature cfg capitalization in doctest ([#852](https://github.com/petgraph/petgraph/pull/852)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Egor Starovoitov <52821033+starovoid@users.noreply.github.com>
Petgraph provides fast, flexible graph data structures and algorithms in Rust. Supporting both directed and undirected graphs with arbitrary node and edge data. It comes with:
Multiple Graph Types: Graph, StableGraph, GraphMap, and MatrixGraph to suit various use cases.
Algorithms Included & Extensible: For tasks like path-finding, minimum spanning trees, graph isomorphisms, and more - with traits exposed for implementing custom algorithms.
Graph Visualization support: Export/import graphs to/from DOT format for visualization with Graphviz.
Supports Rust 1.64 and later. This will only change on major releases.
For more examples, see the documentation on docs.rs.
use petgraph::graph::UnGraph; use petgraph::algo::{dijkstra, min_spanning_tree}; use petgraph::data::FromElements; use petgraph::dot::{Dot, Config}; use petgraph::visit::NodeIndexable; fn main() { // Create an undirected graph with associated data // of type `i32` for the nodes and `()` for the edges. let g = UnGraph::<i32, ()>::from_edges(&[ (0, 1), (1, 2), (2, 3), (0, 3) ]); // The graph looks like this: // 0 -- 1 // | | // 3 -- 2 // Find the shortest path from `0` to `2` using `1` as the cost for every edge. let node_map = dijkstra(&g, 0.into(), Some(2.into()), |_| 1); assert_eq!(&2i32, node_map.get(&g.from_index(2)).unwrap()); // Get the minimum spanning tree of the graph as a new graph, and check that // one edge was trimmed. let mst = UnGraph::<_, _>::from_elements(min_spanning_tree(&g)); assert_eq!(g.raw_edges().len() - 1, mst.raw_edges().len()); // Output the tree to `graphviz` `DOT` format println!("{:?}", Dot::with_config(&mst, &[Config::EdgeNoLabel])); // graph { // 0 [ label = "0" ] // 1 [ label = "0" ] // 2 [ label = "0" ] // 3 [ label = "0" ] // 0 -- 1 [ ] // 2 -- 3 [ ] // 1 -- 2 [ ] // } }
petgraph is built with these features enabled by default:
graphmap - Enables GraphMap.stable_graph - Enables StableGraph.matrix_graph - Enables MatrixGraph.std - Enables the Rust Standard Library. Disabling the std feature makes it possible to use petgraph in no_std contexts.Optionally, the following features can be enabled:
serde-1 - Enables serialization for Graph, StableGraph, GraphMap using serde 1.0. Requires Rust version as required by serde.rayon - Enables parallel iterators for the underlying data in GraphMap. Requires Rust version as required by rayon.dot_parser - Enables parsing graph from DOT/Graphviz strings and files.generate - Enables graph generators.unstable - Enables unstable crate features (currently only generate). The API of functionality behind this flag is subject to change at any time.First, see if the answer to your question can be found in the API documentation. If the answer is not there, feel free to ask your question on the discussions page. We would be happy to try to answer your question. If you find a bug, or have a feature request, please open an issue.
🦕 Thanks for your help improving the project! We are so happy to have you! We have a contributing guide to help you get started.
The mascot is named “Sir Paul Rustory Graphosaurus” (close friends call him Paul). The logo has been created by the talented Aren.
Dual-licensed to be compatible with the Rust project.
Licensed under the Apache License, Version 2.0 or the MIT license, at your option. This file may not be copied, modified, or distributed except according to those terms.