edu.uci.ics.jung.algorithms.shortestpath
Class DijkstraDistance.VertexComparator<V>

java.lang.Object
  extended by edu.uci.ics.jung.algorithms.shortestpath.DijkstraDistance.VertexComparator<V>
All Implemented Interfaces:
Comparator<V>
Enclosing class:
DijkstraDistance<V,E>

protected static class DijkstraDistance.VertexComparator<V>
extends Object
implements Comparator<V>

Compares according to distances, so that the BinaryHeap knows how to order the tree.


Constructor Summary
protected DijkstraDistance.VertexComparator(Map<V,Number> distances)
           
 
Method Summary
 int compare(V o1, V 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
 

Constructor Detail

DijkstraDistance.VertexComparator

protected DijkstraDistance.VertexComparator(Map<V,Number> distances)
Method Detail

compare

public int compare(V o1,
                   V o2)
Specified by:
compare in interface Comparator<V>


Copyright © 2009. All Rights Reserved.