@@ -1177,8 +1177,7 @@ def edge_connectivity(G,
1177
1177
return 0
1178
1178
elif vertices:
1179
1179
return [0 , [], [{}, {}]]
1180
- else :
1181
- return [0 , []]
1180
+ return [0 , []]
1182
1181
1183
1182
if implementation == " boost" :
1184
1183
from sage.graphs.base.boost_graph import edge_connectivity
@@ -1275,29 +1274,27 @@ def edge_connectivity(G,
1275
1274
if value_only:
1276
1275
return obj
1277
1276
1278
- else :
1279
- val = [obj]
1280
-
1281
- in_set = p.get_values(in_set, convert = bool , tolerance = integrality_tolerance)
1277
+ val = [obj]
1278
+ in_set = p.get_values(in_set, convert = bool , tolerance = integrality_tolerance)
1282
1279
1283
- if g.is_directed():
1284
- edges = [(u, v, l) for u, v, l in g.edge_iterator() if in_cut[u, v]]
1285
- else :
1286
- edges = [(u, v, l) for u, v, l in g.edge_iterator() if in_cut[frozenset ((u, v))]]
1280
+ if g.is_directed():
1281
+ edges = [(u, v, l) for u, v, l in g.edge_iterator() if in_cut[u, v]]
1282
+ else :
1283
+ edges = [(u, v, l) for u, v, l in g.edge_iterator() if in_cut[frozenset ((u, v))]]
1287
1284
1288
- val.append(edges)
1285
+ val.append(edges)
1289
1286
1290
- if vertices:
1291
- a = {}
1292
- b = {}
1293
- for v in g:
1294
- if in_set[0 , v]:
1295
- a.add(v)
1296
- else :
1297
- b.add(v)
1298
- val.append([a, b])
1287
+ if vertices:
1288
+ a = {}
1289
+ b = {}
1290
+ for v in g:
1291
+ if in_set[0 , v]:
1292
+ a.add(v)
1293
+ else :
1294
+ b.add(v)
1295
+ val.append([a, b])
1299
1296
1300
- return val
1297
+ return val
1301
1298
1302
1299
1303
1300
def vertex_connectivity (G , value_only = True , sets = False , k = None , solver = None , verbose = 0 ,
@@ -1503,8 +1500,7 @@ def vertex_connectivity(G, value_only=True, sets=False, k=None, solver=None, ver
1503
1500
return max (g.order() - 1 , 0 )
1504
1501
elif not sets:
1505
1502
return max (g.order() - 1 , 0 ), []
1506
- else :
1507
- return max (g.order() - 1 , 0 ), [], [[], []]
1503
+ return max (g.order() - 1 , 0 ), [], [[], []]
1508
1504
1509
1505
if value_only:
1510
1506
if G.is_directed():
@@ -3298,8 +3294,7 @@ cdef class TriconnectivitySPQR:
3298
3294
cdef _LinkedListNode * head = _LinkedList_get_head(self .highpt[v])
3299
3295
if head:
3300
3296
return head.data
3301
- else :
3302
- return 0
3297
+ return 0
3303
3298
3304
3299
cdef __del_high(self , int e_index):
3305
3300
"""
0 commit comments