gr.demokritos.iit.jinsect.documentModel.comparators
Class NGramGraphEuclidianComparator
java.lang.Object
gr.demokritos.iit.jinsect.documentModel.comparators.NGramGraphComparator
gr.demokritos.iit.jinsect.documentModel.comparators.NGramCachedGraphComparator
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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NGramGraphEuclidianComparator
public NGramGraphEuclidianComparator()
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.