|
|||||||||
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.FzyClauseComponent | +--infosapient.system.FzyAttribute
Class FzyAttribute represents the 'Universe of Discourse' for a fuzzy space. I.e. it represents the translation of contigous crisp values into symbolic values such as 'high', 'light', etc. for a given attribute. An attribute is any given property or quality for an entity.
Examples of an attribute would be
Engine temperature,
Profits or sales for a company,
A person's blood pressure.
Inner Class Summary | |
(package private) class |
FzyAttribute.MembershipGreaterThan
|
Field Summary | |
private java.lang.String |
attributeDescription
|
private java.lang.String |
attributeName
|
private java.lang.String |
attributePrompt
|
private double |
currDomainValue
|
private double |
initialValue
|
(package private) static long |
serialVersionUID
|
private java.util.Vector |
sets
|
private FzySolutionSet |
solutionSet
|
private boolean |
solutionSetCreated
|
private FzyKnowledgebase |
theKB
|
Fields inherited from class infosapient.system.FzyClauseComponent |
owner,
text |
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 | |
FzyAttribute(FzyKnowledgebase kb)
|
|
FzyAttribute(java.lang.String attribName,
FzyKnowledgebase kb)
|
|
FzyAttribute(java.lang.String attribName,
java.lang.String attribDesc,
java.lang.String attribPrompt,
FzyKnowledgebase kb)
Create a new attribute with name, description, prompt, and knowledgebase. |
Method Summary | |
boolean |
addSet(FzySet aSet)
Add a unique FzySet to this FzyAttribute. |
boolean |
addSet(FzySet aSet,
int index)
Add a set at a specific index. |
void |
ask()
Used by the rules engine to find out what the current solution is by asking the user. |
java.lang.Object |
clone()
Provides a deep copy of this attribute, including a copy of its set collection, goal set or attribute, currentDomainValue and solutionSet. |
boolean |
containsSet(FzySet aSet)
returns a boolean if this attribute contains the given FzySet. |
boolean |
containsSetNamed(java.lang.String aName)
returns a boolean if this attribute contains the given FzySet name . |
com.objectspace.jgl.Array |
containsValue(double value)
Checks whether a given value is within this domain and returns an array of FzySets |
double |
getCurrentDomainValue()
Return the current domain value of this attribute. |
java.lang.String |
getDescription()
Get the description for this attribute. |
double |
getDOMForCollection(double value)
Returns the highest membership within the domain of all fuzzy sets within this attribute. |
double |
getInitialValue()
Get this attribute's initial value. |
FzyKnowledgebase |
getKB()
Return the Knowledgebase that this attribute belongs to. |
java.lang.String |
getPrompt()
Get the prompt for this attribute. |
FzySet |
getSetNamed(java.lang.String aName)
returns a FzySet given its name. |
java.lang.String[] |
getSetNames()
Return an array containing the set names in sequence. |
double |
getSolution()
|
double |
getSolutionDOM()
|
FzySolutionSet |
getSolutionSet()
Return the solution set for this attribute. |
boolean |
hasSolution()
|
void |
printOn(java.io.Writer outWriter,
int nTabs)
Used to represent this attribute with its sets when saving knowledgebase |
void |
removeAllSets()
Remove all sets within this Attribute. |
int |
removeFSet(FzySet rSet)
Remove a fuzzy set and return the index that the set was found at. |
void |
reset()
Resets the current domain value to Double.NaN |
void |
setChanged()
Required for FzyAttribute inner class support. |
void |
setCurrentDomainValue(double value)
Set the current domain value of this attribute. |
void |
setDescription(java.lang.String aDesc)
Set the description for this attribute. |
void |
setInitialValue(double newInitialValue)
Set the initial value of this attribute. |
void |
setPrompt(java.lang.String aPrompt)
Set the prompt for this attribute. |
java.util.Vector |
sets()
Return the set collection as a java.util.Vector |
void |
setSolution(double d)
|
java.lang.String |
toString()
String value of this object. |
java.lang.StringBuffer |
toXML(int nTabs)
Represent this attribute as xml tags. |
void |
update(Observable obser,
java.lang.Object obj)
Used by the objects that I am observing to let me know that their state has changed. |
Methods inherited from class infosapient.system.FzyClauseComponent |
append,
append,
getOwner,
getText,
setOwnerClause,
setText,
toText |
Methods inherited from class infosapient.system.FzySystemComponent |
addPropertyChangeListener,
addVetoableChangeListener,
equals,
getID,
getName,
getPropertyChangeSupport,
getVetoableChangeSupport,
hashCode,
removePropertyChangeListener,
removeVetoableChangeListener,
setID,
setName |
Methods inherited from class infosapient.system.ObservableImpl |
addObserver,
clearChanged,
containsObserver,
countObservers,
deleteObserver,
deleteObservers,
hasChanged,
notifyObservers,
notifyObservers |
Methods inherited from class java.lang.Object |
|
Field Detail |
static final long serialVersionUID
private boolean solutionSetCreated
private java.util.Vector sets
private double currDomainValue
private double initialValue
private java.lang.String attributeName
private java.lang.String attributeDescription
private java.lang.String attributePrompt
private FzyKnowledgebase theKB
private FzySolutionSet solutionSet
Constructor Detail |
public FzyAttribute(FzyKnowledgebase kb) throws java.lang.IllegalArgumentException
public FzyAttribute(java.lang.String attribName, FzyKnowledgebase kb) throws java.lang.IllegalArgumentException
public FzyAttribute(java.lang.String attribName, java.lang.String attribDesc, java.lang.String attribPrompt, FzyKnowledgebase kb) throws java.lang.IllegalArgumentException
String
- - the proposed attribute name (MAY NOT be null).String
- - the description of this attribute.String
- - the prompt for the attribute.FzyKnowledgebase
- - the kb that this attribute will be added to (cannot be null).Method Detail |
public boolean addSet(FzySet aSet) throws java.lang.IllegalArgumentException
FzySet
- the set to be added to the attribute.public boolean addSet(FzySet aSet, int index)
FzySet
- the set to be added.int
- the index that the set is to be placed at.public void ask()
FzyTorquemada.solveGoal(infosapient.system.FzyAttribClause)
,
FzyEngineController#handleAskPrompt
public java.lang.Object clone()
public boolean containsSet(FzySet aSet) throws java.lang.IllegalArgumentException
FzySet
- -- the set to be found within this FzyAttribute.public boolean containsSetNamed(java.lang.String aName) throws java.lang.IllegalArgumentException
name
.String
- name -- the set to be found within this FzyAttribute.public com.objectspace.jgl.Array containsValue(double value)
double
- the value to be comparedpublic double getCurrentDomainValue()
public java.lang.String getDescription()
public double getDOMForCollection(double value) throws java.lang.IllegalArgumentException
double
- the value within this domainpublic double getInitialValue()
public FzyKnowledgebase getKB()
public java.lang.String getPrompt()
public FzySet getSetNamed(java.lang.String aName) throws java.lang.IllegalArgumentException
String
- name -- the set to be found within this FzyAttribute.public java.lang.String[] getSetNames()
public double getSolution()
public double getSolutionDOM()
public FzySolutionSet getSolutionSet()
public boolean hasSolution()
public void printOn(java.io.Writer outWriter, int nTabs) throws java.io.IOException
java.io.Writer
- - the outputWriter to useint
- - number of tabs to space over for this attribute.public void removeAllSets()
public int removeFSet(FzySet rSet) throws java.lang.IllegalArgumentException
FzySet
- The FzySet to be removed.public void reset()
public void setChanged()
public void setCurrentDomainValue(double value)
double
- the current domain.public void setDescription(java.lang.String aDesc)
String
- the descriptionpublic void setInitialValue(double newInitialValue)
newInitialValue
- doublepublic void setPrompt(java.lang.String aPrompt)
String
- the promptpublic java.util.Vector sets()
public void setSolution(double d)
public java.lang.String toString()
public java.lang.StringBuffer toXML(int nTabs)
public void update(Observable obser, 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 |