Guest User

Untitled

a guest
Apr 29th, 2012
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. class Edge implements Comparator<Double>{
  2. double weight;
  3. int next;
  4. Edge(double w, int n){
  5. weight = w;
  6. next = n;
  7. }
  8.  
  9. Edge(){
  10.  
  11. }
  12.  
  13. public int compare(Double w1, Double w2){
  14. if(w1<w2){
  15. return -1;
  16. }else if(w1>w2){
  17. return 1;
  18. }else return 0;
  19. }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment