ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able.data
Class AbleFuzzyVariable

java.lang.Object
  |
  +--com.ibm.able.data.AbleLhs
        |
        +--com.ibm.able.data.AbleVariable
              |
              +--com.ibm.able.data.AbleContinuousVariable
                    |
                    +--com.ibm.able.data.AbleFuzzyVariable
All Implemented Interfaces:
AbleRd, AbleWr, java.io.Serializable

public class AbleFuzzyVariable
extends AbleContinuousVariable
implements java.io.Serializable

This class represents a FuzzySet value subject to a minimum and maximum value called the range of discource. An object of type AbleFuzzyVariable contains one or more FuzzySets defined over the variable, a Fuzzy value, as well as a crisp value whose type is double. Instances of AbleFuzzyVariable are used by the Able rules classes in clauses and expressions. In addition, this class provides methods for converting a Fuzzy value to other datatypes, setting a Fuzzy value using other datatypes, as well as other logical comparison and math operator methods useful when dealing with a Fuzzy value. *

See Also:
Serialized Form

Field Summary
protected  double myAlphaCut
          The alphacut level associated with this fuzzy variable
protected  int myDefuzzifyMethod
          Specifies the method used to turn a fuzzy value into a crisp number.
protected  java.util.Hashtable mySetList
          A list of fuzzy sets defined over this variable.
protected  double myValCrisp
          The crisp value of the fuzzy solution variable (if known).
protected  AbleFuzzySetWork myValFzy
          The fuzzy solution variable.
protected  AbleFuzzySetWork myValFzyTmp
          Fuzzy working space to hold temporary copies.
protected  boolean myValKnown
          Indicates whether the crisp value is known (true) or undefined (false).
 
Fields inherited from class com.ibm.able.data.AbleContinuousVariable
myDiscourseHi, myDiscourseLo, myInitialValue, myValue
 
Fields inherited from class com.ibm.able.data.AbleVariable
myBoundFlag, myChgSupport, myComment, myContext, myDataType, myGlobalFlag, myId, myName, myPrompt, myReferences, myStaticFlag, myTemplateFlag, myValueInitial
 
Constructor Summary
AbleFuzzyVariable(java.lang.String theName, boolean theStaticFlag, boolean theGlobalFlag, double theDiscourseLo, double theDiscourseHi, double theAlphaCut)
          Create a new fuzzy variable with the specified universe of discourse.
AbleFuzzyVariable(java.lang.String theName, double theDiscourseLo, double theDiscourseHi, double theAlphaCut)
          Create a new fuzzy variable with the specified universe of discourse.
 
Method Summary
 void addSet(AbleFuzzySetBeta theSet)
           
 void addSet(AbleFuzzySetGaussian theSet)
           
 void addSet(AbleFuzzySetLinear theSet)
           
 void addSet(AbleFuzzySetPi theSet)
           
 void addSet(AbleFuzzySetSegments theSet)
           
 void addSet(AbleFuzzySetShoulder theSet)
           
 void addSet(AbleFuzzySetSigmoid theSet)
           
 void addSet(AbleFuzzySetTrapezoid theSet)
           
 void addSet(AbleFuzzySetTriangle theSet)
           
 void addSetComplement(java.lang.String theSetName, java.lang.String theCompName)
           
 java.lang.String arlDclString()
          Return a formal ARL "declaration" string that describes this data object.
 void asgnIs(AbleRd theRhs)
          Assignment (fuzzy): assign the current value of theRhs to this data object.
 void asgnIs(AbleRd theRhs, double theTruthValue)
          Assignment (fuzzy): assign the current value of theRhs to this data object, correlated with the specified truth value.
 boolean cmpEq(AbleRd theRhs)
          Comparison, equal to: compare the current value of this data object to the current value of theRhs.
 boolean cmpGt(AbleRd theRhs)
          Comparison, greater than: compare the current value of this data object to the current value of theRhs.
 boolean cmpGtEq(AbleRd theRhs)
          Comparison, greater than or equal to: compare the current value of this data object to the current value of theRhs.
 double cmpIs(AbleRd theRhs)
          Comparison, fuzzy equal to: compare the current value of this data object to the current value of theRhs.
 boolean cmpLt(AbleRd theRhs)
          Comparison, less than: compare the current value of this data object to the current value of theRhs.
 boolean cmpLtEq(AbleRd theRhs)
          Comparison, less than or equal to: compare the current value of this data object to the current value of theRhs.
 boolean cmpNeq(AbleRd theRhs)
          Comparison, not equal to: compare the current value of this data object to the current value of theRhs.
 AbleLiteral compDivide(AbleRd theRhs)
          Compute, divide the current value of this data object by the current value of theRhs.
 AbleLiteral compMinus(AbleRd theRhs)
          Compute, subtract the current value of theRhs from the current value of this object.
 AbleLiteral compMultiply(AbleRd theRhs)
          Compute, multiply the current value of this data object to the current value of theRhs.
 AbleLiteral compPlus(AbleRd theRhs)
          Compute, add or concatenate the current value of this data object to the current value of theRhs.
 AbleLiteral compUnaryMinus(AbleRd theRhs)
          Compute, the unary minus of the current value of this object.
static java.lang.String Copyright()
          Determine the copyright of this class.
 boolean getBooleanValue()
          Retrieve the value of this data object as a boolean value.
 java.lang.Class getDataTypeClass()
          Retrieve the actual class of this object's underlying data type.
 java.lang.String getDataTypeClassName()
          Retrieve the name of the class of this object's underlying data type.
 int getDefuzzifyMethod()
          Retrieve the current defuzzification method.
 java.util.Hashtable getFuzzySets()
           
 AbleFuzzySet getFuzzyValue()
          Retrieve the value of this data object as a fuzzy value.
 AbleFuzzySet getFuzzyWorkArea()
          Retrieve the fuzzy work area of this continuous variable.
 java.lang.Object getGenericValue()
          Retrieve the value of this data object as an Object.
 double getNumericValue()
          Retrieve the value of this data object as a numeric value.
 AbleFuzzySet getOrAddHedgedSet(java.lang.String theSetName, java.lang.String theHedges)
           
 AbleFuzzySet getSet(java.lang.String theSetName)
           
 java.lang.String getStringValue()
          Retrieve the value of this data object as a string value.
 AbleLiteral getValue()
          Retrieve the value of this data object as a literal.
 java.lang.String getValueString()
          Retrieve the variable's current (crisp) value as a string.
 void replaceSetSegments(java.lang.String theFuzzySetName, double[] theTruthVector)
          Replace the contents of an existing fuzzy set with new curve
 void reset()
          Reset the variable to its intial state.
 void setAlphaCut(double theAlphaCut)
           
 void setBooleanValue(boolean theNewValue)
          Set the value of this data object from a boolean value.
 void setDefuzzifyMethod(int theDefuzzifyMethod)
          Set the defuzzification method to the specified type.
 void setDiscourseRange(double theValueLo, double theValueHi)
          Set the variable's discourse range.
 boolean setExist(java.lang.String theSetName)
           
 void setFuzzyValue(AbleFuzzySet theNewValue)
          Set the value of this data object from a fuzzy value.
 void setGenericValue(java.lang.Object theNewValue)
          Set the value of this data object from an object.
 void setNumericValue(double theNewValue)
          Set the value of this data object from a numeric value.
 void setStringValue(java.lang.String theNewValue)
          Set the value of this data object from a string value.
 void setValue(AbleLiteral theNewValue)
          Set the value of this data object from a literal object.
 void setValueString(java.lang.String theNewValue)
          Set the variable's current (crisp) value from a string.
 java.lang.String toString()
          Retrieve a string describing (the contents of) the object.
 java.lang.String traceString(int theTraceStringFlavor)
          Retrieve a string describing (the contents of) the object.
protected  void validateSetBasics(AbleFuzzySet theSet)
           
 java.lang.String xmlCWrString()
          Return a formal XML "clause write" string that describes this data object.
 java.lang.String xmlDclString()
          Return a formal XML "declaration" string that describes this data object.
 
Methods inherited from class com.ibm.able.data.AbleContinuousVariable
asgnEq, chkRange, getDataTypeName, getDiscourseHi, getDiscourseLo, getLiteralClass, init, setDiscourseHi, setDiscourseLo, setInitialValue, withinUniverseOfDiscourse
 
Methods inherited from class com.ibm.able.data.AbleVariable
arlCRdString, arlInitializerString, getArlComment, getChgSupport, getComment, getContext, getDataType, getDataTypeAsString, getId, getName, getPrompt, getPromptString, getReferences, getReferent, getReferents, getTemplateString, isBound, isConstant, isGlobal, isLocal, isStatic, isTemplate, notStatic, setChgSupport, setComment, setContext, setId, setPrompt, setReferences, setStatic, setTemplate, xmlCRdString, xmlInitializerString
 
Methods inherited from class com.ibm.able.data.AbleLhs
bitwiseAND, bitwiseNOT, bitwiseOR, bitwiseShiftLeft, bitwiseShiftRight, bitwiseShiftRightZeroFill, bitwiseXOR, compModulo, logicalAND, logicalNOT, logicalOR
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mySetList

protected java.util.Hashtable mySetList
A list of fuzzy sets defined over this variable.

myValCrisp

protected double myValCrisp
The crisp value of the fuzzy solution variable (if known).

myValFzy

protected AbleFuzzySetWork myValFzy
The fuzzy solution variable.

myValKnown

protected boolean myValKnown
Indicates whether the crisp value is known (true) or undefined (false).

myValFzyTmp

protected AbleFuzzySetWork myValFzyTmp
Fuzzy working space to hold temporary copies.

myAlphaCut

protected double myAlphaCut
The alphacut level associated with this fuzzy variable

myDefuzzifyMethod

protected int myDefuzzifyMethod
Specifies the method used to turn a fuzzy value into a crisp number. This value must be set by the fuzzy inference engine. Value is a DefuzzifyMethod constant. Initially set to DefuzzifyMethodDefault.
Constructor Detail

AbleFuzzyVariable

public AbleFuzzyVariable(java.lang.String theName,
                         double theDiscourseLo,
                         double theDiscourseHi,
                         double theAlphaCut)
Create a new fuzzy variable with the specified universe of discourse.

The initial fuzzy value of this variable cannot be specified. Since there is no initial fuzzy value, the crisp value is set to Double.NaN.

Parameters:
theName - The unique name of the variable.

theDiscourseLo - The lowest value that this variable may assume.

theDiscourseHi - The highest value that this variable may assume.

theAlphaCut - The low truth value cutoff point. This is usually taken from the variable's containing fuzzy ruleset.


AbleFuzzyVariable

public AbleFuzzyVariable(java.lang.String theName,
                         boolean theStaticFlag,
                         boolean theGlobalFlag,
                         double theDiscourseLo,
                         double theDiscourseHi,
                         double theAlphaCut)
Create a new fuzzy variable with the specified universe of discourse.

The initial fuzzy value of this variable cannot be specified. Since there is no initial fuzzy value, the crisp value is set to Double.NaN.

Parameters:
theName - The unique name of the variable.

theStaticFlag - Use true if this variable is to be marked as static, which means that it will ignore future reset requests; use false if the variable can be reset to its initial value when requested.

theGlobalFlag - Use true if this variable is to be considered global; use false if the variable is to be considered local.

theDiscourseLo - The lowest value that this variable may assume.

theDiscourseHi - The highest value that this variable may assume.

theAlphaCut - The low truth value cutoff point. This is usually taken from the variable's containing fuzzy ruleset.

Method Detail

getBooleanValue

public boolean getBooleanValue()
                        throws AbleDataException
Retrieve the value of this data object as a boolean value.
Overrides:
getBooleanValue in class AbleContinuousVariable
Returns:
false if the current crisp value is 0.0, any other crisp value returns true.
Throws:
AbleDataException - If the value of this object cannot be represented as a boolean value.

getFuzzyValue

public AbleFuzzySet getFuzzyValue()
                           throws AbleDataException
Retrieve the value of this data object as a fuzzy value.
Overrides:
getFuzzyValue in class AbleContinuousVariable
Returns:
The fuzzy value as an AbleFuzzySet object.
Throws:
AbleDataException - If the value of this object cannot be represented as a fuzzy value.

getGenericValue

public java.lang.Object getGenericValue()
                                 throws AbleDataException
Retrieve the value of this data object as an Object.
Overrides:
getGenericValue in class AbleContinuousVariable
Returns:
The crisp value as a Double object.
Throws:
AbleDataException - If the value of this object cannot be represented as an Object.

getNumericValue

public double getNumericValue()
                       throws AbleDataException
Retrieve the value of this data object as a numeric value.
Overrides:
getNumericValue in class AbleContinuousVariable
Returns:
The crisp value of the current fuzzy value.
Throws:
AbleDataException - If the value of this object cannot be represented as a numeric value.

getStringValue

public java.lang.String getStringValue()
                                throws AbleDataException
Retrieve the value of this data object as a string value.
Overrides:
getStringValue in class AbleContinuousVariable
Returns:
Double.toString() of the current crisp value.
Throws:
AbleDataException - If the value of this object cannot be represented as a string value.

getValue

public AbleLiteral getValue()
                     throws AbleDataException
Retrieve the value of this data object as a literal.
Overrides:
getValue in class AbleContinuousVariable
Returns:
An AbleNumericLiteral object of the current crisp value.
Throws:
AbleDataException - If the value of this object cannot be represented as a literal.


cmpIs

public double cmpIs(AbleRd theRhs)
             throws AbleDataException
Comparison, fuzzy equal to: compare the current value of this data object to the current value of theRhs.

Fuzzy membership is used for the compare.

Overrides:
cmpIs in class AbleLhs
Parameters:
theRhs - The right-hand side of the comparison. This must be a fuzzy set.

Returns:
The membership of the fuzzy variable's crisp value within the fuzzy ste.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

setBooleanValue

public void setBooleanValue(boolean theNewValue)
                     throws AbleDataException
Set the value of this data object from a boolean value. This method always throws an exception.
Overrides:
setBooleanValue in class AbleContinuousVariable
Parameters:
theNewValue - A boolean value.

Throws:
AbleDataException - If the value of this object cannot be represented as a boolean value.

setFuzzyValue

public void setFuzzyValue(AbleFuzzySet theNewValue)
                   throws AbleDataException
Set the value of this data object from a fuzzy value.
Overrides:
setFuzzyValue in class AbleContinuousVariable
Parameters:
theNewValue - A fuzzy set.

Throws:
AbleDataException - If the value of this object cannot be represented as a fuzzy value.

setGenericValue

public void setGenericValue(java.lang.Object theNewValue)
                     throws AbleDataException
Set the value of this data object from an object.
Overrides:
setGenericValue in class AbleContinuousVariable
Parameters:
theNewValue - Any type of Object.

Throws:
AbleDataException - If the value of this object cannot be derived from the specified Object.

setNumericValue

public void setNumericValue(double theNewValue)
                     throws AbleDataException
Set the value of this data object from a numeric value.
Overrides:
setNumericValue in class AbleContinuousVariable
Parameters:
theNewValue - Any number. If the number is not within the universe of discourse for this variable, an exception is thrown. The crisp value is set.

Throws:
AbleDataException - If the value of this object cannot be represented as a numeric value.

setStringValue

public void setStringValue(java.lang.String theNewValue)
                    throws AbleDataException
Set the value of this data object from a string value.
Overrides:
setStringValue in class AbleContinuousVariable
Parameters:
theNewValue - A string. The variable is set to the value of the string, but only if the string can be parsed to a double and that number is within the universe of discourse for this variable. Otherwise an exception is thrown.

Throws:
AbleDataException - If the value of this object cannot be represented as a string value.

setValue

public void setValue(AbleLiteral theNewValue)
              throws AbleDataException
Set the value of this data object from a literal object.
Overrides:
setValue in class AbleContinuousVariable
Parameters:
theNewValue - An Able literal of any type. An attempt is made to convert the literal to an appropriate type before assigning it to this "writable" object. The resulting number must be within the universe of discourse for this variable.

Throws:
AbleDataException - If the value of this object cannot be determined from the literal object.

arlDclString

public java.lang.String arlDclString()
Return a formal ARL "declaration" string that describes this data object.
Overrides:
arlDclString in class AbleContinuousVariable
Returns:
A String describing the data object in formal rule language.

xmlDclString

public java.lang.String xmlDclString()
Return a formal XML "declaration" string that describes this data object.
Overrides:
xmlDclString in class AbleContinuousVariable
Returns:
A String describing the data object in XML.

xmlCWrString

public java.lang.String xmlCWrString()
Return a formal XML "clause write" string that describes this data object.
Overrides:
xmlCWrString in class AbleVariable
Returns:
A String describing the data object in XML.

asgnIs

public void asgnIs(AbleRd theRhs)
            throws AbleDataException
Assignment (fuzzy): assign the current value of theRhs to this data object.
Overrides:
asgnIs in class AbleLhs
Parameters:
theRhs - The right-hand, or source, side of the assignment. This must be a fuzzy set.

Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and assigned to this data object.

asgnIs

public void asgnIs(AbleRd theRhs,
                   double theTruthValue)
            throws AbleDataException
Assignment (fuzzy): assign the current value of theRhs to this data object, correlated with the specified truth value.
Overrides:
asgnIs in class AbleLhs
Parameters:
theRhs - The right-hand, or source, side of the assignment. This must be a fuzzy set.

theTruthValue - the truth value with which theRhs is correlated.

Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and assigned to this data object.

cmpEq

public boolean cmpEq(AbleRd theRhs)
              throws AbleDataException
Comparison, equal to: compare the current value of this data object to the current value of theRhs.

"==" is used for numeric and boolean compares; equals() is used for Object compares; and Collator.equals() is used for String compares.

Overrides:
cmpEq in class AbleContinuousVariable
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
true, if this data object is equal to theRhs; false, otherwise.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

cmpGt

public boolean cmpGt(AbleRd theRhs)
              throws AbleDataException
Comparison, greater than: compare the current value of this data object to the current value of theRhs.

">" is used for numeric compares; Collator.compare() is used for String compares. Use of other data types on the left-hand side causes an exception.

Overrides:
cmpGt in class AbleContinuousVariable
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
true, if this data object is greater than theRhs; false, otherwise.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

cmpGtEq

public boolean cmpGtEq(AbleRd theRhs)
                throws AbleDataException
Comparison, greater than or equal to: compare the current value of this data object to the current value of theRhs.

">=" is used for numeric compares; Collator.compare() is used for String compares. Use of other data types on the left-hand side causes an exception.

Overrides:
cmpGtEq in class AbleContinuousVariable
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
true, if this data object is greater than or equal to theRhs; false, otherwise.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

cmpLt

public boolean cmpLt(AbleRd theRhs)
              throws AbleDataException
Comparison, less than: compare the current value of this data object to the current value of theRhs.

"<" is used for numeric compares; Collator.compare() is used for String compares. Use of other data types on the left-hand side causes an exception.

Overrides:
cmpLt in class AbleContinuousVariable
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
true, if this data object is less than theRhs; false, otherwise.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

cmpLtEq

public boolean cmpLtEq(AbleRd theRhs)
                throws AbleDataException
Comparison, less than or equal to: compare the current value of this data object to the current value of theRhs.

"<=" is used for numeric compares; Collator.compare() is used for String compares. Use of other data types on the left-hand side causes an exception.

Overrides:
cmpLtEq in class AbleContinuousVariable
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
true, if this data object is less than or equal to theRhs; false, otherwise.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

cmpNeq

public boolean cmpNeq(AbleRd theRhs)
               throws AbleDataException
Comparison, not equal to: compare the current value of this data object to the current value of theRhs.

"!=" is used for numeric and boolean compares; ! equals() is used for Object compares; and ! Collator.equals() is used for String compares.

Overrides:
cmpNeq in class AbleContinuousVariable
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
true, if this data object is not equal to theRhs; false, otherwise.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

compPlus

public AbleLiteral compPlus(AbleRd theRhs)
                     throws AbleDataException
Compute, add or concatenate the current value of this data object to the current value of theRhs.

"+" is used for numeric addtion and String concatenation.

Overrides:
compPlus in class AbleContinuousVariable
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
The result of the addition or concatenation operation.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

compMinus

public AbleLiteral compMinus(AbleRd theRhs)
                      throws AbleDataException
Compute, subtract the current value of theRhs from the current value of this object.

"-" is used for numeric subtraction.

Overrides:
compMinus in class AbleContinuousVariable
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
The result of the subtraction operation.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

compMultiply

public AbleLiteral compMultiply(AbleRd theRhs)
                         throws AbleDataException
Compute, multiply the current value of this data object to the current value of theRhs.

"*" is used for numeric multiplication.

Overrides:
compMultiply in class AbleContinuousVariable
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
The result of the multiplication operation.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

compDivide

public AbleLiteral compDivide(AbleRd theRhs)
                       throws AbleDataException
Compute, divide the current value of this data object by the current value of theRhs.

"/" is used for numeric division.

Overrides:
compDivide in class AbleContinuousVariable
Parameters:
theRhs - The right-hand side of the comparison.

Returns:
The result of the division operation.
Throws:
AbleDataException - If the right-hand side cannot be converted (if necessary) and compared to this data object.

compUnaryMinus

public AbleLiteral compUnaryMinus(AbleRd theRhs)
                           throws AbleDataException
Compute, the unary minus of the current value of this object.

"-" is used for numeric negation.

Overrides:
compUnaryMinus in class AbleContinuousVariable
Parameters:
theRhs - The right-hand side of the operation (ignored).

Returns:
The result of the negation operation.
Throws:
AbleDataException - If the value of this data object cannot be negated.

setValueString

public void setValueString(java.lang.String theNewValue)
                    throws AbleDataException
Set the variable's current (crisp) value from a string. Note: This method is provided for the use of a rule language parser.
Overrides:
setValueString in class AbleContinuousVariable

getValueString

public java.lang.String getValueString()
Retrieve the variable's current (crisp) value as a string. Note: This method is provided for the use of a rule language parser.
Overrides:
getValueString in class AbleContinuousVariable

reset

public void reset()
           throws AbleDataException
Reset the variable to its intial state.
Overrides:
reset in class AbleContinuousVariable

getDataTypeClass

public java.lang.Class getDataTypeClass()
Description copied from class: AbleLhs
Retrieve the actual class of this object's underlying data type.
Overrides:
getDataTypeClass in class AbleContinuousVariable
Following copied from class: com.ibm.able.data.AbleLhs
Returns:
The class of the underlying data type.

getDataTypeClassName

public java.lang.String getDataTypeClassName()
Description copied from class: AbleLhs
Retrieve the name of the class of this object's underlying data type.
Overrides:
getDataTypeClassName in class AbleContinuousVariable
Following copied from class: com.ibm.able.data.AbleLhs
Returns:
A String that is the name of the class of the underlying data type.

getFuzzySets

public java.util.Hashtable getFuzzySets()

getFuzzyWorkArea

public AbleFuzzySet getFuzzyWorkArea()
Retrieve the fuzzy work area of this continuous variable.
Returns:
An AbleFuzzyWorkSet object.


setExist

public boolean setExist(java.lang.String theSetName)

getSet

public AbleFuzzySet getSet(java.lang.String theSetName)

getOrAddHedgedSet

public AbleFuzzySet getOrAddHedgedSet(java.lang.String theSetName,
                                      java.lang.String theHedges)
                               throws AbleDataException

addSet

public void addSet(AbleFuzzySetBeta theSet)
            throws AbleDataException

addSet

public void addSet(AbleFuzzySetGaussian theSet)
            throws AbleDataException

addSet

public void addSet(AbleFuzzySetLinear theSet)
            throws AbleDataException

addSet

public void addSet(AbleFuzzySetPi theSet)
            throws AbleDataException

addSet

public void addSet(AbleFuzzySetSegments theSet)
            throws AbleDataException

addSet

public void addSet(AbleFuzzySetShoulder theSet)
            throws AbleDataException

addSet

public void addSet(AbleFuzzySetSigmoid theSet)
            throws AbleDataException

addSet

public void addSet(AbleFuzzySetTrapezoid theSet)
            throws AbleDataException

addSet

public void addSet(AbleFuzzySetTriangle theSet)
            throws AbleDataException

validateSetBasics

protected void validateSetBasics(AbleFuzzySet theSet)
                          throws AbleDataException

addSetComplement

public void addSetComplement(java.lang.String theSetName,
                             java.lang.String theCompName)
                      throws AbleDataException

setAlphaCut

public void setAlphaCut(double theAlphaCut)

getDefuzzifyMethod

public final int getDefuzzifyMethod()
Retrieve the current defuzzification method.
Returns:
The current defuzzification method.

setDefuzzifyMethod

public void setDefuzzifyMethod(int theDefuzzifyMethod)
                        throws AbleDataException
Set the defuzzification method to the specified type.
Parameters:
theDefuzzifyMethod - The new defuzzification method.

Throws:
AbleDataException - If the specified defuzzification method is not recognised.

setDiscourseRange

public void setDiscourseRange(double theValueLo,
                              double theValueHi)
Set the variable's discourse range.
Parameters:
theValueLo - The new minimum value that the variable may assume.

theValueHi - The new maximum value that the variable may assume.


replaceSetSegments

public void replaceSetSegments(java.lang.String theFuzzySetName,
                               double[] theTruthVector)
                        throws AbleDataException
Replace the contents of an existing fuzzy set with new curve
Parameters:
theFuzzySetName - The name of the fuzzy set we want to replace. It must already exist
theTruthVector - The array of truth values

toString

public java.lang.String toString()
Retrieve a string describing (the contents of) the object.
Overrides:
toString in class AbleContinuousVariable
Returns:
A String containing the current contents of the object.

traceString

public java.lang.String traceString(int theTraceStringFlavor)
Retrieve a string describing (the contents of) the object.
Overrides:
traceString in class AbleContinuousVariable
Parameters:
theFlavor - An Able.TraceStringFlavor value.

Returns:
A String containing the current contents of the object.

Copyright

public static java.lang.String Copyright()
Determine the copyright of this class.
Returns:
A String containing this class's copyright statement.

ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003