⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 path.java

📁 本代码可以用于查找指定地图中点与点之间的最短路径
💻 JAVA
字号:
package shortestpath;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2007</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class Path implements Comparable{
  public Vertex dest;
  public double cost;
  public Path(Vertex dest,double dist) {
    this.dest=dest;
    this.cost=dist;
  }
  public int compareTo(Object rhs){
    double otherCost=((Path)rhs).cost;
    return cost<otherCost?-1:cost>otherCost?1:0;
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -