mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-04-03 06:16:20 +00:00
Added multigraph support for hamiltonian loop/path
This commit is contained in:
@@ -250,7 +250,23 @@ BaseAlgorithmEx.prototype.GetNodesPath = function(array, start, count)
|
||||
var res = [];
|
||||
for (var index = start; index < start + count; index++)
|
||||
{
|
||||
res.push(array[index].value);
|
||||
if (array[index].type == 4)
|
||||
{
|
||||
res.push(array[index].value);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
BaseAlgorithmEx.prototype.GetNodesEdgesPath = function(array, start, count)
|
||||
{
|
||||
var res = [];
|
||||
for (var index = start; index < start + count; index++)
|
||||
{
|
||||
if (array[index].type == 4 || array[index].type == 5)
|
||||
{
|
||||
res.push(array[index].value);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user