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

Function test_nbr_group

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

Source from the content-addressed store, hash-verified

339
340
341def test_nbr_group(g1):
342 assert g1.nbr_v(1) == [0, 1]
343 assert g1.nbr_e(0) == [0, 1]
344 g1.add_hyperedges([[0, 1]], group_name="knn")
345 assert g1.nbr_v(1) == [0, 1]
346 assert g1.nbr_e(1) == [0, 1, 3]
347 assert g1.nbr_v_of_group(1, "main") == [0, 1]
348 assert g1.nbr_e_of_group(2, "main") == [0, 2]
349 assert g1.nbr_v_of_group(0, "knn") == [0, 1]
350 assert g1.nbr_e_of_group(1, "knn") == [0]
351
352
353def test_clone(g1):

Callers

nothing calls this directly

Calls 5

nbr_eMethod · 0.80
nbr_v_of_groupMethod · 0.80
nbr_e_of_groupMethod · 0.80
nbr_vMethod · 0.45
add_hyperedgesMethod · 0.45

Tested by

no test coverage detected