|
||||||||||
| 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.NumberFct
de.dfki.mycbr.core.similarity.AdvancedFloatFct
public class AdvancedFloatFct
Used for calculating similarities of FloatAttribute objects. This function can also be used for calculating similarity of ordered symbol attributes. The basis of this function is a simple graph. You can add additional points to this graph. The similarity function is then the interpolation of these points.
| Constructor Summary | |
|---|---|
AdvancedFloatFct(Project prj,
FloatDesc desc,
java.lang.String name)
Initializes this with the given description. |
|
| Method Summary | |
|---|---|
void |
addAdditionalPoint(java.lang.Double key,
Similarity value)
Adds the specified point to the list of additional points. |
Similarity |
calculateSimilarity(Attribute a1,
Attribute a2)
Calculates the similarity of the specified attributes using the interpolated function. |
Similarity |
calculateSimilarity(float q,
float c)
|
void |
clone(AttributeDesc descNEW,
boolean active)
Creates a new function which is the same function as this but with a different description, namely descNEW. |
boolean |
fitsDistance(double x)
|
java.util.TreeMap<java.lang.Double,Similarity> |
getAdditionalPoints()
Returns the map of additional point used to interpolate this function Points are pairs of a double value and a similarity |
double |
getDiff()
|
double |
getMax()
|
double |
getMaxForQuotient()
|
double |
getMin()
|
void |
setDistanceFct(DistanceConfig df)
Sets the mode of this function to mode |
void |
setMaxForQuotient(double max)
|
void |
update(java.util.Observable arg0,
java.lang.Object arg1)
|
| Methods inherited from class de.dfki.mycbr.core.similarity.NumberFct |
|---|
getDesc, getDistanceFct, 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 AdvancedFloatFct(Project prj,
FloatDesc desc,
java.lang.String name)
desc - the description of the attributes to be compared| Method Detail |
|---|
public Similarity calculateSimilarity(Attribute a1,
Attribute a2)
throws java.lang.Exception
a1 - the first valuea2 - the second value
java.lang.Exception
public Similarity calculateSimilarity(float q,
float c)
throws java.lang.Exception
java.lang.Exceptionpublic java.util.TreeMap<java.lang.Double,Similarity> getAdditionalPoints()
public void addAdditionalPoint(java.lang.Double key,
Similarity value)
key - Double, the distance describing the first coordinate of the new pointvalue - Similarity used as the value for the second coordinatepublic double getMin()
public double getMax()
public double getDiff()
public void setDistanceFct(DistanceConfig df)
NumberFct
setDistanceFct in class NumberFctdf - the new mode of this function
public void clone(AttributeDesc descNEW,
boolean active)
ISimFct
public void update(java.util.Observable arg0,
java.lang.Object arg1)
public boolean fitsDistance(double x)
x - a value to be checked
public double getMaxForQuotient()
public void setMaxForQuotient(double max)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||