|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--nrc.fuzzy.RightGaussianFunction
An implementation of the FuzzySetFunction interface to provide
a class with the ability to generate a FuzzySet that is the right half of a
gaussian-shaped curve with membership value 1 on the upper left to 0 on the lower right.
This class is typically used when constructing instances of the classes
RFuzzySet and LRFuzzySet. The GaussianFuzzySet for example is constructed using
the LeftGaussianFunction to create its left half and the RightGaussianFunction to create its
right half.
The curves are defined by the following equation:
where a is the mean and sigma is the standard deviation.
RFuzzySet
,
LRFuzzySet
,
GaussianFuzzySet
,
LeftGaussianFunction
,
Serialized FormConstructor Summary | |
RightGaussianFunction()
Creates an instance of an RightGaussianFunction that is used to generate Fuzzysets with a gaussian-shape for their left part. |
|
RightGaussianFunction(int numPoints)
Creates an instance of a RightGaussianFunction that is used to generate Fuzzysets with a gaussian-shape for its right part. |
Method Summary | |
nrc.fuzzy.FuzzySet |
generateFuzzySet(double leftX,
double rightX)
Creates a FuzzySet with an gaussian-shape such that the membership value is 1 at the leftX value and 0 at the rightX value. |
nrc.fuzzy.FuzzySet |
generateFuzzySet(double leftX,
double rightX,
int numberOfPoints)
Creates a FuzzySet with a gaussian-shape such that the membership value is 1 at the leftX value and 0 at the rightX value. |
protected int |
returnCorrectedNumPoints(int numPoints)
Keeps the values for the number of points in the gaussian-shaped curve to be >= 5. |
static void |
setDefaultNumberOfPoints(int numPoints)
Sets the value of the rightGaussianFunctionDefaultNumPoints static (class) variable. |
void |
setNumPoints(int numPoints)
Sets the value of the defaultNumPoints variable. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RightGaussianFunction()
public RightGaussianFunction(int numPoints)
numPoints
- the number of points to use when creating the gaussian-shaped FuzzySet.Method Detail |
public nrc.fuzzy.FuzzySet generateFuzzySet(double leftX, double rightX)
defaultNumPoints
and the static class variable
rightGaussianFunctionDefaultNumPoints
.
generateFuzzySet
in interface FuzzySetFunction
leftX
- the upper left x value of the gaussian-shaped curve.rightX
- the lower right x value of the gaussian-shaped curve.
public nrc.fuzzy.FuzzySet generateFuzzySet(double leftX, double rightX, int numberOfPoints)
f(x) = e ** ((-(x-c)**2)/(2*sigma))
where c is the mean (centre) value and sigma is the standard deviation
generateFuzzySet
in interface FuzzySetFunction
leftX
- the upper left x value of the gaussian-shaped curve.rightX
- the bottom right x value of the gaussian-shaped curve.numberOfPoints
- the number of points to be used when generating the
gaussian-shaped curve.
public void setNumPoints(int numPoints)
generateFuzzySet(double leftX, double rightX)
method,
unless it has a value of < 5, in which case the value of static (class)
variable, sFunctionDefaultNumPoints, will be used. This allows
each instance of the RightGaussianFunction to determine its own value for the number
of points to be generated. Initially it is set to have the value 0 so
that the rightGaussianFunctionDefaultNumPoints value is used.
public static void setDefaultNumberOfPoints(int numPoints)
generateFuzzySet(double leftX, double rightX)
method
when the local instance variable defaultNumPoints has not been
set or is < 5. Initially it is set to have the value 9.
protected int returnCorrectedNumPoints(int numPoints)
numPoints
- the integer value to be constrained to be >= 5.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |