Package fuzz :: Module fnumber :: Class TrapezoidalFuzzyNumber
[hide private]
[frames] | no frames]

Class TrapezoidalFuzzyNumber

source code

 object --+    
          |    
FuzzyNumber --+
              |
             TrapezoidalFuzzyNumber
Known Subclasses:

Trapezoidal fuzzy number class.

Instance Methods [hide private]
 
__init__(self, kernel=(0.0, 0.0), support=(0.0, 0.0))
Constructor.
source code
TrapezoidalFuzzyNumber
__add__(self, other)
Addition operation.
source code
TrapezoidalFuzzyNumber
__sub__(self, other)
Subtraction operation.
source code
 
mu(self, value)
Return the membership level of a value in the universal set domain of the fuzzy number.
source code
RealRange
alpha(self, alpha)
Alpha cut function.
source code
PolygonalFuzzyNumber
to_polygonal(self)
Convert this trapezoidal fuzzy number into a polygonal fuzzy number.
source code

Inherited from FuzzyNumber: __and__, __iand__, __ior__, __or__, __repr__, __str__, intersection, normalize, union

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Static Methods [hide private]

Inherited from FuzzyNumber (private): _binary_sanity_check

Class Variables [hide private]

Inherited from FuzzyNumber: height, kernel, support

Properties [hide private]
bool triangular
Report if this is a triangular fuzzy number (kernel has zero size).

Inherited from object: __class__

Method Details [hide private]

__init__(self, kernel=(0.0, 0.0), support=(0.0, 0.0))
(Constructor)

source code 

Constructor.

Parameters:
  • kernel (tuple) - The kernel of the fuzzy number.
  • support (tuple) - The support of the fuzzy number.
Overrides: object.__init__

__add__(self, other)
(Addition operator)

source code 

Addition operation.

Parameters:
Returns: TrapezoidalFuzzyNumber
Sum of the trapezoidal fuzzy numbers.

__sub__(self, other)
(Subtraction operator)

source code 

Subtraction operation.

Parameters:
Returns: TrapezoidalFuzzyNumber
Difference of the trapezoidal fuzzy numbers.

mu(self, value)

source code 

Return the membership level of a value in the universal set domain of the fuzzy number.

Parameters:
  • value (float) - A value in the universal set.
Overrides: FuzzyNumber.mu

alpha(self, alpha)

source code 

Alpha cut function. Returns the interval within the fuzzy number whose membership levels meet or exceed the alpha value.

Parameters:
  • alpha (float) - The alpha value for the cut in [0, 1].
Returns: RealRange
The alpha cut interval.

to_polygonal(self)

source code 

Convert this trapezoidal fuzzy number into a polygonal fuzzy number.

Returns: PolygonalFuzzyNumber
Result polygonal fuzzy number.
Overrides: FuzzyNumber.to_polygonal

Property Details [hide private]

triangular

Report if this is a triangular fuzzy number (kernel has zero size).

Get Method:
unreachable.triangular(self) - Report if this is a triangular fuzzy number (kernel has zero size).
Type:
bool