This repository was archived by the owner on Feb 29, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 1- 0
2- 0
3- 0
4- 0
1+ 1
2+ 1
3+ 1
4+ 1
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ static int minDist(int dist[], boolean[] set1) {
1616 public static int status = -1 ;
1717 public static int [] arr ;
1818 public static int [] pasture ;
19- public static List <IPair > pastures = new ArrayList <IPair >();
20-
19+ // public static List<IPair> pastures = new ArrayList<IPair>();
20+ public static List < Integer > pastures = new ArrayList < Integer >();
2121 public static int [] dijkstra (int [][] graph1 , int startVertex ) {
2222 status = 0 ;
2323 int N = graph1 .length ;
@@ -50,7 +50,8 @@ public static int[] dijkstra(int[][] graph1, int startVertex) {
5050 edgeDistance ;
5151
5252 }
53- if (pastures .contains (new IPair (nearestVertex ,vertexIndex ))) {
53+ //if(pastures.contains(new IPair(nearestVertex,vertexIndex))) {
54+ if (pastures .contains (nearestVertex ) || pastures .contains (vertexIndex )) {
5455 System .out .println ("Info: " +nearestVertex +" " +vertexIndex );
5556 System .out .println ("Set " +(nearestVertex - 1 ) + " and " +(vertexIndex - 1 ));
5657 arr [nearestVertex ] = 1 ;
@@ -118,7 +119,8 @@ public static void main(String[] args) throws IOException{
118119 }
119120
120121 }
121- pastures .add (new IPair (x ,y ));
122+ pastures .add (x );
123+ //pastures.add(new IPair(x,y));
122124
123125 }
124126 // End modification
You can’t perform that action at this time.
0 commit comments