|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--infosapient.system.ObservableImpl | +--infosapient.system.FzySystemComponent | +--infosapient.system.FzyKnowledgebase
Class FzyKnowledgebase is the repository for all of the information about this problem domain.
It contains the Rules, Attributes, and Sets for the domain described.
Field Summary | |
private java.util.Hashtable |
attribClauseDictionary
|
private java.util.Hashtable |
attributeDictionary
|
private java.lang.String |
authorFirstName
|
private java.lang.String |
authorLastName
|
private boolean |
backChain
Whether to back chain or not. |
private java.util.Hashtable |
deducingRules
|
private java.lang.String |
def_String
|
private FzyResolutionMethod |
defuzzmethod
How fuzzySet is defuzzified |
private java.lang.String |
description
|
private FzyCorrelation |
fzycorrmethod
Correlation method for variable |
private FzyImplicationMethod |
fzyimplmethod
Implication Method for fuzzy logic |
private FzyAttribute |
goalAttribute
The attribute that we are attempting to determine the value of (defuzzify). |
private java.io.File |
myFile
|
private java.lang.String |
name
|
private java.util.Hashtable |
referringRules
|
private java.util.Hashtable |
ruleDictionary
|
private boolean |
runBefore
Boolean to determine whether to run the unconditional rules BEFORE/AFTER the conditional rules have run. |
(package private) static long |
serialVersionUID
|
private java.util.Hashtable |
solutionSetDict
|
private java.util.Hashtable |
unconditionalRuleDict
|
private java.lang.String |
value
current value |
private java.lang.String |
writtenDate
|
Fields inherited from class infosapient.system.FzySystemComponent |
DEBUG_,
myID,
name,
pcs,
serialVersionUID,
trace,
vcs |
Fields inherited from class infosapient.system.ObservableImpl |
arr,
changed,
obs,
serialVersionUID |
Constructor Summary | |
FzyKnowledgebase()
Default constructor for FzyKnowledgebase. |
|
FzyKnowledgebase(java.lang.String aname)
|
Method Summary | |
boolean |
addAttribute(FzyAttribute anAttrib)
|
void |
addConseqClause(FzyAttribClause aac)
Add an attribClause to the attribClause table. |
boolean |
addRule(FzyRule aRule)
|
private boolean |
addUnconditionalRule(FzyUnconditionalRule aUncRule)
|
java.util.Enumeration |
attributeKeys()
|
java.util.Hashtable |
attributes()
|
void |
attributes(java.util.Hashtable attribDict)
|
boolean |
containsAttribute(java.lang.String attribName)
Return true if the knowledgebase contains an attribute of name: attribName. |
boolean |
containsRule(java.lang.String ruleName)
|
boolean |
containsSetGiven(java.lang.String attribName,
java.lang.String setName)
Return true if the knowledgebase contains an attribute of name: attribName
AND the attribute contains a set named: setName. |
java.util.Enumeration |
deducingRulesKeys()
|
java.lang.String |
description()
|
void |
description(java.lang.String desc)
|
FzyAttribute |
getAttribute(java.lang.String withKey)
Return the named FzyAttribute |
java.util.Enumeration |
getAttributeSetNames()
Return the set names within this knowledgebase Creation date: (04/14/01 1:58:04 PM) |
java.lang.String |
getAuthorFirstName()
Insert the method's description here. |
java.lang.String |
getAuthorLastName()
Insert the method's description here. |
java.util.Vector |
getConseqClauses(FzyAttribute fa)
Get vector of all consequents that determine given FzyAttribute |
FzyCorrelation |
getCorrelationMethod()
|
java.lang.String |
getCorrelationMethodName()
|
java.util.Hashtable |
getDeducingAttributes(FzyAttribute goalAttrib,
java.util.Hashtable attribs)
Return all attributes that are used as parameters to deduce the goal attribute. |
java.util.Hashtable |
getDeducingRules()
|
java.util.Vector |
getDeducingRulesFor(FzyAttribute attrib)
Return a vector of all rules that refer to this attribute within the rules consequent. |
java.lang.String |
getDescription()
|
java.io.File |
getFile()
returns the file that is used to store this KB |
FzyAttribute |
getGoal()
Return the current Goal of this knowledgebase. |
FzyImplicationMethod |
getImplicationMethod()
|
java.lang.String |
getImplicationMethodName()
|
java.util.Vector |
getReferringRulesFor(FzyAttribute attrib)
Return a vector of all rules that refer to this attribute within the rules premise. |
FzyResolutionMethod |
getResolutionMethod()
|
java.lang.String |
getResolutionMethodName()
|
FzyRule |
getRule(java.lang.String rNameAsKey)
|
java.util.Hashtable |
getSolutionSetDictionary()
|
FzySystemComponent |
getTypeForName(java.lang.String aName)
Return the type based on the name given. |
java.lang.String |
getWrittenDate()
Insert the method's description here. |
boolean |
isBackwardChain()
|
boolean |
isRunBefore()
|
void |
printOn(java.io.Writer outWriter,
int nTabs)
|
java.util.Hashtable |
referringRules()
|
void |
referringRules(java.util.Hashtable rr)
|
java.util.Enumeration |
referringRulesKeys()
|
void |
removeAttribute(FzyAttribute attrib)
Delete the indicated Attribute. |
void |
removeReferringRulesGivenSet(FzySet fs)
Remove all rules that refer to the specified set. |
void |
removeRule(FzyRule r)
Remove a rule from the rules dictionary, and each vector pointed to by the FzyAttribute in the Hashtables 'referringRules' and 'deducingRules' |
void |
reset()
Resets the knowledgebase so that a new consultation session can begin. |
private FzyAttribClause[] |
returnAllAttribClausesFor(FzyOperator fo)
Return an array of FzyAttribClauses given a FzyOperator Creation date: (1/28/00 12:45:57 PM) |
java.util.Enumeration |
ruleKeys()
|
java.util.Hashtable |
rules()
|
void |
rules(java.util.Hashtable dictionary)
|
void |
setAuthorFirstName(java.lang.String newAuthorFirstName)
Insert the method's description here. |
void |
setAuthorLastName(java.lang.String newAuthorLastName)
Insert the method's description here. |
void |
setCorrelationMethod(FzyCorrelation fcm)
|
void |
setCorrelationMethod(java.lang.String name)
set the correlation method using a name of a class default to FzyCorrelationMinimum on error |
void |
setDeducingRules(java.util.Hashtable dr)
|
void |
setDescription(java.lang.String desc)
|
void |
setFile(java.io.File f)
sets the file used to store this KB. |
void |
setGoalAttribute(FzyAttribute theGoal)
|
void |
setImplicationMethod(FzyImplicationMethod fim)
|
void |
setImplicationMethod(java.lang.String name)
set the implication method using a name of a class default to FzyImplicationMINMAX on error |
void |
setName(java.lang.String kbn)
Sets the name of the knowledgbase |
void |
setResolutionMethod(FzyResolutionMethod frm)
Set the Resolution method for this Knowledgebase. |
void |
setResolutionMethod(java.lang.String name)
set the resolution method using a name of a class default to FzyResolutionCENTROID on error |
void |
setRunBefore(boolean f)
Declare unconditional rules to be run before unconditional rules.(Default) |
void |
setSolutionSetDictionary(java.util.Hashtable ssDict)
|
void |
setWrittenDate(java.lang.String newWrittenDate)
Insert the method's description here. |
java.lang.StringBuffer |
toXML(int nTabs)
Represent this knowledgebase as XML tagged nodes. |
java.util.Enumeration |
unconditionalRuleKeys()
|
java.util.Hashtable |
unconditionalRules()
|
void |
update(Observable fso,
java.lang.Object obj)
Notifications of objects that this KB is observing. |
Methods inherited from class infosapient.system.FzySystemComponent |
addPropertyChangeListener,
addVetoableChangeListener,
equals,
getID,
getName,
getPropertyChangeSupport,
getVetoableChangeSupport,
hashCode,
removePropertyChangeListener,
removeVetoableChangeListener,
setID |
Methods inherited from class infosapient.system.ObservableImpl |
addObserver,
clearChanged,
containsObserver,
countObservers,
deleteObserver,
deleteObservers,
hasChanged,
notifyObservers,
notifyObservers,
setChanged |
Methods inherited from class java.lang.Object |
|
Field Detail |
static final long serialVersionUID
private java.io.File myFile
private java.lang.String value
private java.lang.String def_String
private java.lang.String authorFirstName
private java.lang.String authorLastName
private java.lang.String writtenDate
private java.util.Hashtable solutionSetDict
private java.util.Hashtable referringRules
private java.util.Hashtable deducingRules
private java.util.Hashtable ruleDictionary
private java.util.Hashtable unconditionalRuleDict
private java.util.Hashtable attributeDictionary
private FzyResolutionMethod defuzzmethod
private FzyCorrelation fzycorrmethod
private FzyImplicationMethod fzyimplmethod
private boolean runBefore
private final boolean backChain
private FzyAttribute goalAttribute
private java.lang.String name
private java.lang.String description
private java.util.Hashtable attribClauseDictionary
Constructor Detail |
public FzyKnowledgebase()
public FzyKnowledgebase(java.lang.String aname)
String
- The knowledgebase name.Method Detail |
public boolean addAttribute(FzyAttribute anAttrib)
public void addConseqClause(FzyAttribClause aac)
FzyAttribClause
- the attribute clause to be added.public boolean addRule(FzyRule aRule)
private boolean addUnconditionalRule(FzyUnconditionalRule aUncRule)
public java.util.Enumeration attributeKeys()
public java.util.Hashtable attributes()
public void attributes(java.util.Hashtable attribDict)
public boolean containsAttribute(java.lang.String attribName)
true
if the knowledgebase contains an attribute of name: attribName.String
- - attribNamepublic boolean containsRule(java.lang.String ruleName)
public boolean containsSetGiven(java.lang.String attribName, java.lang.String setName)
true
if the knowledgebase contains an attribute of name: attribName
AND the attribute contains a set named: setName.String
- - attribNameString
- - setNamepublic java.util.Enumeration deducingRulesKeys()
public java.lang.String description()
public void description(java.lang.String desc)
public FzyAttribute getAttribute(java.lang.String withKey) throws java.lang.IllegalArgumentException
the
- name of the fuzzy attribute - Stringpublic java.util.Enumeration getAttributeSetNames()
public java.lang.String getAuthorFirstName()
public java.lang.String getAuthorLastName()
public java.util.Vector getConseqClauses(FzyAttribute fa)
FzyAttribute
- -- FzyAttribute key to consequentspublic FzyCorrelation getCorrelationMethod()
public java.lang.String getCorrelationMethodName()
public java.util.Hashtable getDeducingAttributes(FzyAttribute goalAttrib, java.util.Hashtable attribs)
goalAttrib
- infosapient.system.FzyAttributeattribs
- java.util.Hashtablepublic java.util.Hashtable getDeducingRules()
public java.util.Vector getDeducingRulesFor(FzyAttribute attrib)
public java.lang.String getDescription()
public java.io.File getFile()
public FzyAttribute getGoal()
public FzyImplicationMethod getImplicationMethod()
public java.lang.String getImplicationMethodName()
public java.util.Vector getReferringRulesFor(FzyAttribute attrib)
public FzyResolutionMethod getResolutionMethod()
public java.lang.String getResolutionMethodName()
public FzyRule getRule(java.lang.String rNameAsKey)
public java.util.Hashtable getSolutionSetDictionary()
public FzySystemComponent getTypeForName(java.lang.String aName)
aName
- java.lang.Stringnull
if not found.)public java.lang.String getWrittenDate()
public boolean isBackwardChain()
public boolean isRunBefore()
public void printOn(java.io.Writer outWriter, int nTabs) throws java.io.IOException
public java.util.Hashtable referringRules()
public void referringRules(java.util.Hashtable rr)
public java.util.Enumeration referringRulesKeys()
public void removeAttribute(FzyAttribute attrib) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
FzyAttribute
- -- the attribute to be removed from the knowledgebase.public void removeReferringRulesGivenSet(FzySet fs) throws java.lang.IllegalArgumentException
fs
- infosapient.system.FzySetpublic void removeRule(FzyRule r) throws java.lang.IllegalArgumentException
the
- rule to be removed - FzyRulepublic void reset()
private FzyAttribClause[] returnAllAttribClausesFor(FzyOperator fo) throws java.lang.IllegalArgumentException
fo
- infosapient.opr.FzyOperatorpublic java.util.Enumeration ruleKeys()
public java.util.Hashtable rules()
public void rules(java.util.Hashtable dictionary)
public void setAuthorFirstName(java.lang.String newAuthorFirstName)
newAuthorFirstName
- java.lang.Stringpublic void setAuthorLastName(java.lang.String newAuthorLastName)
newAuthorLastName
- java.lang.Stringpublic void setCorrelationMethod(java.lang.String name)
public void setCorrelationMethod(FzyCorrelation fcm)
public void setDeducingRules(java.util.Hashtable dr)
public void setDescription(java.lang.String desc)
public void setFile(java.io.File f)
f
- -- the java.io.File that contains this KBpublic void setGoalAttribute(FzyAttribute theGoal) throws java.lang.IllegalArgumentException
FzyAttribute
- the goal attribute.public void setImplicationMethod(java.lang.String name)
public void setImplicationMethod(FzyImplicationMethod fim)
public void setName(java.lang.String kbn)
public void setResolutionMethod(java.lang.String name)
public void setResolutionMethod(FzyResolutionMethod frm)
FzyResolutionMethod
- -- the method object used to defuzzify the goal solution set.FzyResolutionMethod
public void setRunBefore(boolean f)
f
- - boolean valuepublic void setSolutionSetDictionary(java.util.Hashtable ssDict)
public void setWrittenDate(java.lang.String newWrittenDate)
newWrittenDate
- java.lang.Stringpublic java.lang.StringBuffer toXML(int nTabs)
public java.util.Enumeration unconditionalRuleKeys()
public java.util.Hashtable unconditionalRules()
public void update(Observable fso, java.lang.Object obj)
|
License to use this program is provided under the TERMS OF THE COMMON PUBLIC LICENSE 0.5. ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |