Package fuzz :: Module fset :: Class FuzzyElement
[hide private]
[frames] | no frames]

Class FuzzyElement

source code

object --+
         |
        FuzzyElement

Fuzzy element class.

Instance Methods [hide private]
 
__init__(self, obj, mu=1.0)
Constructor.
source code
string
__repr__(self)
Return string representation of a fuzzy element.
source code
string
__str__(self)
Return string representation of a fuzzy element.
source code
int
__hash__(self)
Return a hash for the fuzzy element which is the hash of its object.
source code
bool
__eq__(self, other)
Equality operator.
source code
bool
__ne__(self, other)
Inequality operator.
source code

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

Properties [hide private]
  mu
  obj

Inherited from object: __class__

Method Details [hide private]

__init__(self, obj, mu=1.0)
(Constructor)

source code 

Constructor.

Parameters:
  • obj (object) - The object for this member.
  • mu (float) - The membership degree of this member.
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

Return string representation of a fuzzy element.

Returns: string
String representation.
Overrides: object.__repr__

__str__(self)
(Informal representation operator)

source code 

Return string representation of a fuzzy element.

Returns: string
String representation.
Overrides: object.__str__

__hash__(self)
(Hashing function)

source code 

Return a hash for the fuzzy element which is the hash of its object.

Returns: int
The hash.
Overrides: object.__hash__

__eq__(self, other)
(Equality operator)

source code 

Equality operator. Note that, because this also checks for equality of membership values, fuzzy sets must verify the uniqueness of obj (this is handled by setting the index attribute of IndexedSet to 'obj').

Parameters:
Returns: bool
True if equal, false otherwise.

__ne__(self, other)

source code 

Inequality operator.

Parameters:
Returns: bool
True if not equal, false otherwise.