|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.demokritos.iit.jinsect.structs.GraphSimilarity
public class GraphSimilarity
Class describing three aspects of similarity between graphs (mainly):
Value
specifying the similarity by means of co-existing edges, as well as their values.
Range of possible values [0, 1]. 0 means no edges of A exists in B. 1 means all edges of
A exist in B and their weights are identical.
Containment
Range of possible values [0, 1]. 0 Means A is not at all contained in B,
whereas 1 means A is fully contained in B (as far as edges are concerned)
SizeSimilarity
Range of possible values [0, 1]. Expresses the size ratio between A and B as
min(size(A) / size(B), size(B) / size(A)).
Field Summary | |
---|---|
double |
ContainmentSimilarity
Specifies the similarity by means of co-existing nodes. |
double |
SizeSimilarity
Specifies the similarity by means of size. |
double |
ValueSimilarity
Specifies the similarity by means of co-existing nodes, as well as their values. |
Constructor Summary | |
---|---|
GraphSimilarity()
Creates a new instance of GraphSimilarity |
Method Summary | |
---|---|
double |
asDistance()
Calculates an overall distance as a function of the overall similarity. |
double |
getOverallSimilarity()
Calculates the overall similarity this object describes, returned as a double number. |
void |
setCalculator(CalculatorListener clCalc)
Assigns a calculator of type CalculatorListener to be called when
getOverallSimilarity() is called. |
double[] |
toArray()
Returns a 3-element double array corresponding to the aspects of GraphSimilarity. |
float[] |
toFloatArray()
Returns a 3-element float array corresponding to the aspects of GraphSimilarity. |
java.lang.String |
toString()
Return a string representation of this object, describing all aspects of similarity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public double ValueSimilarity
public double ContainmentSimilarity
public double SizeSimilarity
Constructor Detail |
---|
public GraphSimilarity()
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public void setCalculator(CalculatorListener clCalc)
CalculatorListener
to be called when
getOverallSimilarity()
is called.
clCalc
- The CalculatorListener.CalculatorListener
public double getOverallSimilarity()
CalculatorListener
has been assigned using the
setCalculator
method, then that calculator is used. Otherwise, the product of
all aspects of GraphSimilarity is returned.
getOverallSimilarity
in interface ISimilarity
public double asDistance()
getOverallSimilarity
method and returns its inverse if it has a non-zero value.
Otherwise the return value is positive infinity.
asDistance
in interface ISimilarity
public double[] toArray()
public float[] toFloatArray()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |