Home | Trees | Indices | Help |
|
---|
|
Represents a fuzzy set, which membership function is the shape of a polygon. For example: triangle, trapezoid, rectangle, or something similar.
If you need something similar to ZFunction or SFunction, use this class directly by building it from two points.:
---* *--- \ / \ OR / \ / *--- ---*
See also http://pyfuzzy.sourceforge.net/demo/set/Polygon%20(Demo).png
|
|||
|
|||
float |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
float |
|
||
string |
|
||
Inherited from |
|
|||
X = 0 index of x value in tuple |
|||
Y = 1 index of y value in tuple |
|||
BEGIN = 0
|
|||
END = 1
|
|
|||
list of 2-tuple (x,y) |
points points of the polygon. |
||
Inherited from |
|
Initialize with given sorted list of (x,y) values
|
Get membership of value x.
|
Add a new point to the polygon. The parameter where controls at which end it is inserted. (The points are always sorted, but if two have the same x value their order is important. For example: adding a second point(y=0) in the middle: now where=END where=BEGIN *--* *--* * * \ | \ |\ \ | \| \ * *--* * * |
Remove a point from the polygon. The parameter where controls at which end it is removed. (The points are always sorted, but if two have the same x value their order is important. For example: removing the second point in the middle: now where=END where=BEGIN *--* *--* * | \ \ | \ \ *--* * *--* |
Return sequence of x-values for set.
|
Return sequence of (x,y)-values for set. In case of vertical slopes, y is a tuple of y-values for flat = False. Otherwise several (x,y)-values will be generated having identical x-values.
|
Return center of gravity.
|
Return representation of instance.
|
|
pointspoints of the polygon.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Apr 5 22:26:10 2013 | http://epydoc.sourceforge.net |