public void shortestPaths(int s, int t) {
		
		/* Initialize structures */
		for (int i = 0; i < g.getNumVertices(); i++) {
			inTree[i] = Boolean.FALSE;
			distance[i] = Double.MAX_VALUE;
			parents[i] = -1;			
		}
		
		distance[s] = 0;
		int x = s;
		
		while (!inTree[x]) {
			
			inTree[x] = Boolean.TRUE;
			
			/* Assign desirability values to neighbors of x */
			EdgeNode p = g.getEdges(x);
			while (p != null) {
				
				int y = p.y;
				double weight = p.weight;
				
				if (distance[y] > distance[x] + weight) {
					distance[y] = distance[x] + weight;
					parents[y] = x;
				}
				
				p = p.next;			
			}
			
			/* Select vertex with highest desirability (shortest path) */
			double dist = Double.MAX_VALUE;
			for (int i = 0; i < g.getNumVertices(); i++) {
				if (!inTree[i] && distance[i] < dist) {
					dist = distance[i];
					x = i;
				}
			}
		}
		
	}