From e2a708a140391f3712343e1b437a41e3f2a2db22 Mon Sep 17 00:00:00 2001 From: Oleg Sh <> Date: Mon, 1 Apr 2024 10:47:23 +0200 Subject: [PATCH] Temporary disabled search of shortest path for graphs with negative edges. --- core/config/main.php | 2 +- script/features/algorithms/api/index.js | 2 +- .../features/algorithms/model/plugins/FindShortPatchsFromOne.js | 2 +- script/features/algorithms/model/plugins/ShortestPath.js | 2 +- script/pages/editor/api/index.js.cache | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/config/main.php b/core/config/main.php index b36c4bb..be7c0cf 100755 --- a/core/config/main.php +++ b/core/config/main.php @@ -93,5 +93,5 @@ $g_config['vote'] = "./tmp/vote/vote.txt"; $g_config['voteTopics'] = "./tmp/vote/voteTopics.txt_"; $g_config['use_js_cache'] = true; - $g_config['engine_version'] = 79; + $g_config['engine_version'] = 80; ?> diff --git a/script/features/algorithms/api/index.js b/script/features/algorithms/api/index.js index cf94ef9..3647904 100644 --- a/script/features/algorithms/api/index.js +++ b/script/features/algorithms/api/index.js @@ -30,7 +30,7 @@ function loadAsyncAlgorithms(onFinish) { "ShortestPath.js", "VerticesDegree.js"]; - doIncludeAsync (pluginsList.map((plugin) => include ("model/plugins/" + plugin, modulDir)), onFinish); + doIncludeAsync (pluginsList.map((plugin) => include ("model/plugins/" + plugin + "?v=" + globalVersion, modulDir)), onFinish); } } \ No newline at end of file diff --git a/script/features/algorithms/model/plugins/FindShortPatchsFromOne.js b/script/features/algorithms/model/plugins/FindShortPatchsFromOne.js index 97136b9..e8cc316 100644 --- a/script/features/algorithms/model/plugins/FindShortPatchsFromOne.js +++ b/script/features/algorithms/model/plugins/FindShortPatchsFromOne.js @@ -211,7 +211,7 @@ FindShortPatchsFromOne.prototype.IsSupportMultiGraph = function() FindShortPatchsFromOne.prototype.IsSupportNegativeWeight = function() { - return true; + return false; } // Factory for connected components. diff --git a/script/features/algorithms/model/plugins/ShortestPath.js b/script/features/algorithms/model/plugins/ShortestPath.js index bfcaf5c..83fd97d 100644 --- a/script/features/algorithms/model/plugins/ShortestPath.js +++ b/script/features/algorithms/model/plugins/ShortestPath.js @@ -223,7 +223,7 @@ FindShortPathNew.prototype.IsSupportMultiGraph = function () FindShortPathNew.prototype.IsSupportNegativeWeight = function() { - return true; + return false; } diff --git a/script/pages/editor/api/index.js.cache b/script/pages/editor/api/index.js.cache index 88c8a98..43fa614 100644 --- a/script/pages/editor/api/index.js.cache +++ b/script/pages/editor/api/index.js.cache @@ -839,7 +839,7 @@ this.context.fillText(text,position.x,position.y);} BaseVertexDrawer.prototype.DrawCenterText=function(position,text,color,outlineColor,bold,outline,size) {this.context.textBaseline="middle";this.context.font=(bold?"bold ":"")+size+DefaultFont;var textWidth=this.context.measureText(text).width;this.DrawText(new Point(position.x-textWidth/2,position.y),text,color,outlineColor,outline,this.context.font);} {let modulDir="features/algorithms/";doInclude([include("model/Algorithms.js",modulDir),include("model/BaseTraversal.js",modulDir)]) -function loadAsyncAlgorithms(onFinish){let modulDir="features/algorithms/";let pluginsList=["BFS.js","Coloring.js","ConnectedComponent.js","DFS.js","EulerianLoop.js","EulerianPath.js","FindAllPatches.js","FindLongestPath.js","FindShortPatchsFromOne.js","Floid.js","GraphReorder.js","HamiltonianLoop.js","HamiltonianPath.js","IsomorphismCheck.js","MaxClique.js","MaxFlow.js","MinimumSpanningTree.js","ModernGraphStyle.js","RadiusAndDiameter.js","ShortestPath.js","VerticesDegree.js"];doIncludeAsync(pluginsList.map((plugin)=>include("model/plugins/"+plugin,modulDir)),onFinish);}} +function loadAsyncAlgorithms(onFinish){let modulDir="features/algorithms/";let pluginsList=["BFS.js","Coloring.js","ConnectedComponent.js","DFS.js","EulerianLoop.js","EulerianPath.js","FindAllPatches.js","FindLongestPath.js","FindShortPatchsFromOne.js","Floid.js","GraphReorder.js","HamiltonianLoop.js","HamiltonianPath.js","IsomorphismCheck.js","MaxClique.js","MaxFlow.js","MinimumSpanningTree.js","ModernGraphStyle.js","RadiusAndDiameter.js","ShortestPath.js","VerticesDegree.js"];doIncludeAsync(pluginsList.map((plugin)=>include("model/plugins/"+plugin+"?v="+globalVersion,modulDir)),onFinish);}} function getVertexToVertexArray(graph,ignoreDirection) {res={};for(var i=0;i