www.pudn.com > FindTheShortestPath-java.rar > Vertex.java


package shortestpath;

import java.util.List;
import java.util.LinkedList;

/**
 * 

Title:

*

Description:

*

Copyright: Copyright (c) 2007

*

Company:

* @author not attributable * @version 1.0 */ public class Vertex { public String name; //顶点的名字 public List adj; //邻接表 public double dist; //从开始节点到当前节点的最短路径长度 public Vertex prev; //最短路径上的此节点的前趋节点 public int scratch; // public Vertex(String nm) { name=nm; adj=new LinkedList(); reset(); } public void reset(){ dist=Graph.INFINITY; prev=null; scratch=0; } }