Skip to content

Commit

Permalink
🎨 pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Nov 26, 2024
1 parent 349bd74 commit ba68842
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/mqt/qao/karp/karp_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,7 @@ def three_sat(
return output_dict

@staticmethod
def check_three_sat_solution(
clauses: list[list[str]], solution: dict[str, float]
) -> dict[Any, Any]:
def check_three_sat_solution(clauses: list[list[str]], solution: dict[str, float]) -> dict[Any, Any]:
"""Validates a solution for the 3-SAT problem by checking clause satisfaction."""
not_satisfied_clauses = []

Expand Down
16 changes: 10 additions & 6 deletions src/mqt/qao/karp/karp_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,9 @@ def set_packing(
return solution_sets

@staticmethod
def check_set_packing_solution(all_sets: list[tuple[int, list[int]]], solution: list[tuple[int, list[int]]]) -> dict[Any, Any]:
def check_set_packing_solution(
all_sets: list[tuple[int, list[int]]], solution: list[tuple[int, list[int]]]
) -> dict[Any, Any]:
"""Validates a set packing solution by ensuring no sets overlap.
Args:
Expand Down Expand Up @@ -525,9 +527,7 @@ def hitting_set(
pass

@staticmethod
def check_hitting_set_solution(
sets: list[tuple[int, list[int]]], solution: list[int]
) -> dict[Any, Any]:
def check_hitting_set_solution(sets: list[tuple[int, list[int]]], solution: list[int]) -> dict[Any, Any]:
"""Validates a hitting set solution by ensuring that each set is "hit" by at least one element in the solution.
Args:
Expand Down Expand Up @@ -717,7 +717,9 @@ def three_d_matching(
pass

@staticmethod
def check_three_d_matching(x: list[int], y: list[int], z: list[int], solution: list[tuple[int, int, int]]) -> dict[Any, Any]:
def check_three_d_matching(
x: list[int], y: list[int], z: list[int], solution: list[tuple[int, int, int]]
) -> dict[Any, Any]:
"""Validates a 3D matching solution by ensuring each element in the solution matches exactly one element
from each of the sets x, y, and z, and that there are no repeated or mismatched elements.
Expand Down Expand Up @@ -906,7 +908,9 @@ def exact_cover(
return solution_sets

@staticmethod
def check_exact_cover_solution(sets: list[tuple[int, list[int]]], solution: list[tuple[int, list[int]]]) -> dict[Any, Any]:
def check_exact_cover_solution(
sets: list[tuple[int, list[int]]], solution: list[tuple[int, list[int]]]
) -> dict[Any, Any]:
"""Validates an exact cover solution by ensuring each element is covered exactly once
and that there are no overlapping or missing elements.
Expand Down

0 comments on commit ba68842

Please sign in to comment.