org.dbe.eve.simulator
Class SMERelationships.DijstraComparator

java.lang.Object
  extended by org.dbe.eve.simulator.SMERelationships.DijstraComparator
All Implemented Interfaces:
java.util.Comparator
Enclosing class:
SMERelationships

private class SMERelationships.DijstraComparator
extends java.lang.Object
implements java.util.Comparator

DijstraComparator is used by the findNewFriend method, as Java anonymous classes do not support closures and the distance array is needed for the comparison.

Author:
Giulio Marcon

Field Summary
(package private)  double[] d
           
 
Constructor Summary
private SMERelationships.DijstraComparator(double[] distanceMatrix)
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
           
 
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

d

double[] d
Constructor Detail

SMERelationships.DijstraComparator

private SMERelationships.DijstraComparator(double[] distanceMatrix)
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Specified by:
compare in interface java.util.Comparator