|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
de.dfki.mycbr.core.similarity.SymbolFct
de.dfki.mycbr.core.similarity.OrderedSymbolFct
public class OrderedSymbolFct
This function provides a linear order of the known symbol attributes for the given description. These symbol attributes are then compared using the internal similarity function on the indexes. Therefore, the internal similarity function is instance of IntegerSimilarityFunction.
| Constructor Summary | |
|---|---|
OrderedSymbolFct(Project prj,
SymbolDesc desc,
java.lang.String name)
Initializes this with the given description. |
|
| Method Summary | |
|---|---|
void |
addSymbol(SymbolAttribute att)
Adds the given attribute to the list of ordered symbols. |
void |
clone(AttributeDesc descNEW,
boolean active)
Creates a new function which is the same function as this but with a different description, namely descNEW. |
int |
getDistanceLastFirst()
|
IntegerFct |
getInternalFunction()
Gets the internal similarity function. |
java.util.HashMap<SymbolAttribute,java.lang.Integer> |
getOrder()
|
boolean |
isCyclic()
Returns whether this function is cyclic or not. |
void |
removeSymbol(SymbolAttribute att)
Removes the given attribute from the list of ordered symbols and updates the internal tabel |
void |
setCyclic(boolean cyclic)
Specifies whether this function is cyclic or not. |
void |
setDistanceLastFirst(int distanceLastFirst)
|
void |
setOrderIndexOf(java.lang.String att,
int index)
Sets the index of att used to linearly order the attributes to index. |
void |
setOrderIndexOf(SymbolAttribute att,
int index)
Sets the index of att used to linearly order the attributes to index. |
boolean |
setSimilarity(Attribute att1,
Attribute att2,
Similarity sim)
Sets the similarity of att1 and att2 to sim. |
boolean |
setSimilarity(java.lang.String symbol1,
java.lang.String symbol2,
double sim)
Sets the similarity of the given symbols to a Similarity.get object initialized with sim. |
boolean |
setSimilarity(java.lang.String symbol1,
java.lang.String symbol2,
Similarity sim)
Sets the similarity the given symbols to sim. |
boolean |
setSimilarity(SymbolAttribute att1,
SymbolAttribute att2,
double sim)
Sets the similarity of att1 and att2 to a Similarity.get object initialized with sim. |
void |
update(java.util.Observable o,
java.lang.Object arg1)
|
void |
updateTable()
Updates the similarity for each attribute combination in the underlying table according to the similarity specified by the taxonomy |
| Methods inherited from class de.dfki.mycbr.core.similarity.SymbolFct |
|---|
calculateSimilarity, calculateSimilarity, getDesc, getMultipleConfig, getName, getProject, isSymmetric, setMultipleConfig, setName, setSymmetric |
| Methods inherited from class java.util.Observable |
|---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OrderedSymbolFct(Project prj,
SymbolDesc desc,
java.lang.String name)
throws java.lang.Exception
desc - the description of the attributes to which this function can be applied
java.lang.Exception| Method Detail |
|---|
public void updateTable()
throws java.lang.Exception
java.lang.Exception
public void update(java.util.Observable o,
java.lang.Object arg1)
update in interface java.util.Observerupdate in class SymbolFctpublic java.util.HashMap<SymbolAttribute,java.lang.Integer> getOrder()
public IntegerFct getInternalFunction()
keepTableConsistent
is set. Else sets the flag consistent to false.
public void removeSymbol(SymbolAttribute att)
att - the attribute to be removedpublic void addSymbol(SymbolAttribute att)
highestOrder + 10.
If this attribute is already contained, does nothing.
Adds this attribute to the internal table, too.
att - the attribute to be added
public void setOrderIndexOf(SymbolAttribute att,
int index)
throws java.lang.Exception
att - the attribute whose index should be setindex - the index to set
java.lang.Exception
public void setOrderIndexOf(java.lang.String att,
int index)
throws java.lang.Exception
att - the attribute whose index should be setindex - the index to set
java.lang.Exceptionpublic boolean isCyclic()
public void setCyclic(boolean cyclic)
cyclic - true if this function is cyclic, false otherwise.
public boolean setSimilarity(SymbolAttribute att1,
SymbolAttribute att2,
double sim)
SymbolFctSymbolFct.setSimilarity(Attribute, Attribute, Similarity)
setSimilarity in class SymbolFctatt1 - the first attributeatt2 - the second attributesim - the Similarity.get
public boolean setSimilarity(java.lang.String symbol1,
java.lang.String symbol2,
double sim)
SymbolFctSymbolFct.setSimilarity(Attribute, Attribute, Similarity)
setSimilarity in class SymbolFctsymbol1 - the first attribute's valuesymbol2 - the second attribute's valuesim - the Similarity.get
public boolean setSimilarity(java.lang.String symbol1,
java.lang.String symbol2,
Similarity sim)
SymbolFctSymbolFct.setSimilarity(Attribute, Attribute, Similarity)
setSimilarity in class SymbolFctsymbol1 - the first attribute's valuesymbol2 - the second attribute's valuesim - the Similarity.get
public boolean setSimilarity(Attribute att1,
Attribute att2,
Similarity sim)
SymbolFct
setSimilarity in class SymbolFctatt1 - the first attributeatt2 - the second attributesim - the Similarity.get
public void clone(AttributeDesc descNEW,
boolean active)
ISimFct
clone in interface ISimFctclone in class SymbolFctpublic void setDistanceLastFirst(int distanceLastFirst)
distanceLastFirst - the distanceLastFirst to setpublic int getDistanceLastFirst()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||