summaryrefslogtreecommitdiff
path: root/networkx/algorithms/boundary.py
diff options
context:
space:
mode:
authorJim Kitchen <jim22k@gmail.com>2022-10-06 15:12:37 -0500
committerMridul Seth <git@mriduls.com>2022-10-12 12:05:14 +0400
commit71434d674cf8ec6c3007dd41b78ee6f407e9b4eb (patch)
tree2a21038cf9ada28a92ae3dfab4b0aab5a06140cd /networkx/algorithms/boundary.py
parentdb7fea7fcbb2470e80e785454e7e71f1a3f80200 (diff)
downloadnetworkx-71434d674cf8ec6c3007dd41b78ee6f407e9b4eb.tar.gz
Dispatch more algorithms and improve auto-test capabilities
Diffstat (limited to 'networkx/algorithms/boundary.py')
-rw-r--r--networkx/algorithms/boundary.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/networkx/algorithms/boundary.py b/networkx/algorithms/boundary.py
index 25c1e286..c74f47e9 100644
--- a/networkx/algorithms/boundary.py
+++ b/networkx/algorithms/boundary.py
@@ -8,11 +8,13 @@ A node boundary of a set *S* of nodes is the set of (out-)neighbors of
nodes in *S* that are outside *S*.
"""
+import networkx as nx
from itertools import chain
__all__ = ["edge_boundary", "node_boundary"]
+@nx.dispatch("edge_boundary")
def edge_boundary(G, nbunch1, nbunch2=None, data=False, keys=False, default=None):
"""Returns the edge boundary of `nbunch1`.
@@ -89,6 +91,7 @@ def edge_boundary(G, nbunch1, nbunch2=None, data=False, keys=False, default=None
)
+@nx.dispatch("node_boundary")
def node_boundary(G, nbunch1, nbunch2=None):
"""Returns the node boundary of `nbunch1`.