Closed imSanko closed 2 months ago
>>> sheru = FuzzySet("Sheru", 0.4, 1, 0.6) >>> sheru FuzzySet(name='Sheru', left_boundary=0.4, peak=1, right_boundary=0.6) >>> str(sheru) 'Sheru: [0.4, 1, 0.6]' >>> siya = FuzzySet("Siya", 0.5, 1, 0.7) >>> siya FuzzySet(name='Siya', left_boundary=0.5, peak=1, right_boundary=0.7) # Complement Operation >>> sheru.complement() FuzzySet(name='¬Sheru', left_boundary=0.4, peak=0.6, right_boundary=0) >>> siya.complement() # doctest: +NORMALIZE_WHITESPACE FuzzySet(name='¬Siya', left_boundary=0.30000000000000004, peak=0.5, right_boundary=0) # Intersection Operation >>> siya.intersection(sheru) FuzzySet(name='Siya ∩ Sheru', left_boundary=0.5, peak=0.6, right_boundary=1.0) # Membership Operation >>> sheru.membership(0.5) 0.16666666666666663 >>> sheru.membership(0.6) 0.0 # Union Operations >>> siya.union(sheru) FuzzySet(name='Siya U Sheru', left_boundary=0.4, peak=0.7, right_boundary=1.0) """ Need to add more !
Adding more tests will make it more enhanced.
What would you like to share?
Additional information
Adding more tests will make it more enhanced.