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
#include <stdio.h> #include <stdlib.h> #include <string.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ #define MAXN (10001) #define INF (1<<16) typedef struct _Vert