|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rule.FuzzySet
The FuzzySet
class is a abstract class that defines
the attributes and methods for a fuzzy set.
Field Summary | |
protected double |
alphaCut
|
protected double |
domainHi
|
protected double |
domainLo
|
protected ContinuousFuzzyRuleVariable |
parentVar
|
protected java.lang.String |
setName
|
protected int |
setType
|
protected double[] |
truthVector
|
Constructor Summary | |
protected |
FuzzySet(int setType,
java.lang.String setName,
ContinuousFuzzyRuleVariable parentVar,
double alphaCut)
Creates a new fuzzy set with the given parameters. |
protected |
FuzzySet(int setType,
java.lang.String setName,
ContinuousFuzzyRuleVariable parentVar,
double alphaCut,
double domainLo,
double domainHi)
Creates a new fuzzy set with the given parameters. |
Method Summary | |
(package private) boolean |
aboveAlphaCut(double truthValue)
Checks if the truth values is above the alpha cut value. |
(package private) abstract void |
addClone(java.lang.String setName)
Adds a clone of the given set. |
(package private) void |
applyAlphaCut()
Zeroes out truthValues if they are below alphaCut threshold. |
(package private) void |
applyHedgeConDil(double exp)
Concentrates or dilutes the fuzzy set. |
(package private) void |
applyHedges(java.lang.String hedges)
Uses linguistic hedges to modify fuzzy set. |
(package private) double |
defuzzify(int defuzzMethod)
Defuzzifies the set using the given defuzzification method. |
double |
getAlphaCut()
Retrieves the alpha cut value. |
double |
getDomainHi()
Retrieves the high domain value. |
double |
getDomainLo()
Retrieves the low domain value. |
double |
getNumericValue()
Retrieve the value of this object as a numeric value. |
int |
getReferent()
Retrieve the id of the variable to which this object refers. |
(package private) double |
getScalar(int index)
Retrives the scalar for the given index within the domain range. |
(package private) double |
getSetHeight()
Finds the truthValue with maximum value between 0.0 and 1.0. |
java.lang.String |
getSetName()
Retrieves the name of this fuzzy set. |
int |
getSetType()
Retrieves the type of this fuzzy set. |
(package private) double |
getTruthValue(int index)
Retrieves a single truth value at the given index. |
double[] |
getTruthValues()
Retrieves the truth values for this fuzzy set. |
(package private) double |
membership(double scalar)
Retrieves the membership value for the given scalar value. |
(package private) void |
normalise()
Adjusts the truthValues so that the max is 1.0. |
(package private) int[] |
segmentCurve(int numberOfValues,
double[] scalarVector,
double[] aTruthVector)
Retrieves the first and last points in a segment curve interpolated from the working truth vector. |
java.lang.String |
toString()
Retrieves a string describing the contents of the object. |
(package private) void |
vectorInterpret(double[] aTruthVector)
Fills in the bits in the truth vector. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected int setType
protected java.lang.String setName
protected double alphaCut
protected double domainLo
protected double domainHi
protected double[] truthVector
protected ContinuousFuzzyRuleVariable parentVar
Constructor Detail |
protected FuzzySet(int setType, java.lang.String setName, ContinuousFuzzyRuleVariable parentVar, double alphaCut, double domainLo, double domainHi)
setType
- the integer that represents the set typesetName
- the String object that contains the name of the setparentVar
- the ContinuousFuzzyRuleVariable that is the parent of this setalphaCut
- the double value for the alpha cutdomainLo
- the double value for the low end of the domaindomainHi
- the double value for the high end of the domainprotected FuzzySet(int setType, java.lang.String setName, ContinuousFuzzyRuleVariable parentVar, double alphaCut)
setType
- the integer that represents the set typesetName
- the String object that contains the name of the setparentVar
- the ContinuousFuzzyRuleVariable that is the parent of this setalphaCut
- the double value for the alpha cutMethod Detail |
public double getNumericValue()
abstract void addClone(java.lang.String setName)
setName
- the String object that contains the name of the set to be clonedpublic int getReferent()
public int getSetType()
public java.lang.String getSetName()
public double getAlphaCut()
public double getDomainLo()
public double getDomainHi()
public double[] getTruthValues()
double getTruthValue(int index)
index
- the integer value for the index of the truth valuevoid applyAlphaCut()
void applyHedges(java.lang.String hedges)
hedges
- the String object that contains the set of hedgesvoid applyHedgeConDil(double exp)
exp
- the double value used to concentrate or dilute the fuzzy setdouble defuzzify(int defuzzMethod)
defuzzMethod
- the integer that represent the defuzzification methoddouble membership(double scalar)
scalar
- the double scalar valueboolean aboveAlphaCut(double truthValue)
truthValue
- the double truth value to be checkedvoid normalise()
double getSetHeight()
double getScalar(int index)
index
- the integer value of the indexint[] segmentCurve(int numberOfValues, double[] scalarVector, double[] aTruthVector)
numberOfValues
- the integer value for the number of truth valuesscalarVector
- the double[] scalar vectoraTruthVector
- the double[] truth vectorvoid vectorInterpret(double[] aTruthVector)
aTruthVector
- the double[] truth vectorpublic java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |