public class FuzzyNumber
extends java.lang.Object
Constructor and Description |
---|
FuzzyNumber(double peak,
double min,
double max)
Create a new fuzzy number.
|
Modifier and Type | Method and Description |
---|---|
double |
getMax()
Return the current value for the right corner of the triangular membership function.
|
double |
getMembership(double value)
Calculate the degree of membership of a value within this fuzzy number.
|
double |
getMin()
Return the current value for the left corner of the triangular membership function.
|
double |
getPeak()
Return the current value for the centre of the triangular membership function.
|
void |
setMax(double newValue)
Specify a value for the right corner of the triangular membership function.
|
void |
setMin(double newValue)
Specify a value for the left corner of the triangular membership function.
|
void |
setPeak(double newValue)
Specify a value for the centre of the triangular membership function.
|
public FuzzyNumber(double peak, double min, double max)
peak
- - The center value for the triangular membership function.min
- - The leftmost or minimum value for the triangular membership function.max
- - The rightmost or maximum value for the triangular membership function.public double getMembership(double value)
value
- - The number to be tested for its membership.public void setPeak(double newValue)
newValue
- - The number to set the peak to.public double getPeak()
public void setMin(double newValue)
newValue
- - The number to set the minimum to.public double getMin()
public void setMax(double newValue)
newValue
- - The number to set the peak to.public double getMax()