|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--nrc.fuzzy.LeftGaussianFunction
An implementation of the FuzzySetFunction interface to provide
a class with the ability to generate a FuzzySet that is the left half of a
gaussian-shaped curve with membership value 0 on the lower left to 1 on the upper right.
This class is typically used when constructing instances of the classes
LFuzzySet 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.
LFuzzySet
,
LRFuzzySet
,
GaussianFuzzySet
,
RightGaussianFunction
,
Serialized FormConstructor Summary | |
LeftGaussianFunction()
Creates an instance of an LeftGaussianFunction that is used to generate Fuzzysets with a gaussian-shape for their left part. |
|
LeftGaussianFunction(int numPoints)
Creates an instance of a LeftGaussianFunction that is used to generate Fuzzysets with a gaussian-shape for its left part. |
Method Summary | |
nrc.fuzzy.FuzzySet |
generateFuzzySet(double leftX,
double rightX)
Creates a FuzzySet with an gaussian-shape such that the membership value is 0 at the leftX value and 1 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 0 at the leftX value and 1 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 leftGaussianFunctionDefaultNumPoints 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 LeftGaussianFunction()
public LeftGaussianFunction(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
leftGaussianFunctionDefaultNumPoints
.
generateFuzzySet
in interface FuzzySetFunction
leftX
- the bottom left x value of the gaussian-shaped curve.rightX
- the upper 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 bottom left x value of the gaussian-shaped curve.rightX
- the upper 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 LeftGaussianFunction 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 leftGaussianFunctionDefaultNumPoints 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 |