private void computeWeightedShortestPath(Vertex origin)
	{
		// priority queue to store paths that need to be visited
		PriorityQueue pq = new PriorityQueue(PriorityQueue.PRIORITY_ASCENDING);
		
		// number of vertices visited
		int visited;
		
		// current shortest path
		Path shortestPath;
		
		// Vertex in current shortest path
		Vertex v;
		
		// Vertex adjacent to v
		Vertex w;
		
		// Edge connecting v to w
		Edge e;
		
		// cost of Edge from v to w
		double vwCost;
		
		// reset shortest path info for vertices
		resetVertices();
		
		// start with origin Vertex
		pq.add(new Path(origin, 0.0));
		
		// distance from origin to itself is 0
		origin.distance = 0.0;

		// no vertices have been visited yet
		visited = 0;
		
		// find the shortest path
		while (!pq.isEmpty() && visited < theItems.size())
		{
			// retrieve and remove current path from priority queue
			shortestPath = (Path)pq.get();
			pq.remove();
			
			// retrieve destination Vertex of current Path
			v = shortestPath.destination;
			
			if (v.scratch != 0)
			{
				// already processed v; get next Path from priority queue
				continue;
			}
			
			// indicate Vertex v has been visited
			v.scratch = 1;
			
			// increment total number of vertices visited
			visited++;
			
			// search v's adjacent vertices
			for (Iterator itr = v.getAdjacentVertices().iterator(); itr.hasNext(); )
			{
				// retrieve current Edge
				e = (Edge)itr.getCurrent();
				
				// retrieve destination Vertex from Edge
				w = e.destination;
				
				// retrieve edge cost
				vwCost = e.cost;
				
				if (vwCost < 0.0)
				{
					// graph has 1 or more negative edge costs
					throw new GraphException("Graph has negative edges");
				}
				
				if (w.distance > v.distance + vwCost)
				{
					// new shortest path from v to w found
					
					// update distance to w
					w.distance = v.distance + vwCost;
					
					// update link to previous Vertex in shortest path
					w.previousVertex = v;
					
					// add new shortest path to priority queue
					pq.add(new Path(w, w.distance));
				}
				
				// advance to next adjacent Vertex
				itr.next();
			}
		}
	}