|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.hpi.fgis.dude.similarityfunction.AbstractSimilarityFunction de.hpi.fgis.dude.similarityfunction.aggregators.Aggregator
public abstract class Aggregator
Aggregator
aggregates the similarities returned by different SimilarityFunction
s.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface de.hpi.fgis.dude.similarityfunction.SimilarityFunction |
---|
SimilarityFunction.SimilarityValidationState |
Constructor Summary | |
---|---|
protected |
Aggregator()
Internal constructor for Jsonable deserialization. |
|
Aggregator(SimilarityFunction... simFunctions)
Initializes a MultiDuDeObjectComparator with a number of sub-comparators. |
Method Summary | |
---|---|
void |
add(SimilarityFunction simFunction)
Adds a SimilarityFunction to this Aggregator with no special multiplier. |
void |
add(SimilarityFunction simFunction,
int multiplier)
Adds a SimilarityFunction to this Aggregator with the passed multiplier. |
protected double |
calculateSimilarity(DuDeObject obj1,
DuDeObject obj2)
Calculates the similarity of the passed DuDeObject s. |
boolean |
equals(Object obj)
|
protected abstract double |
getAggregatedSimilarity(double[] similarities,
int[] multipliers)
Aggregates the passed similarities and returns the aggregated similarity. |
int |
hashCode()
|
Methods inherited from class de.hpi.fgis.dude.similarityfunction.AbstractSimilarityFunction |
---|
getLastValidationState, getSimilarity, setValidationState |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Aggregator()
Jsonable
deserialization.
public Aggregator(SimilarityFunction... simFunctions)
MultiDuDeObjectComparator
with a number of sub-comparators.
simFunctions
- The SimilarityFunction
s of which the aggregated similarity shall be calculated.Method Detail |
---|
public void add(SimilarityFunction simFunction)
SimilarityFunction
to this Aggregator
with no special multiplier.
simFunction
- The SimilarityFunction
to add.public void add(SimilarityFunction simFunction, int multiplier)
SimilarityFunction
to this Aggregator
with the passed multiplier.
multiplier
- The multiplier that corresponds to the passed SimilarityFunction
.simFunction
- The SimilarityFunction
to add.
NullPointerException
- If no SimilarityFunction
was passed.
IllegalArgumentException
- If the passed multiplier is less than 0.protected double calculateSimilarity(DuDeObject obj1, DuDeObject obj2)
AbstractSimilarityFunction
DuDeObject
s. This similarity has to be within the range of [0; 1].
calculateSimilarity
in class AbstractSimilarityFunction
obj1
- The first DuDeObject
.obj2
- The second DuDeObject
.
DuDeObjects
.protected abstract double getAggregatedSimilarity(double[] similarities, int[] multipliers)
similarities
- The similarities on which the aggregated similarity is based.multipliers
- The multipliers.
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |