Skip to content

Commit

Permalink
TEST
Browse files Browse the repository at this point in the history
  • Loading branch information
petarpetrovv committed Nov 24, 2024
1 parent bef0060 commit 860404f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
22 changes: 11 additions & 11 deletions src/mqt/qao/karp/karp_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def clique_cover(
if isinstance(input_data, str):
filename = input_data
try:
with Path.open(filename) as file:
with Path(filename).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down Expand Up @@ -350,7 +350,7 @@ def graph_coloring(
if isinstance(input_data, str):
filename = input_data
try:
with Path.open(filename) as file:
with Path(filename).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down Expand Up @@ -565,7 +565,7 @@ def vertex_cover(
if isinstance(input_data, str):
filename = input_data
try:
with Path.open(filename) as file:
with Path(filename).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down Expand Up @@ -731,7 +731,7 @@ def clique(
if isinstance(input_data, str):
filename = input_data
try:
with Path.open(filename) as file:
with Path(filename).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down Expand Up @@ -922,7 +922,7 @@ def hamiltonian_path(
if isinstance(input_data, str):
filename = input_data
try:
with Path.open(filename) as file:
with Path(filename).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down Expand Up @@ -1091,7 +1091,7 @@ def _hamiltonian_path_tsp(filename: str, cycle: bool = False, a: float = 1, b: f
for each vertex and position in the path.
"""
try:
with Path.open(filename) as file:
with Path(filename).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {filename} not found.")
Expand Down Expand Up @@ -1189,7 +1189,7 @@ def travelling_salesman(
if isinstance(input_data, str):
filename = input_data
try:
with Path.open(filename) as file:
with Path(filename).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {filename} not found.")
Expand Down Expand Up @@ -1399,7 +1399,7 @@ def independent_set(
if isinstance(input_data, str):
filename = input_data
try:
with Path.open(filename) as file:
with Path(filename).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down Expand Up @@ -1607,7 +1607,7 @@ def max_cut(
if isinstance(input_data, str):
filename = input_data
try:
with Path.open(filename) as file:
with Path(filename).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down Expand Up @@ -1729,7 +1729,7 @@ def directed_feedback_vertex_set(
if isinstance(input_data, str):
filename = input_data
try:
with Path.open(filename) as file:
with Path(filename).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down Expand Up @@ -1913,7 +1913,7 @@ def directed_feedback_edge_set(
if isinstance(input_data, str):
filename = input_data
try:
with Path.open(filename) as file:
with Path(filename).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down
12 changes: 6 additions & 6 deletions src/mqt/qao/karp/karp_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def sat(
if isinstance(input_data, str):
filename = input_data
try:
with Path.open(filename) as file:
with Path(filename).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down Expand Up @@ -217,7 +217,7 @@ def three_sat(
if isinstance(input_data, str):
filename = input_data
try:
with Path.open(filename) as file:
with Path(filename).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down Expand Up @@ -352,7 +352,7 @@ def integer_programming(
if isinstance(input_data, str):
filename = input_data
try:
with Path.open(filename) as file:
with Path(filename).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down Expand Up @@ -471,7 +471,7 @@ def knapsack(
if isinstance(input_data, str):
filename = input_data
try:
with Path.open(filename) as file:
with Path(filename).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down Expand Up @@ -596,7 +596,7 @@ def number_partition(
if isinstance(input_data, str):
filename = input_data
try:
with Path.open(filename) as file:
with Path(filename).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down Expand Up @@ -764,7 +764,7 @@ def job_sequencing(
if isinstance(input_data, str):
filename = input_data
try:
with Path.open(filename) as file:
with Path(filename).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down
10 changes: 5 additions & 5 deletions src/mqt/qao/karp/karp_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def set_cover(
if isinstance(input_data, str):
file_name = input_data
try:
with Path.open(input_data) as file:
with Path(input_data).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down Expand Up @@ -248,7 +248,7 @@ def set_packing(
if isinstance(input_data, str):
file_name = input_data
try:
with Path.open(input_data) as file:
with Path(input_data).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down Expand Up @@ -399,7 +399,7 @@ def hitting_set(
if isinstance(input_data, str):
file_name = input_data
try:
with Path.open(input_data) as file:
with Path(input_data).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down Expand Up @@ -590,7 +590,7 @@ def three_d_matching(
if isinstance(input_data, str):
try:
file_name = input_data
with Path.open(input_data) as file:
with Path(input_data).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down Expand Up @@ -788,7 +788,7 @@ def exact_cover(
if isinstance(input_data, str):
filename = input_data
try:
with Path.open(input_data) as file:
with Path(input_data).open() as file:
lines = file.readlines()
except FileNotFoundError:
print(f"Error: File {input_data} not found.")
Expand Down

0 comments on commit 860404f

Please sign in to comment.