MCPcopy Create free account
hub / github.com/easy-graph/Easy-Graph / test_deg_group

Function test_deg_group

easygraph/classes/tests/test_hypergraph.py:322–331  ·  view source on GitHub ↗
(g1)

Source from the content-addressed store, hash-verified

320
321
322def test_deg_group(g1):
323 assert g1.deg_v == [2, 2, 2, 1, 1, 1]
324 assert g1.deg_e == [4, 2, 3]
325 g1.add_hyperedges([0, 2], 1, group_name="knn")
326 assert g1.deg_v == [3, 2, 3, 1, 1, 1]
327 assert g1.deg_e == [4, 2, 3, 2]
328 assert g1.deg_v_of_group("main") == [2, 2, 2, 1, 1, 1]
329 assert g1.deg_e_of_group("main") == [4, 2, 3]
330 assert g1.deg_v_of_group("knn") == [1, 0, 1, 0, 0, 0]
331 assert g1.deg_e_of_group("knn") == [2]
332
333
334def test_nbr(g1, g2):

Callers

nothing calls this directly

Calls 3

deg_v_of_groupMethod · 0.80
deg_e_of_groupMethod · 0.80
add_hyperedgesMethod · 0.45

Tested by

no test coverage detected