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

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

public class StableMarriageStrategy
extends Object
implements CalculationStrategy<JsonArray,JsonArray>

StableMarriageStrategy implements the Stable-Marriage algorithm. The returned similarity is the average of all found value pairs.

Author:
Matthias Pohl

Constructor Summary
StableMarriageStrategy()
           
 
Method Summary
 double calculateSimilarity(ContentBasedSimilarityFunction<?> similarityFunction, JsonArray men, JsonArray women)
          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

StableMarriageStrategy

public StableMarriageStrategy()
Method Detail

calculateSimilarity

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

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


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