项目作者: dubersfeld

项目描述 :
Java based demonstration of Minimum Spanning Tree Kruskal algorithm using HTML5 Canvas, Javascript and AJAX.
高级语言: Java
项目地址: git://github.com/dubersfeld/kruskal-step.git
创建时间: 2017-03-20T14:51:55Z
项目社区:https://github.com/dubersfeld/kruskal-step

开源协议:

下载


kruskal-step

I present here a Java based demonstration of the Kruskal minimum spanning tree algorithm.

The algorithm itself is implemented in Java, Javascript is only used for initialization and display on Canvas.

Only a recent Maven version is required to run this demo.

First an undirected graph is randomly created and its largest connected component is extracted (Java side).

Then a minimum spanning tree is build stepwise (Java side) and the graph is redrawn on each step (browser side).

To launch the demo run this command in project directory: mvn spring-boot:run.

When the application has started open a browser and hit URL localhost:8080/minimum-spanning-tree.

Here are some screenshots that can be seen during this demo.

After the graph was initialized:
alt text

After the largest component was computed:
alt text

Single step:
alt text

For an animated demonstration of Kruskal algorithm please visit this repository:

https://github.com/dubersfeld/kruskal-anim

Dominique Ubersfeld, Cachan, France