|
||||||||||
| 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
public class SymbolFct
Holds the similarity of the known attributes for the given description in a two dimensional array (table). The indexes of the attributes in this table are maintained by the corresponding range (given by the description). If this function is symmetric, the table should be symmetric, too.
| Constructor Summary | |
|---|---|
SymbolFct(Project prj,
SymbolDesc desc,
java.lang.String name)
Initializes this by asking the given description for the number of allowed symbols. |
|
SymbolFct(SymbolFct f)
Initializes this by transforming the given symbol function into a similarity table. |
|
| Method Summary | |
|---|---|
Similarity |
calculateSimilarity(Attribute attribute,
Attribute attribute2)
Returns the similarity of the given attributes. |
Similarity |
calculateSimilarity(java.lang.String value1,
java.lang.String value2)
Returns the similarity of the given attributes. |
void |
clone(AttributeDesc descNEW,
boolean active)
Creates a new function which is the same function as this but with a different description, namely descNEW. |
SymbolDesc |
getDesc()
Gets the symbol description of the attributes this function is defined on |
MultipleConfig |
getMultipleConfig()
|
java.lang.String |
getName()
Returns the name of this function |
Project |
getProject()
|
boolean |
isSymmetric()
Specifies whether this function is symmetric or asymmetric |
void |
setMultipleConfig(MultipleConfig mc)
|
void |
setName(java.lang.String name)
Sets the name of this function to name |
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 |
setSymmetric(boolean symmetric)
Specifies whether this function is symmetric or not. |
void |
update(java.util.Observable o,
java.lang.Object arg)
|
| 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 SymbolFct(Project prj,
SymbolDesc desc,
java.lang.String name)
initTable()
to fill the table with default values.
desc - the description of the given symbol attributespublic SymbolFct(SymbolFct f)
SimpleAttDesc.deleteSimFct(ISimFct) and then SimpleAttDesc.addFct(ISimFct)
f - any symbol function| Method Detail |
|---|
public Similarity calculateSimilarity(Attribute attribute,
Attribute attribute2)
calculateSimilarity in interface ISimFctattribute - first attributeattribute2 - second attribute
java.lang.Exception
public Similarity calculateSimilarity(java.lang.String value1,
java.lang.String value2)
throws java.lang.Exception
value1 - first attributevalue2 - second attribute
java.lang.Exception
public boolean setSimilarity(SymbolAttribute att1,
SymbolAttribute att2,
double sim)
setSimilarity(Attribute, Attribute, Similarity)
att1 - the first attributeatt2 - the second attributesim - the Similarity.get
public boolean setSimilarity(java.lang.String symbol1,
java.lang.String symbol2,
double sim)
setSimilarity(Attribute, Attribute, Similarity)
symbol1 - 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)
setSimilarity(Attribute, Attribute, Similarity)
symbol1 - the first attribute's valuesymbol2 - the second attribute's valuesim - the Similarity.get
public boolean setSimilarity(Attribute att1,
Attribute att2,
Similarity sim)
att1 - the first attributeatt2 - the second attributesim - the Similarity.get
public boolean isSymmetric()
ISimFct
isSymmetric in interface ISimFctpublic void setSymmetric(boolean symmetric)
setSymmetric in interface ISimFctsymmetric - true, if this function is symmetric, false otherwisepublic SymbolDesc getDesc()
getDesc in interface ISimFctpublic java.lang.String getName()
ISimFct
getName in interface ISimFctpublic void setName(java.lang.String name)
ISimFct
setName in interface ISimFctname - the new name of this functionpublic Project getProject()
getProject in interface ISimFctpublic MultipleConfig getMultipleConfig()
getMultipleConfig in interface ISimFctpublic void setMultipleConfig(MultipleConfig mc)
setMultipleConfig in interface ISimFct
public void update(java.util.Observable o,
java.lang.Object arg)
update in interface java.util.Observer
public void clone(AttributeDesc descNEW,
boolean active)
ISimFct
clone in interface ISimFct
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||