Package fuzzy :: Package set :: Module ZFunction :: Class ZFunction
[hide private]
[frames] | no frames]

Class ZFunction

source code


Realize a Z-shaped fuzzy set:

      __
        \
        |\
        | \
        | |\
        | | \__
        | a |
        |   |
       2*delta

see also http://pyfuzzy.sourceforge.net/demo/set/ZFunction.png

Instance Methods [hide private]
 
__init__(self, a=0.0, delta=1.0)
Initialize a Z-shaped fuzzy set.
source code
float
__call__(self, x)
Return membership of x in this fuzzy set.
source code

Inherited from SFunction.SFunction: __repr__, getCOG, getValuesX

Inherited from Set.Set: getValuesXY

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

Class Variables [hide private]

Inherited from Function.Function (private): _resolution

Instance Variables [hide private]
float a
center of set.
float delta
absolute distance between x-values for minimum and maximum.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, a=0.0, delta=1.0)
(Constructor)

source code 

Initialize a Z-shaped fuzzy set.

Parameters:
  • a (float) - center of set
  • delta (float) - absolute distance between x-values for minimum and maximum
Overrides: object.__init__

__call__(self, x)
(Call operator)

source code 

Return membership of x in this fuzzy set. This method makes the set work like a function.

Parameters:
  • x (float) - value for which the membership is to calculate
Returns: float
membership
Overrides: Set.Set.__call__