Fixed shrt path algorithm name for graphs with negative edges. Fix loader.

This commit is contained in:
Oleg Sh
2024-08-03 21:03:42 +02:00
parent d628dcd74d
commit c9201526a9
25 changed files with 117 additions and 4369 deletions

View File

@@ -30,7 +30,7 @@ function loadAsyncAlgorithms(onFinish) {
"ShortestPath.js",
"VerticesDegree.js"];
doIncludeAsync (pluginsList.map((plugin) => include ("model/plugins/" + plugin + "?v=" + globalVersion, modulDir)), onFinish);
doIncludeAsync (pluginsList.map((plugin) => include ("model/plugins/" + plugin, modulDir)), onFinish);
}
}

View File

@@ -23,7 +23,7 @@ FindShortPathNew.prototype.infinityValue = 1E9 - 1;
FindShortPathNew.prototype.getName = function(local)
{
return g_findShortPathName; //local == "ru" ? "Поиск кратчайший путь алгоритмом Дейкстры" : "Find shortest path using Dijkstra's algorithm";
return this.graph.hasNegative() ? g_findShortPathBellmanFordName : g_findShortPathName; //local == "ru" ? "Поиск кратчайший путь алгоритмом Дейкстры" : "Find shortest path using Dijkstra's algorithm";
}
FindShortPathNew.prototype.getId = function()