| |
- check(x, y1, y2)
- complement(COMPLEMENT, set, segment_size=None)
- Returns a new fuzzy set which is this complement of the given set.
(Where the membership of the result set is equal to C{COMPLEMENT(set(x))}.
For meaning of segment_size see also L{fuzzy.set.operations.merge}.
@param COMPLEMENT: fuzzy complement to use. For example Zadeh(), ...
Also possible as one param function, eg. C{lambda x: 1.-x}.
@type COMPLEMENT: L{fuzzy.complement.Base.Base}
@param set: fuzzy set
@type set: L{fuzzy.set.Set}
@param segment_size: maximum size of a segment
@type segment_size: float/None
@return: resulting fuzzy set
@rtype: L{fuzzy.set.Polygon.Polygon}
- merge(NORM, set1, set2, segment_size=None)
- Returns a new fuzzy set which is the merger of set1 and set2,
where the membership of the result set is equal to C{NORM(set1(x),set2(x))}.
For nonlinear operations you might want set the segment size to a value
which controls how large a linear segment of the result can be.
See also the following examples:
- U{http://pyfuzzy.sourceforge.net/demo/merge/AlgebraicProduct_d_d.png} - The algebraic product is M{x*y}, so using it on the same set, it calculates the square of it.
- U{http://pyfuzzy.sourceforge.net/demo/merge/AlgebraicSum_d_d.png} - The algebraic sum is M{x+y-x*y}.
@param NORM: fuzzy norm to calculate both sets values. For example Min(), Max(), ...
Also possible as two params function, eg. C{lambda a,b: (a+b)/2.}.
@type NORM: L{fuzzy.norm.Norm.Norm}
@param set1: fuzzy set
@type set1: L{fuzzy.set.Set}
@param set2: fuzzy set
@type set2: L{fuzzy.set.Set}
@param segment_size: maximum size of a segment
@type segment_size: float/None
@return: resulting fuzzy set
@rtype: L{fuzzy.set.Polygon.Polygon}
- norm(NORM, set, value, segment_size=None)
- Returns a new fuzzy set which ist this set normed with value.
where the membership of the result set is equal to C{NORM(set(x),value)}.
For meaning of segment_size see also L{fuzzy.set.operations.merge}.
@param NORM: fuzzy norm to calculate set's values with value. For example Min(), Max(), ...
Also possible as two params function, eg. C{lambda a,b: (a+b)/2.}.
@type NORM: L{fuzzy.norm.Norm.Norm}
@param set: fuzzy set
@type set: L{fuzzy.set.Set}
@param value: value
@type value: float
@param segment_size: maximum size of a segment
@type segment_size: float/None
@return: resulting fuzzy set
@rtype: L{fuzzy.set.Polygon.Polygon}
|