Calculate the complement (negation) of this fuzzy set. Returns: FuzzySet: A new fuzzy set representing the complement. >>> FuzzySet("fuzzy_set", 0.1, 0.2, 0.3).complement() FuzzySet(name='¬fuzzy_set', left_boundary=0.7, peak=0.9, right_boundary=0.8)
(self)
| 75 | ) |
| 76 | |
| 77 | def complement(self) -> FuzzySet: |
| 78 | """ |
| 79 | Calculate the complement (negation) of this fuzzy set. |
| 80 | Returns: |
| 81 | FuzzySet: A new fuzzy set representing the complement. |
| 82 | |
| 83 | >>> FuzzySet("fuzzy_set", 0.1, 0.2, 0.3).complement() |
| 84 | FuzzySet(name='¬fuzzy_set', left_boundary=0.7, peak=0.9, right_boundary=0.8) |
| 85 | """ |
| 86 | return FuzzySet( |
| 87 | f"¬{self.name}", |
| 88 | 1 - self.right_boundary, |
| 89 | 1 - self.left_boundary, |
| 90 | 1 - self.peak, |
| 91 | ) |
| 92 | |
| 93 | def intersection(self, other) -> FuzzySet: |
| 94 | """ |
no test coverage detected