From f4d3071306e34313a1ff34e1caff4d092ff6b953 Mon Sep 17 00:00:00 2001 From: Ivan Carvalho Date: Wed, 18 Oct 2023 18:59:14 -0400 Subject: [PATCH] Add new bipartite methods --- rustworkx/__init__.pyi | 4 ++++ rustworkx/coloring.pyi | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/rustworkx/__init__.pyi b/rustworkx/__init__.pyi index 32e64ddfa..169b0f1b3 100644 --- a/rustworkx/__init__.pyi +++ b/rustworkx/__init__.pyi @@ -31,6 +31,10 @@ from .centrality import graph_katz_centrality as graph_katz_centrality from .coloring import graph_greedy_color as graph_greedy_color from .coloring import graph_greedy_edge_color as graph_greedy_edge_color +from .coloring import graph_is_bipartite as graph_is_bipartite +from .coloring import digraph_is_bipartite as digraph_is_bipartite +from .coloring import graph_two_color as graph_two_color +from .coloring import digraph_two_color as digraph_two_color from .connectivity import connected_components as connected_components from .connectivity import is_connected as is_connected diff --git a/rustworkx/coloring.pyi b/rustworkx/coloring.pyi index 94583da56..ee8159cd1 100644 --- a/rustworkx/coloring.pyi +++ b/rustworkx/coloring.pyi @@ -10,6 +10,11 @@ # For implementation details, see __init__.py and src/coloring.rs from .graph import PyGraph +from .digraph import PyDiGraph def graph_greedy_color(graph: PyGraph, /) -> dict[int, int]: ... def graph_greedy_edge_color(graph: PyGraph, /) -> dict[int, int]: ... +def graph_is_bipartite(graph: PyGraph) -> bool: ... +def digraph_is_bipartite(graph: PyDiGraph) -> bool: ... +def graph_two_color(graph: PyGraph) -> dict[int, int]: ... +def digraph_two_color(graph: PyDiGraph) -> dict[int, int]: ... \ No newline at end of file