|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jFuzzyLogic.membership.MembershipFunction net.sourceforge.jFuzzyLogic.membership.MembershipFunctionContinuous net.sourceforge.jFuzzyLogic.membership.MembershipFunctionPieceWiseLinear
public class MembershipFunctionPieceWiseLinear
Piece-wise linear membership function
Field Summary | |
---|---|
(package private) double[] |
x
Piece wise linear function values x |
(package private) double[] |
y
Piece wise linear function values y |
Fields inherited from class net.sourceforge.jFuzzyLogic.membership.MembershipFunction |
---|
discrete, parameters, universeMax, universeMin |
Constructor Summary | |
---|---|
MembershipFunctionPieceWiseLinear(double[] x,
double[] y)
Default constructor |
Method Summary | |
---|---|
boolean |
checkParamters(java.lang.StringBuffer errors)
|
void |
estimateUniverse()
Try to guess the universe (if not setted) |
double |
getParameter(int i)
Need to override this method (we store parameters differently in this function) |
int |
getParametersLength()
Need to override this method (we store parameters differently in this function) |
double |
membership(double in)
Membership funcion is defined as: membership(x) = y[0] if x <= x[0] membership(x) = y[n] if x >= x[n] (where n = x.length) membership(x) = y[i - 1] + (y[i] - y[i - 1]) / (in - x[i]) if x[i-1] < x <= x[i] |
void |
setParameter(int i,
double value)
Need to override this method (we store parameters differently in this function) |
java.lang.String |
toString()
|
java.lang.String |
toStringFCL()
FCL representation |
Methods inherited from class net.sourceforge.jFuzzyLogic.membership.MembershipFunctionContinuous |
---|
chart |
Methods inherited from class net.sourceforge.jFuzzyLogic.membership.MembershipFunction |
---|
getName, getUniverseMax, getUniverseMin, isDiscrete, setDiscrete, setUniverseMax, setUniverseMin |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
double[] x
double[] y
Constructor Detail |
---|
public MembershipFunctionPieceWiseLinear(double[] x, double[] y)
x
- [] : x points arrayy
- [] : y points array
A piecewise linear function is defined by 'n' points:
(x_1,y_1) , (x_2,y2) , ... (x_n,y_n)
ordered by x[] (increasing)
See also 'membership()' for a precise definition.Method Detail |
---|
public boolean checkParamters(java.lang.StringBuffer errors)
checkParamters
in class MembershipFunction
public void estimateUniverse()
MembershipFunction
estimateUniverse
in class MembershipFunction
public double getParameter(int i)
getParameter
in class MembershipFunction
public int getParametersLength()
getParametersLength
in class MembershipFunction
public double membership(double in)
membership
in class MembershipFunction
in
- : Variable's 'x' value
Note: Output mu be in range [0,1]MembershipFunction.membership(double)
public void setParameter(int i, double value)
setParameter
in class MembershipFunction
public java.lang.String toString()
toString
in class MembershipFunction
Object.toString()
public java.lang.String toStringFCL()
toStringFCL
in class MembershipFunction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |