rm CondaPkg environment
This commit is contained in:
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
.CondaPkg/env/Lib/site-packages/networkx/algorithms/components/__pycache__/connected.cpython-311.pyc
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -101,6 +101,7 @@ def number_connected_components(G):
|
||||
return sum(1 for cc in connected_components(G))
|
||||
|
||||
|
||||
@nx._dispatch
|
||||
@not_implemented_for("directed")
|
||||
def is_connected(G):
|
||||
"""Returns True if the graph is connected, False otherwise.
|
||||
@@ -146,6 +147,7 @@ def is_connected(G):
|
||||
return sum(1 for node in _plain_bfs(G, arbitrary_element(G))) == len(G)
|
||||
|
||||
|
||||
@nx._dispatch
|
||||
@not_implemented_for("directed")
|
||||
def node_connected_component(G, n):
|
||||
"""Returns the set of nodes in the component of graph containing node n.
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+6
-2
@@ -3,6 +3,7 @@ import pytest
|
||||
import networkx as nx
|
||||
from networkx import NetworkXNotImplemented
|
||||
from networkx import convert_node_labels_to_integers as cnlti
|
||||
from networkx.classes.tests import dispatch_interface
|
||||
|
||||
|
||||
class TestConnected:
|
||||
@@ -60,9 +61,12 @@ class TestConnected:
|
||||
C = []
|
||||
cls.gc.append((G, C))
|
||||
|
||||
def test_connected_components(self):
|
||||
# This additionally tests the @nx._dispatch mechanism, treating
|
||||
# nx.connected_components as if it were a re-implementation from another package
|
||||
@pytest.mark.parametrize("wrapper", [lambda x: x, dispatch_interface.convert])
|
||||
def test_connected_components(self, wrapper):
|
||||
cc = nx.connected_components
|
||||
G = self.G
|
||||
G = wrapper(self.G)
|
||||
C = {
|
||||
frozenset([0, 1, 2, 3]),
|
||||
frozenset([4, 5, 6, 7, 8, 9]),
|
||||
|
||||
+1
@@ -104,6 +104,7 @@ def number_weakly_connected_components(G):
|
||||
return sum(1 for wcc in weakly_connected_components(G))
|
||||
|
||||
|
||||
@nx._dispatch
|
||||
@not_implemented_for("undirected")
|
||||
def is_weakly_connected(G):
|
||||
"""Test directed graph for weak connectivity.
|
||||
|
||||
Reference in New Issue
Block a user