|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.demokritos.iit.jinsect.documentModel.comparators.StandardDocumentComparator
public class StandardDocumentComparator
This class implements the SimilarityComparatorListener interface, describing objects that
can perform comparison between NGramDocument
objects.
Field Summary | |
---|---|
protected double |
GraphImportance
|
protected GraphSimilarity |
sGraph
|
protected GraphSimilarity |
sHistogram
|
Constructor Summary | |
---|---|
StandardDocumentComparator()
Creates a new instance of StandardComparator |
|
StandardDocumentComparator(double dGraphImportance)
Creates a new instance of StandardComparator, given the importance of the n-gram graph similarity in the calculation of overall similarity. |
Method Summary | |
---|---|
GraphSimilarity |
getGraphSimilarity()
Returns the graph similarity part of the overall similality measurement, performed for the last comparison. |
GraphSimilarity |
getHistogramSimilarity()
Returns the graph similarity part of the overall similality measurement, performed for the last comparison. |
GraphSimilarity |
getSimilarityBetween(java.lang.Object oFirst,
java.lang.Object oSecond)
Returns the similarity of two given NGramDocument s. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double GraphImportance
protected GraphSimilarity sGraph
protected GraphSimilarity sHistogram
Constructor Detail |
---|
public StandardDocumentComparator()
public StandardDocumentComparator(double dGraphImportance)
dGraphImportance
- A value between 0.0 and 1.0 indicating how important is the graph in the calculation.
If zero, then only histogram information is used. If 1.0, then only graph information is used.Method Detail |
---|
public GraphSimilarity getSimilarityBetween(java.lang.Object oFirst, java.lang.Object oSecond) throws java.io.InvalidClassException
NGramDocument
s.
getSimilarityBetween
in interface SimilarityComparatorListener
oFirst
- The first object participating in the similarity calculation. If not an NGramDocument then an InvalidClassException
is thrown.oSecond
- The first object participating in the similarity calculation. If not an NGramDocument then an InvalidClassException
is thrown.
GraphSimilarity
object indicating the similarity between the two given objects.
java.io.InvalidClassException
- Throws this exception when the objects are not comparable due to class
restrictions.ISimilarity
public GraphSimilarity getGraphSimilarity()
public GraphSimilarity getHistogramSimilarity()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |