1.图类基本组成 存储在邻接表中的基本项 /** * Represents an edge in the graph * */ class Edge implements Comparable<Edge> { public Vertex dest; //Second vertex in Edge public double cost; //Edge cost public Edge(Vertex d, double c) { dest = d; cost = c; } @Override pu…