Class SimilarityStatement

java.lang.Object
  |
  +--SimilarityStatement
Direct Known Subclasses:
NonSeqSimStmt, SeqSimStmt

public abstract class SimilarityStatement
extends java.lang.Object

A SimilarityStatement is a tentative assertion that two Subgraphs are similar according to some SimilarityMeasure. It can thus be evaluated using the SimilarityMeasure connected to it, and when evaluated, a SimilarityStatement thus has a SimMeasureResult telling how good a SimilarityStatement it is. SimilarityStatement is an abstract class, because it must be either sequential or non-sequential.


Field Summary
 int olap
          The amount of overlap between subgraph1 and subgraph2.
protected  SimilarityMeasure simMeasure
          The SimilarityMeasure used to evaluate this SimilarityStatement.
 SimMeasureResult smResult
          The result of evaluating this SimilarityStatement using the attached SimilarityMeasure.
 Subgraph subgraph1
          One subgraph.
 Subgraph subgraph2
          The other subgraph.
 
Constructor Summary
SimilarityStatement(Subgraph s1, Subgraph s2, SimFinder sf)
           
 
Method Summary
abstract  java.lang.Object clone()
           
 SimilarityMeasure getSimilarityMeasure()
           
 java.lang.String gnuplotHeader()
           
 boolean identicalSubgraphs()
          Returns true if subgraph1 equals subgraph2 (i.e. they have maximal possible overlap).
 int maxNestedSize()
          Returns the maximal nested size of the two Subgraphs.
 double meanNestedSize()
          Returns the mean nested size of the two Subgraphs.
abstract  void mutate(double mutrate)
          Mutation is defined separately for sequential and non-sequential similarity statements (see SeqSimStmt and NonSeqSimStmt).
 boolean oksize()
          For debugging.
 int overlap()
          Returns how many vertices and edges the two subgraphs have in common.
 void setSimilarityMeasure(SimilarityMeasure sm)
           
 int size()
          Returns the size of the compared subgraphs.
 int sizeNoOutmostRests()
          Deprecated. Not used anymore.
 int sizeNoRests()
          Returns the mean size of the two subgraphs, not counting rests.
 java.lang.String toGnuplotString()
           
 java.lang.String toListString()
          Constructs a one-line description of this SimilarityStatement which is useful in GUI lists.
 java.lang.String toString()
           
 java.lang.String toStringWithSubgraphs()
          Includes toStrings of the two compared subgraphs.
 double value()
          If this SimilarityStatement has not been evaluated (or has been changed, e.g. mutated, since the last evaluation, it is re-evaluated by a call to the relevant SimilarityMeasure.
 boolean valueAssigned()
          Tells whether or not this SimilarityStatement has been evaluated and assigned a value.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

subgraph1

public Subgraph subgraph1
One subgraph.


subgraph2

public Subgraph subgraph2
The other subgraph.


simMeasure

protected SimilarityMeasure simMeasure
The SimilarityMeasure used to evaluate this SimilarityStatement.


smResult

public SimMeasureResult smResult
The result of evaluating this SimilarityStatement using the attached SimilarityMeasure.


olap

public int olap
The amount of overlap between subgraph1 and subgraph2.

Constructor Detail

SimilarityStatement

public SimilarityStatement(Subgraph s1,
                           Subgraph s2,
                           SimFinder sf)
Method Detail

size

public int size()
Returns the size of the compared subgraphs.


maxNestedSize

public int maxNestedSize()
Returns the maximal nested size of the two Subgraphs.


meanNestedSize

public double meanNestedSize()
Returns the mean nested size of the two Subgraphs.


sizeNoRests

public int sizeNoRests()
Returns the mean size of the two subgraphs, not counting rests.


sizeNoOutmostRests

public int sizeNoOutmostRests()
Deprecated. Not used anymore.


getSimilarityMeasure

public SimilarityMeasure getSimilarityMeasure()

setSimilarityMeasure

public void setSimilarityMeasure(SimilarityMeasure sm)

oksize

public boolean oksize()
For debugging.


value

public double value()
If this SimilarityStatement has not been evaluated (or has been changed, e.g. mutated, since the last evaluation, it is re-evaluated by a call to the relevant SimilarityMeasure. The value is returned.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toStringWithSubgraphs

public java.lang.String toStringWithSubgraphs()
Includes toStrings of the two compared subgraphs.


gnuplotHeader

public java.lang.String gnuplotHeader()

toGnuplotString

public java.lang.String toGnuplotString()

toListString

public java.lang.String toListString()
Constructs a one-line description of this SimilarityStatement which is useful in GUI lists.


mutate

public abstract void mutate(double mutrate)
                     throws java.lang.Exception
Mutation is defined separately for sequential and non-sequential similarity statements (see SeqSimStmt and NonSeqSimStmt).

java.lang.Exception

clone

public abstract java.lang.Object clone()
Overrides:
clone in class java.lang.Object

identicalSubgraphs

public boolean identicalSubgraphs()
Returns true if subgraph1 equals subgraph2 (i.e. they have maximal possible overlap).


valueAssigned

public boolean valueAssigned()
Tells whether or not this SimilarityStatement has been evaluated and assigned a value.


overlap

public int overlap()
Returns how many vertices and edges the two subgraphs have in common.