Skip to content

Commit

Permalink
adding probor OR fuzzy operator
Browse files Browse the repository at this point in the history
  • Loading branch information
sspola committed Nov 21, 2022
1 parent c97b723 commit b455956
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions simpful/rule_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def __init__(self, fun, A, B, operators=None):
self._B = B

if fun=="NOT":
if B == "": raise Exception("OMG")
elif A == "": raise Exception("OMG")
if B == "": raise Exception("Second operand missing")
elif A == "": raise Exception("First operand missing")

if operators is None:
self._fun = fun
Expand Down Expand Up @@ -71,6 +71,7 @@ def __repr__(self):

# basic definitions of
def OR(x,y): return max(x, y)
def OR_p(x,y): return x+y-(x*y)
def AND(x,y): return min(x, y)
def AND_p(x,y): return x*y
def NOT(x): return 1.-x
Expand Down

0 comments on commit b455956

Please sign in to comment.