rm CondaPkg environment

This commit is contained in:
ton
2023-04-06 13:53:47 +07:00
parent 0a57ed7884
commit c43d949309
3329 changed files with 5725 additions and 447022 deletions

View File

@@ -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.

View File

@@ -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]),

View File

@@ -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.