예제 #1
0
def test_hypergraph_static(seven_by_six):
    sbs = seven_by_six
    H = Hypergraph(sbs.edges, static=True)
    assert len(H.edges) == 6
    assert len(H.nodes) == 7
    assert H.get_id("E") == 3
    assert list(H.get_linegraph(s=1)) == [0, 1, 2, 3, 4, 5]
예제 #2
0
def test_static_hypergraph_get_linegraph(lesmis):
    H = Hypergraph(lesmis.edgedict, static=True)
    assert H.shape == (40, 8)
    G = H.get_linegraph(edges=True, s=2)
    assert G.number_of_edges, G.number_of_nodes == (8, 8)