7 Star 34 Fork 23

空無一悟/algorithms

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Main.java 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
空無一悟 提交于 2021-09-22 23:47 +08:00 . init
/***********************************************************
* @Description : 测试我们的无向带权图
* @author : 梁山广(Liang Shan Guang)
* @date : 2019/12/22 17:02
* @email : liangshanguang2@gmail.com
***********************************************************/
package Chapter11WeightedGraphAndMinimumSpanningTree.Section1To2WeightedGraph;
public class Main {
public static void main(String[] args) {
String filepath = "src/main/java/Chapter11WeightedGraphAndMinimumSpanningTree/Section1to2WeightedGraph/graph.txt";
WeightedGraph graph = new WeightedGraph(false);
ReadWeightedGraph.init(graph, filepath);
System.out.println(graph);
}
}
/**
* 顶点数V = 7, 边数E = 12
* 顶点数V = 7, 边数E = 12,完整的邻接表信息如下:
* v=0: (w=1, weight=2) (w=3, weight=7) (w=5, weight=2)
* v=1: (w=0, weight=2) (w=2, weight=1) (w=3, weight=4) (w=4, weight=3) (w=5, weight=5)
* v=2: (w=1, weight=1) (w=4, weight=4) (w=5, weight=4)
* v=3: (w=0, weight=7) (w=1, weight=4) (w=4, weight=1) (w=6, weight=5)
* v=4: (w=1, weight=3) (w=2, weight=4) (w=3, weight=1) (w=6, weight=7)
* v=5: (w=0, weight=2) (w=1, weight=5) (w=2, weight=4)
* v=6: (w=3, weight=5) (w=4, weight=7)
*/
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lsgwr/algorithms.git
git@gitee.com:lsgwr/algorithms.git
lsgwr
algorithms
algorithms
master

搜索帮助