def cyclic_graphs(self, max_nodes): graph_list = [] for n in range(8, max_nodes + 1): g = cycle_graph(n) g.name = 'C{}'.format(n) graph_list.append(g) return graph_list
def test_k_factor_trivial(self): g = gen.cycle_graph(4) f = reg.k_factor(g, 2) assert g.edges == f.edges
def test_is_k_regular1(self): g = gen.cycle_graph(4) assert reg.is_k_regular(g, 2) assert not reg.is_k_regular(g, 3)
def test_is_regular1(self): g = gen.cycle_graph(4) assert reg.is_regular(g)
def test_pentamer(self): pent = cycle_graph(5) self.assertEqual(isomorphism_checker(pent), "G38")
def test_octomer(self): octamer = cycle_graph(8) self.assertEqual( isomorphism_checker(octamer, graph_list=self.graph_list), "C8")