|
||||||||||
| 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.AmalgamationFct
public class AmalgamationFct
This function is used to compute similarity of to ConceptAttribute objects. First the similarity of the attributes of the concepts is computed and then these values are amalgamated using this function. Possible types of amalgamation functions are enumerated in AmalgamationConfig.
| Constructor Summary | |
|---|---|
AmalgamationFct(AmalgamationConfig type,
Concept c,
java.lang.String name)
Initializes this with the given type, description and inheritance similarity. |
|
| Method Summary | |
|---|---|
Similarity |
calculateSimilarity(Attribute value1,
Attribute value2)
Returns the similarity of the given SimpleAttribute objects. |
java.lang.Object |
getActiveFct(AttributeDesc att)
Gets the active similarity function for this attribute description. |
Concept |
getConcept()
|
java.lang.String |
getName()
Returns the name of this function. |
Project |
getProject()
|
AmalgamationConfig |
getType()
The type for the amalgamation. |
java.lang.Number |
getWeight(AttributeDesc desc)
|
java.lang.Boolean |
isActive(AttributeDesc att)
Attributes may be inactive, meaning that they appear in the model but should not be used for similarity computations. |
void |
remove(AttributeDesc desc)
|
void |
setActive(AttributeDesc att,
boolean active)
Sets this attribute to active or inactive. |
void |
setActiveFct(AttributeDesc att,
java.lang.Object activeSim)
Sets the active similarity function for this attribute description to activeSim. |
void |
setName(java.lang.String name)
Sets the name of this function to name. |
void |
setType(AmalgamationConfig type)
Sets the type of this function to type. |
void |
setWeight(AttributeDesc attDesc,
java.lang.Number weight)
Sets the weight of the given attribute to weight. |
void |
setWeight(java.lang.String name,
java.lang.Number weight)
Sets the weight of the given attribute to weight. |
void |
update(java.util.Observable arg0,
java.lang.Object arg1)
|
| 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 AmalgamationFct(AmalgamationConfig type,
Concept c,
java.lang.String name)
type - the amalgamation type (e.g. minimum, maximum, euclidean or
weighted sum)c - the concept to which this function can be
applied.name - the name of this function| Method Detail |
|---|
public Concept getConcept()
public Similarity calculateSimilarity(Attribute value1,
Attribute value2)
throws java.lang.Exception
value1 - the query attributevalue2 - the case attribute
java.lang.Exceptionpublic AmalgamationConfig getType()
AmalgamationConfigpublic void setType(AmalgamationConfig type)
type - AmalgamationConfigpublic java.lang.String getName()
public void setName(java.lang.String name)
name - the new name of this function.
public void setWeight(AttributeDesc attDesc,
java.lang.Number weight)
attDesc - the description of the attribute whose weight should be setweight - the new weight of the attribute
public void setWeight(java.lang.String name,
java.lang.Number weight)
name - the name of the attribute description whose weight should be setweight - the new weight of the attributepublic Project getProject()
public java.lang.Boolean isActive(AttributeDesc att)
public void setActive(AttributeDesc att,
boolean active)
active - true, if this attribute is used for similarity computations,
false otherwise
public void setActiveFct(AttributeDesc att,
java.lang.Object activeSim)
activeSim - the activeSim to setpublic java.lang.Object getActiveFct(AttributeDesc att)
public void remove(AttributeDesc desc)
public java.lang.Number getWeight(AttributeDesc desc)
public void update(java.util.Observable arg0,
java.lang.Object arg1)
update in interface java.util.Observer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||