gr.demokritos.iit.jinsect.documentModel.comparators
Class NGramGraphEuclidianComparator

java.lang.Object
  extended by gr.demokritos.iit.jinsect.documentModel.comparators.NGramGraphComparator
      extended by gr.demokritos.iit.jinsect.documentModel.comparators.NGramCachedGraphComparator
          extended by gr.demokritos.iit.jinsect.documentModel.comparators.NGramGraphEuclidianComparator
All Implemented Interfaces:
Notifier, SimilarityComparatorListener, java.io.Serializable

public class NGramGraphEuclidianComparator
extends NGramCachedGraphComparator

A class that uses Eucledian distance, considering each edge-weight to be a vector value for the specific dimension-edge.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gr.demokritos.iit.jinsect.documentModel.comparators.NGramGraphComparator
Listener
 
Constructor Summary
NGramGraphEuclidianComparator()
           
 
Method Summary
 ISimilarity getEuclidianSimilarityBetween(java.lang.Object oFirst, java.lang.Object oSecond, boolean bUseLevelWeighting)
          Returns the similarity of the document n-gram graph oFirst as opposed to oSecond, using the inverse of the Eucledian distance.
static void main(java.lang.String[] sArgs)
          Utility method used for testing purposes.
 
Methods inherited from class gr.demokritos.iit.jinsect.documentModel.comparators.NGramCachedGraphComparator
getSimilarityBetween
 
Methods inherited from class gr.demokritos.iit.jinsect.documentModel.comparators.NGramGraphComparator
getNotificationListener, removeNotificationListener, setNotificationListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NGramGraphEuclidianComparator

public NGramGraphEuclidianComparator()
Method Detail

getEuclidianSimilarityBetween

public ISimilarity getEuclidianSimilarityBetween(java.lang.Object oFirst,
                                                 java.lang.Object oSecond,
                                                 boolean bUseLevelWeighting)
Returns the similarity of the document n-gram graph oFirst as opposed to oSecond, using the inverse of the Eucledian distance. Each unique edge is supposed to correspond to a dimension and its weight is the vector value in that dimension.

Parameters:
oFirst - The first document n-gram graph.
oSecond - The second document n-gram graph.
bUseLevelWeighting - If true, uses level weighting for dimensions, based on the rank of the given edge n-grams.
Returns:
A GraphSimilarity object indicative of the similarity between the two graphs.

main

public static void main(java.lang.String[] sArgs)
Utility method used for testing purposes.