Catalano.Fuzzy
Class PiecewiseLinearFunction
- java.lang.Object
-
- Catalano.Fuzzy.PiecewiseLinearFunction
-
- All Implemented Interfaces:
- IMembershipFunction
- Direct Known Subclasses:
- TrapezoidalFunction
public class PiecewiseLinearFunction extends java.lang.Object implements IMembershipFunction
Membership function composed by several connected linear functions.
-
-
Constructor Summary
Constructors Constructor and Description PiecewiseLinearFunction()Initializes a new instance of theclass. PiecewiseLinearFunction(FloatPoint[] points)Initializes a new instance of theclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description floatGetMembership(float x)Calculate membership of a given value to the fuzzy set.floatLeftLimit()The leftmost x value of the membership function.floatRightLimit()The rightmost x value of the membership function.
-
-
-
Constructor Detail
-
PiecewiseLinearFunction
public PiecewiseLinearFunction()
Initializes a new instance of theclass. This constructor must be used only by inherited classes to create the points vector after the instantiation.
-
PiecewiseLinearFunction
public PiecewiseLinearFunction(FloatPoint[] points)
Initializes a new instance of theclass. - Parameters:
points- Array of (X,Y) coordinates of each start/end of the lines.Points must be in crescent order on X axis. Y value of points must be in the range of [0, 1].
-
-
Method Detail
-
GetMembership
public float GetMembership(float x)
Description copied from interface:IMembershipFunctionCalculate membership of a given value to the fuzzy set.- Specified by:
GetMembershipin interfaceIMembershipFunction- Parameters:
x- Value which membership will to be calculated.- Returns:
- Degree of membership [0..1] of the value to the fuzzy set.
-
LeftLimit
public float LeftLimit()
Description copied from interface:IMembershipFunctionThe leftmost x value of the membership function.- Specified by:
LeftLimitin interfaceIMembershipFunction- Returns:
- x.
-
RightLimit
public float RightLimit()
Description copied from interface:IMembershipFunctionThe rightmost x value of the membership function.- Specified by:
RightLimitin interfaceIMembershipFunction- Returns:
- x.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG