public class T1MF_Trapezoidal extends T1MF_Prototype
isLeftShoulder, isRightShoulder, name, support
Constructor and Description |
---|
T1MF_Trapezoidal(java.lang.String name,
double[] parameters)
Standard Constructor for normal trapezoidal MF.
|
T1MF_Trapezoidal(java.lang.String name,
double[] parameters,
double[] yLevels)
Constructor for non-normal trapezoidal MF.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o) |
double |
getA() |
Tuple |
getAlphaCut(double alpha) |
double |
getB() |
double |
getC() |
double |
getD() |
double |
getFS(double x) |
double[] |
getParameters()
Returns the MFs parameters
|
double |
getPeak()
As standard, the peak is generally defined as the average of b and c,
however it may be changed using the setPeak() method if desired.
|
double[] |
getyLevels()
Retrieves the yLevels of the second and third parameters (points B and C)
This is useful for non-normal MFs.
|
void |
setPeak(double peak) |
void |
setyLevels(double[] yLevels)
Returns the degrees of membership of the inner parameters of the MF.
|
java.lang.String |
toString() |
getDefuzzifiedCentroid, getDefuzzifiedCOS, getName, getSupport, isLeftShoulder, isRightShoulder, setLeftShoulder, setName, setRightShoulder, setSupport
public T1MF_Trapezoidal(java.lang.String name, double[] parameters)
name
- parameters
- Parameters from left to right.public T1MF_Trapezoidal(java.lang.String name, double[] parameters, double[] yLevels)
name
- parameters
- Parameters from left to right.yLevels
- The specific yLevels for the second and third point of
the trapezoid. Normally, both values are equal.public double getFS(double x)
public double getA()
public double getB()
public double getC()
public double getD()
public double[] getParameters()
public double getPeak()
public void setPeak(double peak)
public double[] getyLevels()
public void setyLevels(double[] yLevels)
yLevels
- public int compareTo(java.lang.Object o)
public Tuple getAlphaCut(double alpha)
public java.lang.String toString()
toString
in class java.lang.Object