Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Left-Right Planarity test. #475

Merged
merged 12 commits into from
Sep 29, 2022
1 change: 1 addition & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ Other Algorithm Functions
rustworkx.core_number
rustworkx.graph_greedy_color
rustworkx.metric_closure
rustworkx.is_planar

.. _generator_funcs:

Expand Down
12 changes: 12 additions & 0 deletions releasenotes/notes/is-planar-58bb8604ae00f1a1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
features:
- |
Implements a new function :func:`~rustworkx.is_planar` that
checks whether an undirected :class:`~rustworkx.PyGraph` is planar.

.. jupyter-execute::

import rustworkx as rx

graph = rx.generators.mesh_graph(5)
print('Is K_5 graph planar?', rx.is_planar(graph))
1 change: 1 addition & 0 deletions rustworkx-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ pub mod centrality;
pub mod connectivity;
/// Module for maximum weight matching algorithms.
pub mod max_weight_matching;
pub mod planar;
pub mod shortest_path;
pub mod traversal;
// These modules define additional data structures
Expand Down
Loading