net.xqhs.graphs.matcher
Class Match.MatchComparator

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

public static class Match.MatchComparator
extends java.lang.Object
implements java.util.Comparator<Match>

Match comparator.

The matches are sorted according to k (smaller k first). If equal, order by id.


Field Summary
private  MonitorPack monitorLink
          Link to the object measuring performance of the algorithm in terms of number of compared edges.
 
Constructor Summary
Match.MatchComparator(MonitorPack monitor)
          Creates a match comparator.
 
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

monitorLink

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

Constructor Detail

Match.MatchComparator

public Match.MatchComparator(MonitorPack monitor)
Creates a match comparator.

Parameters:
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>