public class OrderedSymbolFct extends SymbolFct implements java.util.Observer
| Constructor and Description |
|---|
OrderedSymbolFct(Project prj,
SymbolDesc desc,
java.lang.String name)
Initializes this with the given description.
|
| Modifier and Type | Method and Description |
|---|---|
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
|
calculateSimilarity, calculateSimilarity, getDesc, getMultipleConfig, getName, getProject, isSymmetric, setMultipleConfig, setName, setSymmetricpublic 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 appliedjava.lang.Exceptionpublic void updateTable()
throws java.lang.Exception
java.lang.Exceptionpublic void update(java.util.Observable o,
java.lang.Object arg1)
public 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 addedpublic void setOrderIndexOf(SymbolAttribute att, int index) throws java.lang.Exception
att - the attribute whose index should be setindex - the index to setjava.lang.Exceptionpublic void setOrderIndexOf(java.lang.String att,
int index)
throws java.lang.Exception
att - the attribute whose index should be setindex - the index to setjava.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.getpublic 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.getpublic 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.getpublic boolean setSimilarity(Attribute att1, Attribute att2, Similarity sim)
SymbolFctsetSimilarity in class SymbolFctatt1 - the first attributeatt2 - the second attributesim - the Similarity.getpublic void clone(AttributeDesc descNEW, boolean active)
ISimFctpublic void setDistanceLastFirst(int distanceLastFirst)
distanceLastFirst - the distanceLastFirst to setpublic int getDistanceLastFirst()