示例#1
0
 def test_case_7(self):
     assert vertex_coloring(
         graph=[
             [False, True, True, True],
             [True, False, True, False],
             [True, True, False, True],
             [True, False, True, False],
         ],
         m=3,
     ) == {(1, 2, 3, 2), (2, 1, 3, 1), (3, 1, 2, 1)}
示例#2
0
 def test_case_6(self):
     assert (vertex_coloring(
         graph=[
             [False, True, True, True],
             [True, False, True, True],
             [True, True, False, True],
             [True, True, True, False],
         ],
         m=3,
     ) == set())
示例#3
0
 def test_case_1(self):
     assert vertex_coloring(graph=[[False, True], [True, False]], m=2) == {
         (1, 2),
         (2, 1),
     }
示例#4
0
 def test_when_graph_has_one_node(self):
     assert vertex_coloring(graph=[[False]], m=1) == {(1, )}
示例#5
0
 def test_case_2(self):
     assert vertex_coloring(graph=[[False, True], [True, False]],
                            m=1) == set()