(g1, g2)
| 638 | |
| 639 | |
| 640 | def test_N(g1, g2): |
| 641 | import torch |
| 642 | |
| 643 | assert (g1.N_v(0).cpu() == torch.tensor([0, 1, 2, 5])).all() |
| 644 | assert (g1.N_e(2).cpu() == torch.tensor([0, 2])).all() |
| 645 | assert (g2.N_v(1).cpu() == torch.tensor([0, 1, 3])).all() |
| 646 | assert (g2.N_e(3).cpu() == torch.tensor([0, 1, 3, 4])).all() |
| 647 | |
| 648 | |
| 649 | def test_N_group(g1): |