|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rule.FuzzyRuleVariable | +--rule.ContinuousFuzzyRuleVariable
The ContinuousFuzzyRuleVariable
class implements a variable that
can hold a continuous value.
Field Summary | |
(package private) double |
discourseHi
|
(package private) double |
discourseLo
|
(package private) java.util.Hashtable |
setList
|
(package private) double |
valCrisp
|
(package private) WorkingFuzzySet |
valFzy
|
(package private) WorkingFuzzySet |
valFzyTmp
|
(package private) boolean |
valKnown
|
Fields inherited from class rule.FuzzyRuleVariable |
id,
name,
nextId,
rb,
type |
Constructor Summary | |
(package private) |
ContinuousFuzzyRuleVariable(FuzzyRuleBase base,
java.lang.String name,
double discourseLo,
double discourseHi)
Creates a new variable with the specified initial values. |
Method Summary | |
(package private) void |
addSetShoulder(java.lang.String setName,
double alphaCut,
double ptBeg,
double ptEnd,
int setDir)
Adds the shoulder set. |
(package private) void |
addSetTrapezoid(java.lang.String setName,
double alphaCut,
double ptLeft,
double ptLeftCore,
double ptRightCore,
double ptRight)
Creates a new trapezoid fuzzy set and adds it to this continuous variable. |
(package private) void |
addSetTriangle(java.lang.String setName,
double alphaCut,
double ptLeft,
double ptCenter,
double ptRight)
Creates a new triangle fuzzy set and adds it to the specified continuous variable. |
double |
getDiscourseHi()
Retrieves the high end value of the universe of discourse. |
double |
getDiscourseLo()
Retrieves the low end value of the universe of discourse. |
java.util.Hashtable |
getFuzzySets()
Retrieves the fuzzy sets. |
FuzzySet |
getFuzzyValue()
Retrieves the value of this object as a fuzzy value. |
FuzzySet |
getFuzzyWorkArea()
Retrieves the fuzzy work area of this continuous variable. |
double |
getNumericValue()
Retrieves the value of this object as a numeric value. |
(package private) FuzzySet |
getOrAddHedgedSet(java.lang.String setName,
java.lang.String hedges)
Retrieves the named hedged set if it exists or adds it if it does not already exist in the continuous variable. |
(package private) double |
getRawValue()
Retrieves the variable's crisp value. |
(package private) FuzzySet |
getSet(java.lang.String setName)
Retrieves the fuzzy set that has the given name. |
java.lang.String |
getSymbolicValue()
Retrieves the value of this object as a symbolic value. |
(package private) java.lang.String |
getValueString()
Retrieves this variable's crisp value as a String. |
(package private) void |
reset()
Resets the variable to its intial state. |
(package private) boolean |
setExist(java.lang.String setName)
Checks to see if the given set name exists in the list of fuzzy sets for this continuous variable. |
void |
setFuzzyValue(FuzzySet newValue)
Sets the value of this object to the given fuzzy value. |
(package private) void |
setFuzzyValue(FuzzySet newSet,
double truthValue)
Sets the truth value in the new fuzzy set. |
void |
setNumericValue(double newValue)
Sets the value of this object to the given numeric value. |
(package private) void |
setRawValue(double newValue)
Sets the crisp value of this object to the given numeric value. |
(package private) void |
setRawValue(FuzzySet newSet)
Sets the raw value for this variable using the given FuzzySet . |
void |
setSymbolicValue(java.lang.String newValue)
Sets the value of this object to the given symbolic value. |
void |
setValue(FuzzySet newValue)
Sets the value of this object to the given fuzzy literal value. |
(package private) void |
setValueString(java.lang.String newValue)
Sets the crisp value of this variable from the given String. |
java.lang.String |
toString()
Returns the name of this variable. |
(package private) boolean |
withinUniverseOfDiscourse(double value)
Checks if the given value is within the universe of discourse. |
Methods inherited from class rule.FuzzyRuleVariable |
getId,
getName,
getReferent,
getRuleBase,
getType,
getTypeAsString |
Methods inherited from class java.lang.Object |
|
Field Detail |
double discourseLo
double discourseHi
java.util.Hashtable setList
double valCrisp
WorkingFuzzySet valFzy
boolean valKnown
WorkingFuzzySet valFzyTmp
Constructor Detail |
ContinuousFuzzyRuleVariable(FuzzyRuleBase base, java.lang.String name, double discourseLo, double discourseHi)
base
- the FuzzyRuleBase for this variableid
- the integer identifier for this variablename
- the String that contains the name of this variablediscourseLo
- the double that contains the low end of the universe of
discoursediscourseHi
- the double that contians the high end of the universe of
discourseMethod Detail |
public FuzzySet getFuzzyValue()
FuzzySet
, if the value of this object can be
represented as a fuzzy valuepublic double getNumericValue()
double
, if the value of this object can be represented
as a numeric valuepublic java.lang.String getSymbolicValue()
String
, if the value of this object can be represented
as a symbolic valuepublic void setFuzzyValue(FuzzySet newValue)
newValue
- the FuzzySet value to which this variable is setpublic void setNumericValue(double newValue)
newValue
- the double value to which this variable is setpublic void setSymbolicValue(java.lang.String newValue)
newValue
- the String value to which this variable is setpublic void setValue(FuzzySet newValue)
newValue
- the FuzzyLiteral value to which this variable is setvoid setValueString(java.lang.String newValue)
newValue
- the String value from which the crisp value for this
variable is setjava.lang.String getValueString()
void reset()
public double getDiscourseLo()
public double getDiscourseHi()
boolean withinUniverseOfDiscourse(double value)
value
- the double value to be checkedtrue
if the value is within the universe. Otherwise
returns false
.void setRawValue(double newValue)
newValue
- the double value to which this variable is setdouble getRawValue()
void setRawValue(FuzzySet newSet)
FuzzySet
.newSet
- the FuzzySet object that contains the new valuesvoid setFuzzyValue(FuzzySet newSet, double truthValue)
newSet
- the FuzzySet object that contains the new set
correlated to the truth valuetruthValue
- the double object that contains the truth value
used for correlationpublic java.util.Hashtable getFuzzySets()
public FuzzySet getFuzzyWorkArea()
boolean setExist(java.lang.String setName)
setName
- the String object that contains set nametrue
if the set name exists or
false
if it does not exist in the listFuzzySet getSet(java.lang.String setName)
setName
- the String object that contains name of the fuzzy
set to be retrievednull
if the set does not existFuzzySet getOrAddHedgedSet(java.lang.String setName, java.lang.String hedges)
setName
- the String object that contains the base set namehedges
- the String object that contains the hedged set namevoid addSetShoulder(java.lang.String setName, double alphaCut, double ptBeg, double ptEnd, int setDir)
setName
- the String object that contains the name of
the set to be addedalphaCut
- the double value for the alpha cutptBeg
- the double value for the begin pointptEnd
- the double value for the end pointsetDir
- the int value for the directionvoid addSetTrapezoid(java.lang.String setName, double alphaCut, double ptLeft, double ptLeftCore, double ptRightCore, double ptRight)
setName
- the String object that contains the name of
the new fuzzy setalphaCut
- the double value for the alpha cutptLeft
- the double value of the point at which the lower left corner of the
trapezoid is placedptLeftCore
- the double value of the point at which the upper left corner of the
trapezoid is placedptRightCore
- the double value of the point at which the upper right corner of the
trapezoid is placedptRight
- the double value of the point at which the lower right corner of the
trapezoid is placedvoid addSetTriangle(java.lang.String setName, double alphaCut, double ptLeft, double ptCenter, double ptRight)
setName
- the String object that contains the name of the
continuous variable that is to have a
new fuzzy set added to italphaCut
- the double value of the alphacut for the newly created fuzzy setptLeft
- the double value of the point at which the lower left corner of the
triangle is placedptCenter
- the double value of the point at which the upper point of the
triangle is placedptRight
- the double value of the point at which the lower right corner of the
triangle is placedpublic java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |