Skip to content

Commit

Permalink
added release notes for the reverse_inplace function
Browse files Browse the repository at this point in the history
  • Loading branch information
matanco64 committed Apr 5, 2023
1 parent 1aa2a9a commit e653082
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
features:
- |
The :class:`~rustworkx.PyDiGraph` class has a new method
:meth:`~rustworkx.PyDiGraph.reverse_inplace``. This function reverses the edges in the graph, inplace.
For example:
import rustworkx as rx
graph = rx.PyDiGraph()
graph.add_nodes_from(range(4))
graph.add_edge(0, 1, 3)
graph.add_edge(1, 2, 5)
graph.add_edge(2, 3, 2)
graph.reverse_inplace()
assert graph.edge_list() == [(3, 2), (2, 1), (1, 0)]

0 comments on commit e653082

Please sign in to comment.