Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fuzzy functions - and,xor,not,or #35

Closed
rspadim opened this issue Jun 9, 2017 · 1 comment
Closed

fuzzy functions - and,xor,not,or #35

rspadim opened this issue Jun 9, 2017 · 1 comment
Labels

Comments

@rspadim
Copy link

rspadim commented Jun 9, 2017

hi guys, could you include fuzzy functions as default?

def fuzzy_not(x):
return np.minimum(1,np.maximum(0,1-x))
def fuzzy_and(x,y):
return np.minimum(1,np.maximum(0,x*y))
def fuzzy_or(x,y):
return np.minimum(1,np.maximum(0,x+y/2))
def fuzzy_xor(x,y):
return np.minimum(1,np.maximum(0,0.5 - 2 * (x - 0.5) * (y - 0.5)))

@trevorstephens
Copy link
Owner

As these are not straight-forward functions, and probably for a very constrained use-case, this looks like a perfect candidate for the user-defined functions #18 feature to be implemented by the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants