@@ -331,6 +331,10 @@ def orientations(G, data_structure=None, sparse=None):
331331 sage: G.set_embedding(embedding)
332332 sage: next(G.orientations()).get_embedding() == embedding
333333 True
334+ sage: G = Graph()
335+ sage: G.set_embedding({})
336+ sage: next(G.orientations()).get_embedding() == {}
337+ True
334338 """
335339 if sparse is not None :
336340 if data_structure is not None :
@@ -1085,19 +1089,18 @@ def minimum_outdegree_orientation(G, use_edge_labels=False, solver=None, verbose
10851089 Show the influence of edge labels on the solution::
10861090
10871091 sage: # needs sage.numerical.mip
1088- sage: g = graphs.CycleGraph(4)
1089- sage: g.add_edge(0, 2)
1092+ sage: g = graphs.PetersenGraph()
10901093 sage: o = g.minimum_outdegree_orientation(use_edge_labels=False)
1091- sage: o.out_degree(labels=True) == {0: 1, 1: 2, 2: 1, 3: 1}
1092- True
1094+ sage: max( o.out_degree())
1095+ 2
10931096 sage: _ = [g.set_edge_label(u, v, 1) for u, v in g.edge_iterator(labels=False)]
10941097 sage: o = g.minimum_outdegree_orientation(use_edge_labels=True)
1095- sage: o.out_degree(labels=True) == {0: 1, 1: 2, 2: 1, 3: 1}
1096- True
1097- sage: g.set_edge_label(0, 2, 10 )
1098+ sage: max( o.out_degree())
1099+ 2
1100+ sage: g.set_edge_label(0, 1, 100 )
10981101 sage: o = g.minimum_outdegree_orientation(use_edge_labels=True)
1099- sage: o.out_degree(labels=True) == {0: 1, 1: 2, 2: 0, 3: 2}
1100- True
1102+ sage: max( o.out_degree())
1103+ 3
11011104
11021105 TESTS::
11031106
0 commit comments