mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-04-04 14:56:16 +00:00
Merge branch 'master' of https://github.com/UnickSoft/graphonline
This commit is contained in:
@@ -91,7 +91,7 @@ DFSAlgorithm.prototype.dfs = function(vertex, vertexArray, edgeArray)
|
||||
for (var i = 0; i < this.graph.vertices.length; i ++)
|
||||
{
|
||||
var nextVertex = this.graph.vertices[i];
|
||||
var edge = this.graph.FindEdge(vertex.id, nextVertex.id);
|
||||
var edge = this.graph.FindEdgeAny(vertex.id, nextVertex.id);
|
||||
if (edge && !vertexArray.includes(nextVertex))
|
||||
{
|
||||
edgeArray.push(edge);
|
||||
@@ -103,6 +103,12 @@ DFSAlgorithm.prototype.dfs = function(vertex, vertexArray, edgeArray)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Algorithm support multi graph
|
||||
DFSAlgorithm.prototype.IsSupportMultiGraph = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateDFSAlgorithm(graph, app)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user