public class FloatFct extends NumberFct
| Constructor and Description |
|---|
FloatFct(Project prj,
FloatDesc desc,
java.lang.String name)
Constructor should only be called by FunctionContainer.
|
| Modifier and Type | Method and Description |
|---|---|
Similarity |
calculateSimilarity(Attribute a1,
Attribute a2)
Returns the similarity of the given attributes.
|
Similarity |
calculateSimilarity(java.lang.Float value1,
java.lang.Float value2)
Calculates the similarity of the given Floats.
|
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) |
double |
getDiff() |
double |
getFunctionParameterL()
Gets the function's parameter for case < query to value.
|
double |
getFunctionParameterR()
Gets the function's parameter for query < case to value.
|
NumberConfig |
getFunctionTypeL() |
NumberConfig |
getFunctionTypeR() |
double |
getMax() |
double |
getMaxForQuotient() |
double |
getMin() |
void |
setDistanceFct(DistanceConfig df)
Sets the mode of this function to mode
|
boolean |
setFunctionParameterL(double value)
Sets the function's parameter for query < case to value.
|
boolean |
setFunctionParameterR(double value)
Sets the function's parameter for query < case to value.
|
void |
setFunctionTypeL(NumberConfig type)
Sets the type of the function for case < query.
|
void |
setFunctionTypeR(NumberConfig type)
Sets the type of the function for query < case.
|
void |
setMaxForQuotient(double max) |
void |
update(java.util.Observable arg0,
java.lang.Object arg1) |
void |
updateFunctionParams() |
getDesc, getDistanceFct, getMultipleConfig, getName, getProject, isSymmetric, setMultipleConfig, setName, setSymmetricpublic Similarity calculateSimilarity(Attribute a1, Attribute a2) throws java.lang.Exception
a1 - the first valuea2 - the second valuejava.lang.Exceptionpublic Similarity calculateSimilarity(java.lang.Float value1, java.lang.Float value2) throws java.lang.Exception
calculateSimilarity(Attribute, Attribute). Be aware that
calculateSimilarity(value1, values2) might differ from
calculateSimilarity(value2, values1). When calculating
similarities, the first attribute is always referred to as the query
value, the second parameter as the case value.value1 - the first attribute to be comparedvalue2 - the second attribute to be comparedjava.lang.Exceptionpublic boolean setFunctionParameterR(double value)
value - the function parameter for query < casepublic boolean setFunctionParameterL(double value)
value - the function parameter for query < casepublic double getFunctionParameterR()
public double getFunctionParameterL()
public void setFunctionTypeR(NumberConfig type)
type - the type of the functionpublic void setFunctionTypeL(NumberConfig type)
type - the type of the functionpublic NumberConfig getFunctionTypeL()
public NumberConfig getFunctionTypeR()
public double getMin()
public double getMax()
public double getDiff()
public void setDistanceFct(DistanceConfig df)
NumberFctsetDistanceFct in class NumberFctdf - the new mode of this functionpublic void clone(AttributeDesc descNEW, boolean active)
ISimFctpublic void update(java.util.Observable arg0,
java.lang.Object arg1)
public void updateFunctionParams()
public boolean fitsDistance(double x)
x - a value to be checkedpublic double getMaxForQuotient()
public void setMaxForQuotient(double max)