public class PairSimilarityMathFunc extends PairSimilarity
Constructor | Description |
---|---|
PairSimilarityMathFunc(int id,
java.lang.String mathFunc) |
Constructor for this mathematical function
|
Modifier and Type | Method | Description |
---|---|---|
FloatField |
getFloatFieldValue(double gx,
double gy) |
Gets value of the mathematical function stored in this object, for given two attribute values
|
java.lang.String |
getMathFunc() |
Gets textual representation of a mathematical function stored in this object
|
SimpleField |
getSimilarity(SimpleField firstField,
SimpleField secondField) |
Gets similarity between given two field's values, i.e. similarity of the first field to the second field
|
double |
getValue(double gx,
double gy) |
Gets value of the mathematical function stored in this object, for given two attribute values
|
boolean |
isNeededType(PairSimilarity pairSimilairty) |
Checks whether given pair similarity object is of type
PairSimilarityMathFunc and is defined for the same attribute as this object |
java.lang.String |
toString() |
Gets string representation of this mathematical function
|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getId, setId
public PairSimilarityMathFunc(int id, java.lang.String mathFunc) throws java.lang.Exception
id
- function id, corresponding to an attribute numbermathFunc
- string representation of a mathematical functionjava.lang.Exception
- when given string cannot be parsed to a mathematical functionpublic SimpleField getSimilarity(SimpleField firstField, SimpleField secondField)
getSimilarity
in class PairSimilarity
firstField
- first field's valuesecondField
- second field's valuepublic java.lang.String getMathFunc()
public double getValue(double gx, double gy) throws java.lang.Exception
gx
- attribute value of a first objectgy
- attribute value of a first objectjava.lang.Exception
- when an error occurspublic FloatField getFloatFieldValue(double gx, double gy) throws java.lang.Exception
gx
- attribute value of a first objectgy
- attribute value of a first objectFloatField
value of the mathematical function stored in this object, for given two attribute valuesjava.lang.Exception
- when an error occurspublic boolean isNeededType(PairSimilarity pairSimilairty)
PairSimilarityMathFunc
and is defined for the same attribute as this objectisNeededType
in class PairSimilarity
pairSimilairty
- another pair similarity objecttrue
if given pair similarity object is of type PairSimilarityMathFunc
and is defined for the same attribute as this object,
false
otherwisepublic java.lang.String toString()
toString
in class java.lang.Object