de.hpi.fgis.dude.similarityfunction.contentbased.calculationstrategy
Class BestMatchCalculationStrategy

java.lang.Object
  extended by de.hpi.fgis.dude.similarityfunction.contentbased.calculationstrategy.BestMatchCalculationStrategy
All Implemented Interfaces:
CalculationStrategy<JsonArray,JsonAtomic>

public class BestMatchCalculationStrategy
extends Object
implements CalculationStrategy<JsonArray,JsonAtomic>

BestMatchCalculationStrategy compares a JsonArray with a JsonAtomic by selecting the best match. The member of the array that is most similar to the atomic value will be used as a representative of the JsonArray for the comparison.

Author:
Matthias Pohl

Constructor Summary
BestMatchCalculationStrategy()
           
 
Method Summary
 double calculateSimilarity(ContentBasedSimilarityFunction<?> similarityFunction, JsonArray array, JsonAtomic value)
          Calculates the similarity of the passed values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BestMatchCalculationStrategy

public BestMatchCalculationStrategy()
Method Detail

calculateSimilarity

public double calculateSimilarity(ContentBasedSimilarityFunction<?> similarityFunction,
                                  JsonArray array,
                                  JsonAtomic value)
Description copied from interface: CalculationStrategy
Calculates the similarity of the passed values.

Specified by:
calculateSimilarity in interface CalculationStrategy<JsonArray,JsonAtomic>
Parameters:
similarityFunction - The SimilarityFunction that is used for atomic values within this strategy.
array - The first value.
value - The second value.
Returns:
Returns the similarity of the passed values.


Copyright © 2011 Hasso Plattner Institute - Chair of Information Systems. All Rights Reserved.