Skip to content

Commit

Permalink
MAINT: class rename
Browse files Browse the repository at this point in the history
Signed-off-by: naweedkhan <naweed.khan@ibm.com>
  • Loading branch information
NaweedAghmad committed Nov 30, 2023
1 parent b303d26 commit cca354d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions lnn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from . import symbolic
from .symbolic.logic import (
And,
Congruent,
Equal,
Iff,
Exists,
Forall,
Expand All @@ -32,7 +32,7 @@
Predicates,
Variable,
Variables,
XOr,
Xor,
)
from .model import Model
from .constants import Fact, World, Direction, Loss
Expand All @@ -47,7 +47,7 @@
"truth_table",
"truth_table_dict",
"And",
"Congruent",
"Equal",
"Direction",
"Iff",
"Exists",
Expand All @@ -67,5 +67,5 @@
"Fact",
"World",
"Loss",
"XOr",
"Xor",
]
6 changes: 2 additions & 4 deletions lnn/symbolic/logic/formula.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,8 @@ def is_equal(self, other: "Formula") -> bool:
return True
result = list()
for f in self.congruent_nodes:
if _isinstance(f, "Congruent"):
result += [
other.structure == operand.structure for operand in f.operands
]
if _isinstance(f, "Equal"):
result += [other.syntax == operand.syntax for operand in f.operands]
return any(result)

def is_unweighted(self) -> bool:
Expand Down

0 comments on commit cca354d

Please sign in to comment.