fuzzy :: set :: Singleton :: Singleton :: Class Singleton
[hide private]
[frames] | no frames]

Class Singleton

source code


This set represents a non-fuzzy number.

Its membership is only for x equal 1.:

         *
         |
         |
         |
    -----+-----
         x

See also http://pyfuzzy.sourceforge.net/demo/set/Singleton.png

Instance Methods [hide private]
 
__init__(self, x=0.0)
Initialize with given sorted list of (x,y) values
source code
 
_update(self)
update polygon
source code
float
__call__(self, x)
Get membership of value x.
source code
float
getCOG(self)
Return center of gravity.
source code
 
add(self, x, y, where=1)
Don't let anyone destroy our singleton.
source code
 
remove(self, x, where=1)
Don't let anyone destroy our singleton.
source code
 
clear(self)
Don't let anyone destroy our singleton.
source code
string
__repr__(self)
Return representation of instance.
source code

Inherited from Polygon.Polygon: getValuesX, getValuesXY

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

Class Variables [hide private]

Inherited from Polygon.Polygon: BEGIN, END, X, Y

Properties [hide private]
float x
x

Inherited from Polygon.Polygon: points

Inherited from object: __class__

Method Details [hide private]

__init__(self, x=0.0)
(Constructor)

source code 

Initialize with given sorted list of (x,y) values

Parameters:
  • points - sorted list of 2-tuples of (x,y) values
Overrides: object.__init__
(inherited documentation)

__call__(self, x)
(Call operator)

source code 

Get membership of value x.

Parameters:
  • x - value x
Returns: float
membership for value x
Overrides: Set.Set.__call__

getCOG(self)

source code 

Return center of gravity.

Returns: float
x-value of center of gravity
Overrides: Set.Set.getCOG

add(self, x, y, where=1)

source code 

Don't let anyone destroy our singleton.

Overrides: Polygon.Polygon.add

remove(self, x, where=1)

source code 

Don't let anyone destroy our singleton.

Overrides: Polygon.Polygon.remove

clear(self)

source code 

Don't let anyone destroy our singleton.

Overrides: Polygon.Polygon.clear

__repr__(self)
(Representation operator)

source code 

Return representation of instance.

Returns: string
representation of instance
Overrides: object.__repr__

Property Details [hide private]

x

x

Get Method:
unreachable.fget(self)
Set Method:
unreachable.fset(self, value)
Type:
float