PairSimilarityMathFunc
, PairSimilarityTable
public abstract class PairSimilarity
extends java.lang.Object
Constructor | Description |
---|---|
PairSimilarity(int atributeId) |
Constructor for similarity function, setting index of an attribute from memory container for which
this similarity function is defined
|
Modifier and Type | Method | Description |
---|---|---|
int |
getId() |
Gets index of an attribute from memory container for which this similarity function is defined
|
abstract 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
|
abstract boolean |
isNeededType(PairSimilarity pairSimilairty) |
Checks if the other
PairSimilarity subclass object is of the same type (table or math function),
if other object is defined for the same attribute (has the same atributeId value)
and when both this and other object are table type similarities, checks if both objects have the same header |
void |
setId(int atributeId) |
Sets index of an attribute from memory container for which this similarity function is defined
|
public PairSimilarity(int atributeId)
atributeId
- index of an attribute from memory containerInvalidValueException
- when given attribute id is smaller than zeropublic void setId(int atributeId)
atributeId
- index of an attribute from memory containerpublic int getId()
public abstract SimpleField getSimilarity(SimpleField firstField, SimpleField secondField)
firstField
- first field's valuesecondField
- second field's valuepublic abstract boolean isNeededType(PairSimilarity pairSimilairty)
PairSimilarity
subclass object is of the same type (table or math function),
if other object is defined for the same attribute (has the same atributeId
value)
and when both this and other object are table type similarities, checks if both objects have the same headerpairSimilairty
- another pair similarity objecttrue
when given object is of the same type as this object, false
otherwise