Skip to content

Commit

Permalink
Add eq method to PySAT model
Browse files Browse the repository at this point in the history
  • Loading branch information
jmhorcas committed Oct 25, 2024
1 parent 66d09e1 commit e26d9e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flamapy/metamodels/pysat_metamodel/models/pysat_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ def get_variable(self, key: str) -> int:

def get_all_clauses(self) -> CNF:
return self._cnf

def __eq__(self, other: 'PySATModel') -> bool:
return set(self.get_all_clauses().clauses) == set(other.get_all_clauses().clauses)

0 comments on commit e26d9e2

Please sign in to comment.