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

java.lang.Object
  extended by gr.demokritos.iit.jinsect.documentModel.comparators.NGramGraphComparator
      extended by gr.demokritos.iit.jinsect.documentModel.comparators.NGramCachedGraphComparator
All Implemented Interfaces:
Notifier, SimilarityComparatorListener
Direct Known Subclasses:
NGramCachedDistroGraphComparator

public class NGramCachedGraphComparator
extends NGramGraphComparator

An n-gram graph comparator class, which uses caching of edge info to optimize the comparison speed.


Field Summary
 
Fields inherited from class gr.demokritos.iit.jinsect.documentModel.comparators.NGramGraphComparator
Listener
 
Constructor Summary
NGramCachedGraphComparator()
           
 
Method Summary
 GraphSimilarity getSimilarityBetween(java.lang.Object oFirst, java.lang.Object oSecond)
          Returns the similarity of the document n-gram graph oFirst as opposed to oSecond.
 
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

NGramCachedGraphComparator

public NGramCachedGraphComparator()
Method Detail

getSimilarityBetween

public GraphSimilarity getSimilarityBetween(java.lang.Object oFirst,
                                            java.lang.Object oSecond)
Returns the similarity of the document n-gram graph oFirst as opposed to oSecond.

Specified by:
getSimilarityBetween in interface SimilarityComparatorListener
Overrides:
getSimilarityBetween in class NGramGraphComparator
Parameters:
oFirst - The first document n-gram graph.
oSecond - The second document n-gram graph.
Returns:
A GraphSimilarity object indicative of the similarity between the two graphs.
See Also:
DocumentNGramGraph