This commit is contained in:
/usr/bin/nano
2019-10-05 20:11:53 +03:00
21 changed files with 367 additions and 85 deletions

View File

@@ -76,7 +76,7 @@ FindConnectedComponentNew.prototype.calculate = function(fillUpText = false)
for (j = 0; j < connectedVertex[stackElement.id].length; j++)
{
var nextVertex = connectedVertex[stackElement.id][j];
var connectedEdge = this.graph.FindEdge(stackElement.id, nextVertex.id);
var connectedEdge = this.graph.FindEdgeAny(stackElement.id, nextVertex.id);
if (stack.indexOf(nextVertex) < 0)
{
stack.push(nextVertex);
@@ -113,6 +113,12 @@ FindConnectedComponentNew.prototype.getPriority = function()
return 0;
}
// Algorithm support multi graph
FindConnectedComponentNew.prototype.IsSupportMultiGraph = function()
{
return true;
}
// Factory for connected components.
function CreateConnectedComponetsNew(graph, app)