MCPcopy Create free account
hub / github.com/alibaba/GraphScope / complete_graph

Function complete_graph

python/graphscope/nx/generators/classic.py:144–153  ·  view source on GitHub ↗
(n, create_using=None)

Source from the content-addressed store, hash-verified

142@nodes_or_number(0)
143@patch_docstring(nxa.complete_graph)
144def complete_graph(n, create_using=None):
145 n_name, nodes = n
146 G = empty_graph(n_name, create_using)
147 if len(nodes) > 1:
148 if G.is_directed():
149 edges = itertools.permutations(nodes, 2)
150 else:
151 edges = itertools.combinations(nodes, 2)
152 G.add_edges_from(edges)
153 return G
154
155
156@patch_docstring(nxa.circular_ladder_graph)

Callers 6

tetrahedral_graphFunction · 0.90
gnp_random_graphFunction · 0.90
dense_gnm_random_graphFunction · 0.90
gnm_random_graphFunction · 0.90
barbell_graphFunction · 0.85
lollipop_graphFunction · 0.85

Calls 3

empty_graphFunction · 0.85
add_edges_fromMethod · 0.80
is_directedMethod · 0.45

Tested by

no test coverage detected