Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Specify the input format to Graph
Browse files Browse the repository at this point in the history
  • Loading branch information
antonio-rojas committed Mar 14, 2022
1 parent 66a1fe8 commit 2a7fa3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sage/graphs/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -4166,7 +4166,7 @@ def weight(x):
else:
return Integer(len(d))
else:
return EdgesView(Graph([(u, v, L[frozenset((u, v))]) for u, v in d]))
return EdgesView(Graph([(u, v, L[frozenset((u, v))]) for u, v in d], format='list_of_edges'))

elif algorithm == "LP":
g = self
Expand All @@ -4193,7 +4193,7 @@ def weight(x):
else:
return Integer(sum(1 for fe in L if b[fe]))
else:
return EdgesView(Graph([(u, v, L[frozenset((u, v))]) for u, v in L if b[frozenset((u, v))]]))
return EdgesView(Graph([(u, v, L[frozenset((u, v))]) for u, v in L if b[frozenset((u, v))]], format='list_of_edges'))

else:
raise ValueError('algorithm must be set to either "Edmonds" or "LP"')
Expand Down

0 comments on commit 2a7fa3c

Please sign in to comment.