net.xqhs.graphs.matcher
Class GraphMatcherQuick.MatchSingleComparator

java.lang.Object
  extended by net.xqhs.graphs.matcher.Match.MatchComparator
      extended by net.xqhs.graphs.matcher.GraphMatcherQuick.MatchSingleComparator
All Implemented Interfaces:
java.util.Comparator<Match>
Enclosing class:
GraphMatcherQuick

protected static class GraphMatcherQuick.MatchSingleComparator
extends Match.MatchComparator

Match comparator with additional features for single-edge matches.

The matches are sorted according to:


Field Summary
private  java.util.Map<Node,java.lang.Integer> distances
          Vector of distances between every node and the start vertex.
private  MonitorPack monitorLink
          Link to the object measuring performance of the algorithm in terms of number of compared edges.
 
Constructor Summary
protected GraphMatcherQuick.MatchSingleComparator(java.util.Map<Node,java.lang.Integer> vertexDistances, MonitorPack monitor)
          Creates a match comparator that uses distances of vertices with respect to the root vertex.
 
Method Summary
 int compare(Match m1, Match m2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

distances

private java.util.Map<Node,java.lang.Integer> distances
Vector of distances between every node and the start vertex.


monitorLink

private MonitorPack monitorLink
Link to the object measuring performance of the algorithm in terms of number of compared edges.

Constructor Detail

GraphMatcherQuick.MatchSingleComparator

protected GraphMatcherQuick.MatchSingleComparator(java.util.Map<Node,java.lang.Integer> vertexDistances,
                                                  MonitorPack monitor)
Creates a match comparator that uses distances of vertices with respect to the root vertex.

Parameters:
vertexDistances - - Map of distances between nodes and the start vertex.
monitor - - the object measuring performance in terms of edge matches.
Method Detail

compare

public int compare(Match m1,
                   Match m2)
Specified by:
compare in interface java.util.Comparator<Match>
Overrides:
compare in class Match.MatchComparator