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

Class FuzzyNumber

source code

object --+
         |
        FuzzyNumber
Known Subclasses:

Fuzzy number class (abstract base class for all fuzzy numbers).

Instance Methods [hide private]
 
__init__(self)
Constructor.
source code
str
__repr__(self)
Return the canonical representation of a fuzzy number.
source code
str
__str__(self)
Return the string representation of a fuzzy number.
source code
 
mu(self, value)
Return the membership level of a value in the universal set domain of the fuzzy number.
source code
 
normalize(self)
Normalize this fuzzy number, so that its height is equal to 1.0.
source code
PolygonalFuzzyNumber
to_polygonal(self)
Convert this fuzzy number into a polygonal fuzzy number.
source code
FuzzyNumber
__or__(self, other)
Return the standard fuzzy union of two polygonal fuzzy numbers.
source code
FuzzyNumber
__ior__(self, other)
In-place standard fuzzy union.
source code
PolygonalFuzzyNumber
union(self, other)
Return the standard fuzzy union of two fuzzy numbers as a new polygonal fuzzy number.
source code
FuzzyNumber
__and__(self, other)
Return the standard fuzzy intersection of two fuzzy numbers.
source code
FuzzyNumber
__iand__(self, other)
In-place standard fuzzy intersection.
source code
PolygonalFuzzyNumber
intersection(self, other)
Return the standard fuzzy intersection of two fuzzy numbers as a new polygonal fuzzy number.
source code

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

Static Methods [hide private]
 
_binary_sanity_check(other)
Check that the other argument to a binary operation is also a fuzzy number, raising a TypeError otherwise.
source code
Class Variables [hide private]
  kernel = None
hash(x)
  support = None
hash(x)
  height = None
hash(x)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Constructor. Not to be instantiated directly.

Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

Return the canonical representation of a fuzzy number.

Returns: str
Canonical representation.
Overrides: object.__repr__

__str__(self)
(Informal representation operator)

source code 

Return the string representation of a fuzzy number.

Returns: str
String representation.
Overrides: object.__str__

_binary_sanity_check(other)
Static Method

source code 

Check that the other argument to a binary operation is also a fuzzy number, raising a TypeError otherwise.

Parameters:

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.

to_polygonal(self)

source code 

Convert this fuzzy number into a polygonal fuzzy number.

Returns: PolygonalFuzzyNumber
Result polygonal fuzzy number.

__or__(self, other)
(Or operator)

source code 

Return the standard fuzzy union of two polygonal fuzzy numbers.

Parameters:
Returns: FuzzyNumber
The fuzzy union.

__ior__(self, other)

source code 

In-place standard fuzzy union.

Parameters:
Returns: FuzzyNumber
The fuzzy union (self).

union(self, other)

source code 

Return the standard fuzzy union of two fuzzy numbers as a new polygonal fuzzy number.

Parameters:
Returns: PolygonalFuzzyNumber
The fuzzy union.

__and__(self, other)
(And operator)

source code 

Return the standard fuzzy intersection of two fuzzy numbers.

Parameters:
Returns: FuzzyNumber
The fuzzy intersection.

__iand__(self, other)

source code 

In-place standard fuzzy intersection.

Parameters:
Returns: FuzzyNumber
The fuzzy intersection (self).

intersection(self, other)

source code 

Return the standard fuzzy intersection of two fuzzy numbers as a new polygonal fuzzy number.

Parameters:
Returns: PolygonalFuzzyNumber
The fuzzy union.