Add mutligraph support for floid algorithm

This commit is contained in:
Unick Soft 2020-02-23 11:28:56 +02:00
parent a5e44e1858
commit 1e6dbc279f

View File

@ -207,11 +207,15 @@ FloidAlgorithm.prototype.restore = function()
for (var i = 0; i < this.egdesCopy.length; i ++) for (var i = 0; i < this.egdesCopy.length; i ++)
{ {
var edge = this.graph.AddNewEdgeSafe(this.egdesCopy[i].vertex1, var edgeIndex = this.graph.AddNewEdgeSafe(this.egdesCopy[i].vertex1,
this.egdesCopy[i].vertex2, this.egdesCopy[i].vertex2,
this.egdesCopy[i].isDirect, this.egdesCopy[i].isDirect,
this.egdesCopy[i].weight, this.egdesCopy[i].weight,
this.isGraphMulti); this.isGraphMulti);
var edge = this.graph.edges[edgeIndex];
edge.model.type = this.egdesCopy[i].model.type;
edge.model.curvedValue = this.egdesCopy[i].model.curvedValue;
//edge.model = this.egdesCopy[i].model; //edge.model = this.egdesCopy[i].model;
} }
@ -226,7 +230,7 @@ FloidAlgorithm.prototype.updateMessage = function(save)
// Algorithm support multi graph // Algorithm support multi graph
FloidAlgorithm.prototype.IsSupportMultiGraph = function () FloidAlgorithm.prototype.IsSupportMultiGraph = function ()
{ {
return false; return true;
} }
// Factory for connected components. // Factory for connected components.