Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Edge implements Comparator<Double>{
- double weight;
- int next;
- Edge(double w, int n){
- weight = w;
- next = n;
- }
- Edge(){
- }
- public int compare(Double w1, Double w2){
- if(w1<w2){
- return -1;
- }else if(w1>w2){
- return 1;
- }else return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment