mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
balance parenthesis (add closing bracket) (#11563)
* balance parenthesis (add closing bracket) * Apply suggestions from code review --------- Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
This commit is contained in:
parent
50cc00bb2d
commit
9b5641d2d3
|
@ -28,7 +28,7 @@ if __name__ == "__main__":
|
||||||
union = fuzz.fuzzy_or(X, young, X, middle_aged)[1]
|
union = fuzz.fuzzy_or(X, young, X, middle_aged)[1]
|
||||||
# 2. Intersection = min(µA(x), µB(x))
|
# 2. Intersection = min(µA(x), µB(x))
|
||||||
intersection = fuzz.fuzzy_and(X, young, X, middle_aged)[1]
|
intersection = fuzz.fuzzy_and(X, young, X, middle_aged)[1]
|
||||||
# 3. Complement (A) = (1- min(µA(x))
|
# 3. Complement (A) = (1 - min(µA(x)))
|
||||||
complement_a = fuzz.fuzzy_not(young)
|
complement_a = fuzz.fuzzy_not(young)
|
||||||
# 4. Difference (A/B) = min(µA(x),(1- µB(x)))
|
# 4. Difference (A/B) = min(µA(x),(1- µB(x)))
|
||||||
difference = fuzz.fuzzy_and(X, young, X, fuzz.fuzzy_not(middle_aged)[1])[1]
|
difference = fuzz.fuzzy_and(X, young, X, fuzz.fuzzy_not(middle_aged)[1])[1]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user