Add multigraph support. Visualization and some algorithms.

This commit is contained in:
Unick Soft
2019-10-05 16:11:40 +02:00
parent c580c5aef9
commit 063c2f9ec0
21 changed files with 367 additions and 85 deletions

View File

@@ -103,7 +103,7 @@ FloidAlgorithm.prototype.resultMatrix = function()
for (var j = 0; j < this.graph.vertices.length; j ++)
{
var v2 = this.graph.vertices[j];
var edge = this.graph.FindEdge(v1.id, v2.id);
var edge = this.graph.FindEdgeMin(v1.id, v2.id);
if (edge != null)
{
this.matrix[i][j] = edge.GetWeight();