Skip to content

Commit

Permalink
Merge pull request #34 from MHenderson/30-remove-some-unnecessary-code
Browse files Browse the repository at this point in the history
Remove a pointless list expression
  • Loading branch information
MHenderson authored Dec 9, 2024
2 parents 59675e5 + 275800a commit ca73b8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "vizing"
version = "0.2.1"
version = "0.2.1.9000"
description = "Constraint-based list-colouring in Python."
authors = ["Matthew Henderson <[email protected]>"]
readme = "README.md"
Expand Down
4 changes: 2 additions & 2 deletions src/vizing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def edge_list_colouring_problem(G, directed = False):
P.addVariable(edge, G.edges[edge]['permissible'])
if(directed):
for node in G.nodes():
P.addConstraint(ct.AllDifferentConstraint(), [x for x in G.out_edges(node)])
P.addConstraint(ct.AllDifferentConstraint(), [x for x in G.in_edges(node)])
P.addConstraint(ct.AllDifferentConstraint(), G.out_edges(node))
P.addConstraint(ct.AllDifferentConstraint(), G.in_edges(node))
else:
for node in G.nodes():
P.addConstraint(ct.AllDifferentConstraint(), [tuple(sorted(x)) for x in G.edges(node)])
Expand Down

0 comments on commit ca73b8d

Please sign in to comment.