diff --git a/core/config/main.php b/core/config/main.php index 63aa998..25871fa 100755 --- a/core/config/main.php +++ b/core/config/main.php @@ -94,5 +94,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'] = 99; + $g_config['engine_version'] = 100; ?> diff --git a/lang/bg/home.php b/lang/bg/home.php index dcd07cd..784f969 100644 --- a/lang/bg/home.php +++ b/lang/bg/home.php @@ -327,4 +327,7 @@ We have added Dutch translation πŸ‡³πŸ‡±. Thank you Willie de Wit"; $g_lang["max_independent_set_not_found"] = "Max Independent Set is not found"; $g_lang["max_independent_set_size_is"] = "Max Independent Set size is "; $g_lang["max_independent_set_contains"] = ". Set contains these vertecies: "; + + $g_lang['find_all_shortest_pathes'] = "Find all shortest paths between 2 vertices"; + $g_lang['number_of_shortest_pathes_from'] = "Number of shortest paths from "; ?> diff --git a/lang/ch/home.php b/lang/ch/home.php index 10162e5..a98aae1 100644 --- a/lang/ch/home.php +++ b/lang/ch/home.php @@ -329,4 +329,7 @@ $g_lang["max_independent_set_not_found"] = "Max Independent Set is not found"; $g_lang["max_independent_set_size_is"] = "Max Independent Set size is "; $g_lang["max_independent_set_contains"] = ". Set contains these vertecies: "; + + $g_lang['find_all_shortest_pathes'] = "Find all shortest paths between 2 vertices"; + $g_lang['number_of_shortest_pathes_from'] = "Number of shortest paths from "; ?> diff --git a/lang/cs/home.php b/lang/cs/home.php index e7b1804..efe8532 100644 --- a/lang/cs/home.php +++ b/lang/cs/home.php @@ -328,4 +328,7 @@ $g_lang["max_independent_set_not_found"] = "Max Independent Set is not found"; $g_lang["max_independent_set_size_is"] = "Max Independent Set size is "; $g_lang["max_independent_set_contains"] = ". Set contains these vertecies: "; + + $g_lang['find_all_shortest_pathes'] = "Find all shortest paths between 2 vertices"; + $g_lang['number_of_shortest_pathes_from'] = "Number of shortest paths from "; ?> \ No newline at end of file diff --git a/lang/de/home.php b/lang/de/home.php index d6585d8..dcb2d5e 100644 --- a/lang/de/home.php +++ b/lang/de/home.php @@ -286,4 +286,7 @@ $g_lang["max_clique_not_found"] = "Max Clique is not found"; $g_lang["max_clique_size_is"] = "Max Clique size is "; $g_lang["max_clique_contains"] = ". Clique contains these vertecies: "; + + $g_lang['find_all_shortest_pathes'] = "Find all shortest paths between 2 vertices"; + $g_lang['number_of_shortest_pathes_from'] = "Number of shortest paths from "; ?> diff --git a/lang/el/home.php b/lang/el/home.php index 66725c3..3c122d7 100644 --- a/lang/el/home.php +++ b/lang/el/home.php @@ -325,4 +325,7 @@ $g_lang["max_clique_not_found"] = "Max Clique is not found"; $g_lang["max_clique_size_is"] = "Max Clique size is "; $g_lang["max_clique_contains"] = ". Clique contains these vertecies: "; + + $g_lang['find_all_shortest_pathes'] = "Find all shortest paths between 2 vertices"; + $g_lang['number_of_shortest_pathes_from'] = "Number of shortest paths from "; ?> diff --git a/lang/en/home.php b/lang/en/home.php index b54f294..1ad4331 100755 --- a/lang/en/home.php +++ b/lang/en/home.php @@ -330,4 +330,7 @@ We have added Dutch translation πŸ‡³πŸ‡±. Thank you Willie de Wit"; $g_lang["max_independent_set_not_found"] = "Max Independent Set is not found"; $g_lang["max_independent_set_size_is"] = "Max Independent Set size is "; $g_lang["max_independent_set_contains"] = ". Set contains these vertecies: "; + + $g_lang['find_all_shortest_pathes'] = "Find all shortest paths between 2 vertices"; + $g_lang['number_of_shortest_pathes_from'] = "Number of shortest paths from "; ?> diff --git a/lang/es/home.php b/lang/es/home.php index f07a1e3..b3f94a0 100755 --- a/lang/es/home.php +++ b/lang/es/home.php @@ -329,4 +329,7 @@ Tenemos traducciones en griego πŸ‡¬πŸ‡·. diff --git a/lang/fr/home.php b/lang/fr/home.php index 97b63fe..1cc2115 100644 --- a/lang/fr/home.php +++ b/lang/fr/home.php @@ -296,4 +296,7 @@ $g_lang["max_independent_set_not_found"] = "Max Independent Set is not found"; $g_lang["max_independent_set_size_is"] = "Max Independent Set size is "; $g_lang["max_independent_set_contains"] = ". Set contains these vertecies: "; + + $g_lang['find_all_shortest_pathes'] = "Find all shortest paths between 2 vertices"; + $g_lang['number_of_shortest_pathes_from'] = "Number of shortest paths from "; ?> diff --git a/lang/nl/home.php b/lang/nl/home.php index cc553eb..760583a 100644 --- a/lang/nl/home.php +++ b/lang/nl/home.php @@ -293,4 +293,7 @@ $g_lang["max_independent_set_not_found"] = "Max Independent Set is not found"; $g_lang["max_independent_set_size_is"] = "Max Independent Set size is "; $g_lang["max_independent_set_contains"] = ". Set contains these vertecies: "; + + $g_lang['find_all_shortest_pathes'] = "Find all shortest paths between 2 vertices"; + $g_lang['number_of_shortest_pathes_from'] = "Number of shortest paths from "; ?> diff --git a/lang/pl/home.php b/lang/pl/home.php index f248ad0..60aa1a3 100644 --- a/lang/pl/home.php +++ b/lang/pl/home.php @@ -329,4 +329,7 @@ DodaliΕ›my polskie tΕ‚umaczenie, Patryk"; $g_lang["max_independent_set_not_found"] = "Max Independent Set is not found"; $g_lang["max_independent_set_size_is"] = "Max Independent Set size is "; $g_lang["max_independent_set_contains"] = ". Set contains these vertecies: "; + + $g_lang['find_all_shortest_pathes'] = "Find all shortest paths between 2 vertices"; + $g_lang['number_of_shortest_pathes_from'] = "Number of shortest paths from "; ?> diff --git a/lang/pt/home.php b/lang/pt/home.php index bde9e9b..34bafd8 100644 --- a/lang/pt/home.php +++ b/lang/pt/home.php @@ -294,4 +294,7 @@ $g_lang["max_independent_set_not_found"] = "Max Independent Set is not found"; $g_lang["max_independent_set_size_is"] = "Max Independent Set size is "; $g_lang["max_independent_set_contains"] = ". Set contains these vertecies: "; + + $g_lang['find_all_shortest_pathes'] = "Find all shortest paths between 2 vertices"; + $g_lang['number_of_shortest_pathes_from'] = "Number of shortest paths from "; ?> diff --git a/lang/ru/home.php b/lang/ru/home.php index e69176a..afc59e3 100755 --- a/lang/ru/home.php +++ b/lang/ru/home.php @@ -334,4 +334,7 @@ $g_lang["max_independent_set_not_found"] = "МаксимальноС нСзависимоС мноТСство Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½Π°"; $g_lang["max_independent_set_size_is"] = "Π Π°Π·ΠΌΠ΅Ρ€ Максимального нСзависимого мноТСства Ρ€Π°Π²Π΅Π½ "; $g_lang["max_independent_set_contains"] = ". ΠœΠ½ΠΎΠΆΠ΅ΡΡ‚Π²Π° содСрТит ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΠΈΠ΅ Π²Π΅Ρ€ΡˆΠΈΠ½Ρ‹: "; + + $g_lang['find_all_shortest_pathes'] = "Найти всС ΠΊΡ€Π°Ρ‚Ρ‡Π°ΠΉΡˆΠΈΠ΅ ΠΏΡƒΡ‚ΠΈ ΠΌΠ΅ΠΆΠ΄Ρƒ Π²Π΅Ρ€ΡˆΠΈΠ½Π°ΠΌΠΈ"; + $g_lang['number_of_shortest_pathes_from'] = "ΠšΠΎΠ»ΠΈΡ‡Π΅ΡΡ‚Π²ΠΎ ΠΊΡ€Π°Ρ‚Ρ‡Π°ΠΉΡˆΠΈΡ… ΠΏΡƒΡ‚Π΅ΠΉ ΠΈΠ· "; ?> diff --git a/lang/sv/home.php b/lang/sv/home.php index 2862472..a4dc02f 100644 --- a/lang/sv/home.php +++ b/lang/sv/home.php @@ -285,4 +285,12 @@ $g_lang['open_last_used_graph'] = "Open Recent Graph"; $g_lang['vertex_name_place_holder'] = "vertex name"; + + $g_lang["max_independent_set"] = "Max Independent Set"; + $g_lang["max_independent_set_not_found"] = "Max Independent Set is not found"; + $g_lang["max_independent_set_size_is"] = "Max Independent Set size is "; + $g_lang["max_independent_set_contains"] = ". Set contains these vertecies: "; + + $g_lang['find_all_shortest_pathes'] = "Find all shortest paths between 2 vertices"; + $g_lang['number_of_shortest_pathes_from'] = "Number of shortest paths from "; ?> diff --git a/lang/ua/home.php b/lang/ua/home.php index 0ae85aa..5c91c0c 100644 --- a/lang/ua/home.php +++ b/lang/ua/home.php @@ -332,4 +332,7 @@ $g_lang["max_independent_set_not_found"] = "МаксимальноС нСзависимоС мноТСство Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½Π°"; $g_lang["max_independent_set_size_is"] = "Π Π°Π·ΠΌΠ΅Ρ€ Максимального нСзависимого мноТСства Ρ€Π°Π²Π΅Π½ "; $g_lang["max_independent_set_contains"] = ". ΠœΠ½ΠΎΠΆΠ΅ΡΡ‚Π²Π° содСрТит ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΠΈΠ΅ Π²Π΅Ρ€ΡˆΠΈΠ½Ρ‹: "; + + $g_lang['find_all_shortest_pathes'] = "Найти всС ΠΊΡ€Π°Ρ‚Ρ‡Π°ΠΉΡˆΠΈΠ΅ ΠΏΡƒΡ‚ΠΈ ΠΌΠ΅ΠΆΠ΄Ρƒ Π²Π΅Ρ€ΡˆΠΈΠ½Π°ΠΌΠΈ"; + $g_lang['number_of_shortest_pathes_from'] = "ΠšΠΎΠ»ΠΈΡ‡Π΅ΡΡ‚Π²ΠΎ ΠΊΡ€Π°Ρ‚Ρ‡Π°ΠΉΡˆΠΈΡ… ΠΏΡƒΡ‚Π΅ΠΉ ΠΈΠ· "; ?> diff --git a/script/features/algorithms/api/index.js b/script/features/algorithms/api/index.js index dd11c3f..1df76c5 100644 --- a/script/features/algorithms/api/index.js +++ b/script/features/algorithms/api/index.js @@ -29,7 +29,8 @@ function loadAsyncAlgorithms(onFinish) { "RadiusAndDiameter.js", "ShortestPath.js", "VerticesDegree.js", - "MaxIndependentSet.js"]; + "MaxIndependentSet.js", + "FindAllShortestPatches.js"]; doIncludeAsync (pluginsList.map((plugin) => include ("model/plugins/" + plugin, modulDir)), onFinish); } diff --git a/script/features/algorithms/model/plugins/FindAllShortestPatches.js b/script/features/algorithms/model/plugins/FindAllShortestPatches.js new file mode 100644 index 0000000..c8b00bf --- /dev/null +++ b/script/features/algorithms/model/plugins/FindAllShortestPatches.js @@ -0,0 +1,292 @@ +/** + * Find all shortest pathes. + * + */ +function FindAllShortestPathes(graph, app) +{ + BaseAlgorithmEx.apply(this, arguments); + this.message = g_selectStartVertex; + this.selectedObjects = {}; + this.foundSubGraphs = {}; + this.nSubgraphIndex = 0; + this.nSubGraphCount = 0; + this.foundPaths = {}; +} + + +// inheritance. +FindAllShortestPathes.prototype = Object.create(BaseAlgorithmEx.prototype); +// First selected. +FindAllShortestPathes.prototype.firstObject = null; +// Second selected. +FindAllShortestPathes.prototype.secondObject = null; +// Path +FindAllShortestPathes.prototype.pathObjects = null; +// Infinity +FindAllShortestPathes.prototype.infinityValue = 1E9 - 1; + +FindAllShortestPathes.prototype.getName = function(local) +{ + return g_FindAllShortestPathes; +} + +FindAllShortestPathes.prototype.getId = function() +{ + return "OlegSh.FindAllShortestPathes"; +} + +// @return message for user. +FindAllShortestPathes.prototype.getMessage = function(local) +{ + return this.message; +} + +FindAllShortestPathes.prototype.getCategory = function() +{ + return 1; +} + +FindAllShortestPathes.prototype.result = function(resultCallback) +{ + if (this.firstObject && this.secondObject) + { + this.outResultCallback = function (result ) { resultCallback(result); }; + self = this; + this.CalculateAlgorithm("prnpaths", [ + {name: "start", value: this.firstObject.id}, + {name: "finish", value: this.secondObject.id} + ], + function (pathObjects, properties, results) + { + self.resultCallback(pathObjects, properties, results); + }); + } + return null; +} + +FindAllShortestPathes.prototype.setResultMessage = function() +{ + if (this.nSubGraphCount > 0) + { + var currentPath = ""; + var first = true; + this.foundPaths[this.nSubgraphIndex].forEach((nodeId) => { + currentPath += (first ? "" : "β‡’") + this.graph.FindVertex(nodeId).mainText; + first = false; + }); + + this.message = g_numberOfShortestPathesFrom + this.firstObject.mainText + + g_to + this.secondObject.mainText + g_are + + this.nSubGraphCount + ". " + g_pathN + (1 + parseInt(this.nSubgraphIndex)) + ": " + currentPath + + " "; + } + else + { + this.message = g_pathNotExists; + } +} + +FindAllShortestPathes.prototype.resultCallback = function(pathObjects, properties, results) +{ + var outputResult = {}; + outputResult["version"] = 1; + outputResult["minPath"] = true; + + this.pathObjects = pathObjects; + this.properties = properties; + + var bFound = results.length > 0 && results[0].value < this.infinityValue && (results[0].type == 1 || results[0].type == 2); + + if (bFound) + { + let patches_len = {}; + let min_len = 1E10; + + // Search minimal patches + { + let current_len = 0; + + var subGraphIndex = 0; + var prevNodeId = -1; + let any_found = false; + for (var i = 0; i < results.length; i++) + { + if (results[i].type == 6) + { + patches_len[subGraphIndex] = current_len; + subGraphIndex++; + prevNodeId = -1; + min_len = Math.min(min_len, current_len); + current_len = 0; + } + + if (results[i].type == 4) + { + any_found = true; + var nodeId = parseInt(results[i].value); + var index = subGraphIndex; + + if (prevNodeId >= 0) + { + var edgeObject = this.graph.FindEdgeMin(prevNodeId, nodeId); + current_len = current_len + edgeObject.GetWeight(); + } + prevNodeId = nodeId; + } + } + if (any_found) + { + patches_len[subGraphIndex] = current_len; + min_len = Math.min(min_len, current_len); + } + } + + let min_pathes_count = 0; + for (const [key, value] of Object.entries(patches_len)) { + if (value == min_len) + { + min_pathes_count = min_pathes_count + 1; + } + } + + this.nSubGraphCount = min_pathes_count; + + this.foundSubGraphs = {}; + this.foundPaths = {}; + for (var i = 0; i < this.nSubGraphCount; i++) + { + this.foundSubGraphs[i] = {}; + this.foundPaths[i] = []; + } + + var subGraphIndex = 0; + var prevNodeId = -1; + for (var i = 0; i < results.length; i++) + { + if (results[i].type == 6) + { + subGraphIndex++; + prevNodeId = -1; + } + + if (patches_len[subGraphIndex] > min_len) + { + // Skip + continue; + } + + if (results[i].type == 4) + { + var nodeId = parseInt(results[i].value); + var index = subGraphIndex; + var subgGraph = this.foundSubGraphs[index]; + subgGraph[nodeId] = true; + + this.foundPaths[index].push(nodeId); + + if (prevNodeId >= 0) + { + var edgeObject = this.graph.FindEdgeMin(prevNodeId, nodeId); + subgGraph[edgeObject.id] = true; + } + prevNodeId = nodeId; + } + } + + this.setResultMessage(); + } + else + { + this.secondObject = null; + this.firstObject = null; + this.message = g_pathNotExists; + } + + this.outResultCallback(outputResult); +} + +FindAllShortestPathes.prototype.messageWasChanged = function() +{ + var self = this; + + if ($('#enumSubgraphs')) + { + for (var i = 0; i < this.nSubGraphCount; i++) + { + $('#enumSubgraphs').append(""); + } + + $('#enumSubgraphs').change(function () { + self.nSubgraphIndex = $('#enumSubgraphs').val(); + self.setResultMessage(); + self.app.redrawGraph(); + self.app.updateMessage(); + }); + } +} + +FindAllShortestPathes.prototype.selectVertex = function(vertex) +{ + this.pathObjects = null; + this.shortDist = null; + + if (this.firstObject) + { + this.message = g_processing; + this.secondObject = vertex; + this.selectedObjects = []; + } + else + { + this.firstObject = vertex; + this.secondObject = null; + this.selectedObjects = {}; + this.message = g_selectFinishVertex; + } + + return true; +} + +FindAllShortestPathes.prototype.deselectAll = function() +{ + this.firstObject = null; + this.secondObject = null; + this.selectedObjects = {}; + this.foundSubGraphs = {}; + this.nSubgraphIndex = 0; + this.nSubGraphCount = 0; + this.message = g_selectStartVertex; + return true; +} + +FindAllShortestPathes.prototype.instance = function() +{ + return false; +} + +FindAllShortestPathes.prototype.getObjectSelectedGroup = function(object) +{ + return (this.nSubgraphIndex in this.foundSubGraphs && object.id in this.foundSubGraphs[this.nSubgraphIndex]) ? 1 : + (object.id in this.selectedObjects) ? this.selectedObjects[object.id] : ((object == this.firstObject || object == object.secondObject) ? 1 : 0); +} + +FindAllShortestPathes.prototype.getPriority = function() +{ + return -9.46; +} + +FindAllShortestPathes.prototype.IsSupportNegativeWeight = function() +{ + return true; +} + +// Factory for connected components. +function CreateFindAllShortestPathes(graph, app) +{ + return new FindAllShortestPathes(graph, app) +} + +// Gerister connected component. +RegisterAlgorithm (CreateFindAllShortestPathes); diff --git a/script/pages/create_graph_by_edge_list/api/index.js.cache b/script/pages/create_graph_by_edge_list/api/index.js.cache index 03fc783..8009f9e 100644 --- a/script/pages/create_graph_by_edge_list/api/index.js.cache +++ b/script/pages/create_graph_by_edge_list/api/index.js.cache @@ -1,4 +1,4 @@ -moduleLoader.beginCacheLoading(["/script/entities/graph/api/index.js?v=99","/script/shared/point.js?v=99","/script/entities/edge/api/index.js?v=99","/script/entities/edge/model/BaseEdge.js?v=99","/script/entities/edge/model/EdgeModel.js?v=99","/script/entities/vertex/api/index.js?v=99","/script/entities/vertex/model/BaseVertex.js?v=99","/script/entities/vertex/model/VertexModel.js?v=99","/script/entities/graph/model/Graph.js?v=99",]);{let modulDir="pages/create_graph_by_edge_list/";doInclude([include("entities/graph/api/index.js")]);} +moduleLoader.beginCacheLoading(["/script/entities/graph/api/index.js?v=100","/script/shared/point.js?v=100","/script/entities/edge/api/index.js?v=100","/script/entities/edge/model/BaseEdge.js?v=100","/script/entities/edge/model/EdgeModel.js?v=100","/script/entities/vertex/api/index.js?v=100","/script/entities/vertex/model/BaseVertex.js?v=100","/script/entities/vertex/model/VertexModel.js?v=100","/script/entities/graph/model/Graph.js?v=100",]);{let modulDir="pages/create_graph_by_edge_list/";doInclude([include("entities/graph/api/index.js")]);} {let modulDir="entities/graph/";doInclude([include("shared/point.js"),include("entities/edge/api/index.js"),include("entities/vertex/api/index.js"),include("model/Graph.js",modulDir)])}function Point(x,y){this.x=x||0;this.y=y||0;};Point.prototype.x=null;Point.prototype.y=null;Point.prototype.add=function(v){return new Point(this.x+v.x,this.y+v.y);};Point.prototype.addValue=function(v){return new Point(this.x+v,this.y+v);};Point.prototype.clone=function(){return new Point(this.x,this.y);};Point.prototype.degreesTo=function(v){var dx=this.x-v.x;var dy=this.y-v.y;var angle=Math.atan2(dy,dx);return angle*(180/Math.PI);};Point.prototype.distance=function(v){return Math.sqrt(this.distanceSqr(v));};Point.prototype.distanceSqr=function(v){var x=this.x-v.x;var y=this.y-v.y;return x*x+y*y;};Point.prototype.equals=function(toCompare){return this.x==toCompare.x&&this.y==toCompare.y;};Point.prototype.interpolate=function(v,f){return new Point((this.x+v.x)*f,(this.y+v.y)*f);};Point.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y);};Point.prototype.normalize=function(thickness){var l=this.length();this.x=this.x/l*thickness;this.y=this.y/l*thickness;return new Point(this.x,this.y);};Point.prototype.normalizeCopy=function(thickness){var l=this.length();return new Point(this.x/l*thickness,this.y/l*thickness);};Point.prototype.orbit=function(origin,arcWidth,arcHeight,degrees){var radians=degrees*(Math.PI/180);this.x=origin.x+arcWidth*Math.cos(radians);this.y=origin.y+arcHeight*Math.sin(radians);};Point.prototype.rotate=function(center,degrees){var radians=degrees*(Math.PI/180);offset=this.subtract(center);this.x=offset.x*Math.cos(radians)-offset.y*Math.sin(radians);this.y=offset.x*Math.sin(radians)+offset.y*Math.cos(radians);this.x=this.x+center.x;this.y=this.y+center.y;return this;};Point.prototype.offset=function(dx,dy){this.x+=dx;this.y+=dy;};Point.prototype.subtract=function(v){return new Point(this.x-v.x,this.y-v.y);};Point.prototype.subtractValue=function(value){return new Point(this.x-value,this.y-value);};Point.prototype.multiply=function(value){return new Point(this.x*value,this.y*value);};Point.prototype.toString=function(){return"(x="+this.x+", y="+this.y+")";};Point.prototype.normal=function(){return new Point(-this.y,this.x);};Point.prototype.min=function(point) {return new Point(Math.min(this.x,point.x),Math.min(this.y,point.y));};Point.prototype.max=function(point) {return new Point(Math.max(this.x,point.x),Math.max(this.y,point.y));};Point.prototype.inverse=function() diff --git a/script/pages/create_graph_by_incidence_matrix/api/index.js.cache b/script/pages/create_graph_by_incidence_matrix/api/index.js.cache index 88b727e..6ff9e19 100644 --- a/script/pages/create_graph_by_incidence_matrix/api/index.js.cache +++ b/script/pages/create_graph_by_incidence_matrix/api/index.js.cache @@ -1,4 +1,4 @@ -moduleLoader.beginCacheLoading(["/script/entities/graph/api/index.js?v=99","/script/shared/point.js?v=99","/script/entities/edge/api/index.js?v=99","/script/entities/edge/model/BaseEdge.js?v=99","/script/entities/edge/model/EdgeModel.js?v=99","/script/entities/vertex/api/index.js?v=99","/script/entities/vertex/model/BaseVertex.js?v=99","/script/entities/vertex/model/VertexModel.js?v=99","/script/entities/graph/model/Graph.js?v=99",]);{let modulDir="pages/create_graph_by_matrix/";doInclude([include("entities/graph/api/index.js")]);} +moduleLoader.beginCacheLoading(["/script/entities/graph/api/index.js?v=100","/script/shared/point.js?v=100","/script/entities/edge/api/index.js?v=100","/script/entities/edge/model/BaseEdge.js?v=100","/script/entities/edge/model/EdgeModel.js?v=100","/script/entities/vertex/api/index.js?v=100","/script/entities/vertex/model/BaseVertex.js?v=100","/script/entities/vertex/model/VertexModel.js?v=100","/script/entities/graph/model/Graph.js?v=100",]);{let modulDir="pages/create_graph_by_matrix/";doInclude([include("entities/graph/api/index.js")]);} {let modulDir="entities/graph/";doInclude([include("shared/point.js"),include("entities/edge/api/index.js"),include("entities/vertex/api/index.js"),include("model/Graph.js",modulDir)])}function Point(x,y){this.x=x||0;this.y=y||0;};Point.prototype.x=null;Point.prototype.y=null;Point.prototype.add=function(v){return new Point(this.x+v.x,this.y+v.y);};Point.prototype.addValue=function(v){return new Point(this.x+v,this.y+v);};Point.prototype.clone=function(){return new Point(this.x,this.y);};Point.prototype.degreesTo=function(v){var dx=this.x-v.x;var dy=this.y-v.y;var angle=Math.atan2(dy,dx);return angle*(180/Math.PI);};Point.prototype.distance=function(v){return Math.sqrt(this.distanceSqr(v));};Point.prototype.distanceSqr=function(v){var x=this.x-v.x;var y=this.y-v.y;return x*x+y*y;};Point.prototype.equals=function(toCompare){return this.x==toCompare.x&&this.y==toCompare.y;};Point.prototype.interpolate=function(v,f){return new Point((this.x+v.x)*f,(this.y+v.y)*f);};Point.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y);};Point.prototype.normalize=function(thickness){var l=this.length();this.x=this.x/l*thickness;this.y=this.y/l*thickness;return new Point(this.x,this.y);};Point.prototype.normalizeCopy=function(thickness){var l=this.length();return new Point(this.x/l*thickness,this.y/l*thickness);};Point.prototype.orbit=function(origin,arcWidth,arcHeight,degrees){var radians=degrees*(Math.PI/180);this.x=origin.x+arcWidth*Math.cos(radians);this.y=origin.y+arcHeight*Math.sin(radians);};Point.prototype.rotate=function(center,degrees){var radians=degrees*(Math.PI/180);offset=this.subtract(center);this.x=offset.x*Math.cos(radians)-offset.y*Math.sin(radians);this.y=offset.x*Math.sin(radians)+offset.y*Math.cos(radians);this.x=this.x+center.x;this.y=this.y+center.y;return this;};Point.prototype.offset=function(dx,dy){this.x+=dx;this.y+=dy;};Point.prototype.subtract=function(v){return new Point(this.x-v.x,this.y-v.y);};Point.prototype.subtractValue=function(value){return new Point(this.x-value,this.y-value);};Point.prototype.multiply=function(value){return new Point(this.x*value,this.y*value);};Point.prototype.toString=function(){return"(x="+this.x+", y="+this.y+")";};Point.prototype.normal=function(){return new Point(-this.y,this.x);};Point.prototype.min=function(point) {return new Point(Math.min(this.x,point.x),Math.min(this.y,point.y));};Point.prototype.max=function(point) {return new Point(Math.max(this.x,point.x),Math.max(this.y,point.y));};Point.prototype.inverse=function() diff --git a/script/pages/create_graph_by_matrix/api/index.js.cache b/script/pages/create_graph_by_matrix/api/index.js.cache index 8b66e3d..3407121 100644 --- a/script/pages/create_graph_by_matrix/api/index.js.cache +++ b/script/pages/create_graph_by_matrix/api/index.js.cache @@ -1,4 +1,4 @@ -moduleLoader.beginCacheLoading(["/script/entities/graph/api/index.js?v=99","/script/shared/point.js?v=99","/script/entities/edge/api/index.js?v=99","/script/entities/edge/model/BaseEdge.js?v=99","/script/entities/edge/model/EdgeModel.js?v=99","/script/entities/vertex/api/index.js?v=99","/script/entities/vertex/model/BaseVertex.js?v=99","/script/entities/vertex/model/VertexModel.js?v=99","/script/entities/graph/model/Graph.js?v=99","/script/pages/create_graph_by_matrix/model/createByMatrixMain.js?v=99","/script/pages/create_graph_by_matrix/model/main.js?v=99",]);{let modulDir="pages/create_graph_by_matrix/";doInclude([include("entities/graph/api/index.js"),include("model/createByMatrixMain.js",modulDir),include("model/main.js",modulDir)]);} +moduleLoader.beginCacheLoading(["/script/entities/graph/api/index.js?v=100","/script/shared/point.js?v=100","/script/entities/edge/api/index.js?v=100","/script/entities/edge/model/BaseEdge.js?v=100","/script/entities/edge/model/EdgeModel.js?v=100","/script/entities/vertex/api/index.js?v=100","/script/entities/vertex/model/BaseVertex.js?v=100","/script/entities/vertex/model/VertexModel.js?v=100","/script/entities/graph/model/Graph.js?v=100","/script/pages/create_graph_by_matrix/model/createByMatrixMain.js?v=100","/script/pages/create_graph_by_matrix/model/main.js?v=100",]);{let modulDir="pages/create_graph_by_matrix/";doInclude([include("entities/graph/api/index.js"),include("model/createByMatrixMain.js",modulDir),include("model/main.js",modulDir)]);} {let modulDir="entities/graph/";doInclude([include("shared/point.js"),include("entities/edge/api/index.js"),include("entities/vertex/api/index.js"),include("model/Graph.js",modulDir)])}function Point(x,y){this.x=x||0;this.y=y||0;};Point.prototype.x=null;Point.prototype.y=null;Point.prototype.add=function(v){return new Point(this.x+v.x,this.y+v.y);};Point.prototype.addValue=function(v){return new Point(this.x+v,this.y+v);};Point.prototype.clone=function(){return new Point(this.x,this.y);};Point.prototype.degreesTo=function(v){var dx=this.x-v.x;var dy=this.y-v.y;var angle=Math.atan2(dy,dx);return angle*(180/Math.PI);};Point.prototype.distance=function(v){return Math.sqrt(this.distanceSqr(v));};Point.prototype.distanceSqr=function(v){var x=this.x-v.x;var y=this.y-v.y;return x*x+y*y;};Point.prototype.equals=function(toCompare){return this.x==toCompare.x&&this.y==toCompare.y;};Point.prototype.interpolate=function(v,f){return new Point((this.x+v.x)*f,(this.y+v.y)*f);};Point.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y);};Point.prototype.normalize=function(thickness){var l=this.length();this.x=this.x/l*thickness;this.y=this.y/l*thickness;return new Point(this.x,this.y);};Point.prototype.normalizeCopy=function(thickness){var l=this.length();return new Point(this.x/l*thickness,this.y/l*thickness);};Point.prototype.orbit=function(origin,arcWidth,arcHeight,degrees){var radians=degrees*(Math.PI/180);this.x=origin.x+arcWidth*Math.cos(radians);this.y=origin.y+arcHeight*Math.sin(radians);};Point.prototype.rotate=function(center,degrees){var radians=degrees*(Math.PI/180);offset=this.subtract(center);this.x=offset.x*Math.cos(radians)-offset.y*Math.sin(radians);this.y=offset.x*Math.sin(radians)+offset.y*Math.cos(radians);this.x=this.x+center.x;this.y=this.y+center.y;return this;};Point.prototype.offset=function(dx,dy){this.x+=dx;this.y+=dy;};Point.prototype.subtract=function(v){return new Point(this.x-v.x,this.y-v.y);};Point.prototype.subtractValue=function(value){return new Point(this.x-value,this.y-value);};Point.prototype.multiply=function(value){return new Point(this.x*value,this.y*value);};Point.prototype.toString=function(){return"(x="+this.x+", y="+this.y+")";};Point.prototype.normal=function(){return new Point(-this.y,this.x);};Point.prototype.min=function(point) {return new Point(Math.min(this.x,point.x),Math.min(this.y,point.y));};Point.prototype.max=function(point) {return new Point(Math.max(this.x,point.x),Math.max(this.y,point.y));};Point.prototype.inverse=function() diff --git a/script/pages/editor/api/index.js.cache b/script/pages/editor/api/index.js.cache index 605726e..6e75cc0 100644 --- a/script/pages/editor/api/index.js.cache +++ b/script/pages/editor/api/index.js.cache @@ -1,4 +1,4 @@ -moduleLoader.beginCacheLoading(["/script/shared/utils.js?v=99","/script/shared/gzip.js?v=99","/script/entities/graph/api/index.js?v=99","/script/shared/point.js?v=99","/script/entities/edge/api/index.js?v=99","/script/entities/edge/model/BaseEdge.js?v=99","/script/entities/edge/model/EdgeModel.js?v=99","/script/entities/vertex/api/index.js?v=99","/script/entities/vertex/model/BaseVertex.js?v=99","/script/entities/vertex/model/VertexModel.js?v=99","/script/entities/graph/model/Graph.js?v=99","/script/features/draw_graph/api/index.js?v=99","/script/features/draw_graph/model/BaseBackgroundDrawer.js?v=99","/script/features/draw_graph/model/EdgeStyle.js?v=99","/script/features/draw_graph/model/BaseEdgeDrawer.js?v=99","/script/features/draw_graph/model/VertexShape.js?v=99","/script/features/draw_graph/model/VertexStyle.js?v=99","/script/features/draw_graph/model/BaseVertexDrawer.js?v=99","/script/features/draw_graph/model/GraphFullStyle.js?v=99","/script/features/algorithms/api/index.js?v=99","/script/features/algorithms/model/Algorithms.js?v=99","/script/features/algorithms/model/BaseTraversal.js?v=99","/script/features/base_handler/index.js?v=99","/script/features/default_handler/index.js?v=99","/script/features/add_vertices_handler/index.js?v=99","/script/features/connect_vertices_handler/index.js?v=99","/script/features/delete_objects_handler/index.js?v=99","/script/features/algorithm_handler/index.js?v=99","/script/features/select_auto_save_graph_or_not/index.js?v=99","/script/features/graph_preview/index.js?v=99","/script/features/serialization/api/index.js?v=99","/script/features/serialization/model/GraphMLCreator.js?v=99","/script/features/enum_vertices/EnumVertices.js?v=99","/script/pages/editor/model/texts.js?v=99","/script/pages/editor/model/UndoStack.js?v=99","/script/pages/editor/model/DiskSaveLoad.js?v=99","/script/pages/editor/model/Application.js?v=99","/script/pages/editor/ui/ya_metrika.js?v=99","/script/pages/editor/ui/editor.js?v=99","/script/pages/editor/ui/main.js?v=99",]);{function onloadEditor(){console.log("onload() call");doIncludeAsync([include("shared/canvas2svg.min.js"),include("features/group_rename_handler/index.js"),include("features/saved_graph_handler/index.js"),include("features/saved_graph_image_handler/index.js"),include("features/show_adjacency_matrix/index.js"),include("features/show_distance_matrix/index.js"),include("features/show_incidence_matrix/index.js"),include("features/setup_background_style/index.js"),include("features/setup_edge_style/index.js"),include("features/setup_vertex_style/index.js"),]);postLoadPage();} +moduleLoader.beginCacheLoading(["/script/shared/utils.js?v=100","/script/shared/gzip.js?v=100","/script/entities/graph/api/index.js?v=100","/script/shared/point.js?v=100","/script/entities/edge/api/index.js?v=100","/script/entities/edge/model/BaseEdge.js?v=100","/script/entities/edge/model/EdgeModel.js?v=100","/script/entities/vertex/api/index.js?v=100","/script/entities/vertex/model/BaseVertex.js?v=100","/script/entities/vertex/model/VertexModel.js?v=100","/script/entities/graph/model/Graph.js?v=100","/script/features/draw_graph/api/index.js?v=100","/script/features/draw_graph/model/BaseBackgroundDrawer.js?v=100","/script/features/draw_graph/model/EdgeStyle.js?v=100","/script/features/draw_graph/model/BaseEdgeDrawer.js?v=100","/script/features/draw_graph/model/VertexShape.js?v=100","/script/features/draw_graph/model/VertexStyle.js?v=100","/script/features/draw_graph/model/BaseVertexDrawer.js?v=100","/script/features/draw_graph/model/GraphFullStyle.js?v=100","/script/features/algorithms/api/index.js?v=100","/script/features/algorithms/model/Algorithms.js?v=100","/script/features/algorithms/model/BaseTraversal.js?v=100","/script/features/base_handler/index.js?v=100","/script/features/default_handler/index.js?v=100","/script/features/add_vertices_handler/index.js?v=100","/script/features/connect_vertices_handler/index.js?v=100","/script/features/delete_objects_handler/index.js?v=100","/script/features/algorithm_handler/index.js?v=100","/script/features/select_auto_save_graph_or_not/index.js?v=100","/script/features/graph_preview/index.js?v=100","/script/features/serialization/api/index.js?v=100","/script/features/serialization/model/GraphMLCreator.js?v=100","/script/features/enum_vertices/EnumVertices.js?v=100","/script/pages/editor/model/texts.js?v=100","/script/pages/editor/model/UndoStack.js?v=100","/script/pages/editor/model/DiskSaveLoad.js?v=100","/script/pages/editor/model/Application.js?v=100","/script/pages/editor/ui/ya_metrika.js?v=100","/script/pages/editor/ui/editor.js?v=100","/script/pages/editor/ui/main.js?v=100",]);{function onloadEditor(){console.log("onload() call");doIncludeAsync([include("shared/canvas2svg.min.js"),include("features/group_rename_handler/index.js"),include("features/saved_graph_handler/index.js"),include("features/saved_graph_image_handler/index.js"),include("features/show_adjacency_matrix/index.js"),include("features/show_distance_matrix/index.js"),include("features/show_incidence_matrix/index.js"),include("features/setup_background_style/index.js"),include("features/setup_edge_style/index.js"),include("features/setup_vertex_style/index.js"),]);postLoadPage();} let modulDir="pages/editor/";doInclude([include("shared/utils.js"),include("shared/gzip.js"),include("entities/graph/api/index.js"),include("features/draw_graph/api/index.js"),include("features/algorithms/api/index.js"),include("features/base_handler/index.js"),include("features/default_handler/index.js"),include("features/add_vertices_handler/index.js"),include("features/connect_vertices_handler/index.js"),include("features/delete_objects_handler/index.js"),include("features/algorithm_handler/index.js"),include("features/select_auto_save_graph_or_not/index.js"),include("features/serialization/api/index.js"),include("features/enum_vertices/EnumVertices.js"),include("model/texts.js",modulDir),include("model/UndoStack.js",modulDir),include("model/DiskSaveLoad.js",modulDir),include("model/Application.js",modulDir),include("ui/ya_metrika.js",modulDir),include("ui/editor.js",modulDir),include("ui/main.js",modulDir)],onloadEditor);} function gEncodeToHTML(str) {if(typeof str!=='string') @@ -908,7 +908,7 @@ entry.value[k][deepK]=parsedSave[entry.field][k][deepK];}}}} if(entry.check!=null) app[entry.check]=true;}});} {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","MaxIndependentSet.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","MaxIndependentSet.js","FindAllShortestPatches.js"];doIncludeAsync(pluginsList.map((plugin)=>include("model/plugins/"+plugin,modulDir)),onFinish);}} function getVertexToVertexArray(graph,ignoreDirection) {res={};for(var i=0;i=0;if(isMac) g_selectGroupText=document.getElementById("selectGroupMac").innerHTML;else -g_selectGroupText=document.getElementById("selectGroupWin").innerHTML;g_dragGroupText=document.getElementById("dragSelectedGroup").innerHTML;g_copyGroupeButton=document.getElementById("copySelectedGroup").innerHTML;g_removeGroupeButton=document.getElementById("removeSelectedGroup").innerHTML;g_BFSName=document.getElementById("BFSName").innerHTML;g_ColoringName=document.getElementById("ColoringName").innerHTML;g_findConnectedComponent=document.getElementById("findConnectedComponent").innerHTML;g_DFSName=document.getElementById("DFSName").innerHTML;g_EulerinLoopName=document.getElementById("EulerinLoopName").innerHTML;g_EulerinPath=document.getElementById("EulerinPath").innerHTML;g_FloidName=document.getElementById("FloidName").innerHTML;g_GraphReorder=document.getElementById("GraphReorder").innerHTML;g_HamiltoianCycleName=document.getElementById("HamiltoianCycleName").innerHTML;g_HamiltonianPath=document.getElementById("HamiltonianPath").innerHTML;g_MaxFlowName=document.getElementById("MaxFlowName").innerHTML;g_minimumSpanningTree=document.getElementById("minimumSpanningTree").innerHTML;g_modernGraphStyleName=document.getElementById("modernGraphStyleName").innerHTML;g_RadiusAndDiameter=document.getElementById("RadiusAndDiameter").innerHTML;g_findShortPathName=document.getElementById("findShortPathName").innerHTML;g_findShortPathBellmanFordName=document.getElementById("findShortPathBellmanFordName").innerHTML;g_VerticesDegreeName=document.getElementById("VerticesDegreeName").innerHTML;g_SpanningTreeResult=document.getElementById("MinSpanningTreeResult").innerHTML;g_SpanningTreeIgnoreDir=document.getElementById("MinSpanningIgnoreDir").innerHTML;g_SpanningTreeNotConnected=document.getElementById("MinSpanningNotConnected").innerHTML;g_selectFirstGraphIsomorphismCheck=document.getElementById("SelectFirstGraphIsomorphismCheck").innerHTML;g_selectSecondGraphIsomorphismCheck=document.getElementById("SelectSecondGraphIsomorphismCheck").innerHTML;g_selectFirstGraphPatternCheck=document.getElementById("SelectFirstGraphPatternCheck").innerHTML;g_selectSecondGraphForSearchSubgraph=document.getElementById("SelectSecondGraphForSearchSubgraph").innerHTML;g_graphsIsomorph=document.getElementById("GraphsIsomorph").innerHTML;g_graphsNotIsomorph=document.getElementById("GraphsNotIsomorph").innerHTML;g_numberOfIsomorphSubgraphIs=document.getElementById("NumberOfIsomorphSubgraphIs").innerHTML;g_graphHasNoIsomorphSubgraph=document.getElementById("GraphHasNoIsomorphSubgraph").innerHTML;g_searchIsomorphSubgraph=document.getElementById("SearchIsomorphSubgraph").innerHTML;g_subgraphNo=document.getElementById("SubgraphNo").innerHTML;g_graphHasNoAtleast2Graphs=document.getElementById("GraphHasNoAtleast2Graphs").innerHTML;g_IsomorphismCheck=document.getElementById("IsomorphismCheck").innerHTML;g_graphIsDisconnected=document.getElementById("GraphIsDisconnected").innerHTML;g_graphIsTrivial=document.getElementById("GraphIsTrivial").innerHTML;g_graphRadius=document.getElementById("GraphRadius").innerHTML;g_graphDiameter=document.getElementById("GraphDiameter").innerHTML;g_vertexCentral=document.getElementById("VertexCentral").innerHTML;g_vertexPeripheral=document.getElementById("VertexPeripheral").innerHTML;g_maximumDegreeOfGraph=document.getElementById("MaximumDegreeOfGraph").innerHTML;g_colorNumber=document.getElementById("ColorNumber").innerHTML;g_done=document.getElementById("Done").innerHTML;g_action=document.getElementById("ActionText").innerHTML;g_commonEdgeStyle=document.getElementById("CommonEdgeStyleText").innerHTML;g_selectedEdgeStyle=document.getElementById("SelectedEdgeStyleText").innerHTML;g_commonVertexStyle=document.getElementById("CommonVertexStyleText").innerHTML;g_selectedVertexStyle=document.getElementById("SelectedVertexStyleText").innerHTML;g_findAllPathes=document.getElementById("FindAllPathes").innerHTML;g_numberOfPathesFrom=document.getElementById("NumberOfPathesFrom").innerHTML;g_to=document.getElementById("To").innerHTML;g_are=document.getElementById("Are").innerHTML;g_pathN=document.getElementById("PathN").innerHTML;g_selectFinishVertex=document.getElementById("SelectFinishVertex").innerHTML;g_selectStartVertex=document.getElementById("SelectStartVertex").innerHTML;g_findAllPathesFromVertex=document.getElementById("findAllPathsFromVertex").innerHTML;g_distanceFrom=document.getElementById("distanceFrom").innerHTML;g_pathTo=document.getElementById("pathTo").innerHTML;g_useContextMenuText=document.getElementById("UseContextMenuText").innerHTML;g_findLongestPath=document.getElementById("findLongestPath").innerHTML;g_LengthOfLongestPathFrom=document.getElementById("LengthOfLongestPathFrom").innerHTML;g_additionalActions=document.getElementById("additionlActions").innerHTML;g_reverseAllEdges=document.getElementById("reverseAllEdges").innerHTML;g_makeAllUndirected=document.getElementById("makeAllUndirected").innerHTML;g_makeAllDirected=document.getElementById("makeAllDirected").innerHTML;g_pairWrongFormat=document.getElementById("pairWrongFormat").innerHTML;g_fix=document.getElementById("fixButton").innerHTML;g_reuseSavedEdge=document.getElementById("reuseSavedEdge").innerHTML;g_MaxClique=document.getElementById("maxClique").innerHTML;g_MaxCliqueNotFound=document.getElementById("maxCliqueNotFound").innerHTML;g_MaxCliqueSizeIs=document.getElementById("maxCliqueSizeIs").innerHTML;g_MaxCliqueContains=document.getElementById("maxCliqueContains").innerHTML;g_wrongImageFormatPNGAndJPEG=document.getElementById("wrongImageFormatPNGAndJPEG").innerHTML;g_wrongImageSizeP1=document.getElementById("wrongImageSizeP1").innerHTML;g_originalGraph=document.getElementById("originalGraph").innerHTML;g_autoSavedGraph=document.getElementById("autoSavedGraph").innerHTML;g_selectGraphToLoad=document.getElementById("selectGraphToLoad").innerHTML;g_vertexNamePlaceHolder=document.getElementById("vertexNamePlaceHolder").innerHTML;g_MaxIndependentSet=document.getElementById("maxIndependentSet").innerHTML;g_MaxIndependentSetNotFound=document.getElementById("maxIndependentSetNotFound").innerHTML;g_MaxIndependentSetSizeIs=document.getElementById("maxIndependentSetSizeIs").innerHTML;g_MaxIndependentSetContains=document.getElementById("maxIndependentSetContains").innerHTML;} +g_selectGroupText=document.getElementById("selectGroupWin").innerHTML;g_dragGroupText=document.getElementById("dragSelectedGroup").innerHTML;g_copyGroupeButton=document.getElementById("copySelectedGroup").innerHTML;g_removeGroupeButton=document.getElementById("removeSelectedGroup").innerHTML;g_BFSName=document.getElementById("BFSName").innerHTML;g_ColoringName=document.getElementById("ColoringName").innerHTML;g_findConnectedComponent=document.getElementById("findConnectedComponent").innerHTML;g_DFSName=document.getElementById("DFSName").innerHTML;g_EulerinLoopName=document.getElementById("EulerinLoopName").innerHTML;g_EulerinPath=document.getElementById("EulerinPath").innerHTML;g_FloidName=document.getElementById("FloidName").innerHTML;g_GraphReorder=document.getElementById("GraphReorder").innerHTML;g_HamiltoianCycleName=document.getElementById("HamiltoianCycleName").innerHTML;g_HamiltonianPath=document.getElementById("HamiltonianPath").innerHTML;g_MaxFlowName=document.getElementById("MaxFlowName").innerHTML;g_minimumSpanningTree=document.getElementById("minimumSpanningTree").innerHTML;g_modernGraphStyleName=document.getElementById("modernGraphStyleName").innerHTML;g_RadiusAndDiameter=document.getElementById("RadiusAndDiameter").innerHTML;g_findShortPathName=document.getElementById("findShortPathName").innerHTML;g_findShortPathBellmanFordName=document.getElementById("findShortPathBellmanFordName").innerHTML;g_VerticesDegreeName=document.getElementById("VerticesDegreeName").innerHTML;g_SpanningTreeResult=document.getElementById("MinSpanningTreeResult").innerHTML;g_SpanningTreeIgnoreDir=document.getElementById("MinSpanningIgnoreDir").innerHTML;g_SpanningTreeNotConnected=document.getElementById("MinSpanningNotConnected").innerHTML;g_selectFirstGraphIsomorphismCheck=document.getElementById("SelectFirstGraphIsomorphismCheck").innerHTML;g_selectSecondGraphIsomorphismCheck=document.getElementById("SelectSecondGraphIsomorphismCheck").innerHTML;g_selectFirstGraphPatternCheck=document.getElementById("SelectFirstGraphPatternCheck").innerHTML;g_selectSecondGraphForSearchSubgraph=document.getElementById("SelectSecondGraphForSearchSubgraph").innerHTML;g_graphsIsomorph=document.getElementById("GraphsIsomorph").innerHTML;g_graphsNotIsomorph=document.getElementById("GraphsNotIsomorph").innerHTML;g_numberOfIsomorphSubgraphIs=document.getElementById("NumberOfIsomorphSubgraphIs").innerHTML;g_graphHasNoIsomorphSubgraph=document.getElementById("GraphHasNoIsomorphSubgraph").innerHTML;g_searchIsomorphSubgraph=document.getElementById("SearchIsomorphSubgraph").innerHTML;g_subgraphNo=document.getElementById("SubgraphNo").innerHTML;g_graphHasNoAtleast2Graphs=document.getElementById("GraphHasNoAtleast2Graphs").innerHTML;g_IsomorphismCheck=document.getElementById("IsomorphismCheck").innerHTML;g_graphIsDisconnected=document.getElementById("GraphIsDisconnected").innerHTML;g_graphIsTrivial=document.getElementById("GraphIsTrivial").innerHTML;g_graphRadius=document.getElementById("GraphRadius").innerHTML;g_graphDiameter=document.getElementById("GraphDiameter").innerHTML;g_vertexCentral=document.getElementById("VertexCentral").innerHTML;g_vertexPeripheral=document.getElementById("VertexPeripheral").innerHTML;g_maximumDegreeOfGraph=document.getElementById("MaximumDegreeOfGraph").innerHTML;g_colorNumber=document.getElementById("ColorNumber").innerHTML;g_done=document.getElementById("Done").innerHTML;g_action=document.getElementById("ActionText").innerHTML;g_commonEdgeStyle=document.getElementById("CommonEdgeStyleText").innerHTML;g_selectedEdgeStyle=document.getElementById("SelectedEdgeStyleText").innerHTML;g_commonVertexStyle=document.getElementById("CommonVertexStyleText").innerHTML;g_selectedVertexStyle=document.getElementById("SelectedVertexStyleText").innerHTML;g_findAllPathes=document.getElementById("FindAllPathes").innerHTML;g_numberOfPathesFrom=document.getElementById("NumberOfPathesFrom").innerHTML;g_to=document.getElementById("To").innerHTML;g_are=document.getElementById("Are").innerHTML;g_pathN=document.getElementById("PathN").innerHTML;g_selectFinishVertex=document.getElementById("SelectFinishVertex").innerHTML;g_selectStartVertex=document.getElementById("SelectStartVertex").innerHTML;g_findAllPathesFromVertex=document.getElementById("findAllPathsFromVertex").innerHTML;g_distanceFrom=document.getElementById("distanceFrom").innerHTML;g_pathTo=document.getElementById("pathTo").innerHTML;g_useContextMenuText=document.getElementById("UseContextMenuText").innerHTML;g_findLongestPath=document.getElementById("findLongestPath").innerHTML;g_LengthOfLongestPathFrom=document.getElementById("LengthOfLongestPathFrom").innerHTML;g_additionalActions=document.getElementById("additionlActions").innerHTML;g_reverseAllEdges=document.getElementById("reverseAllEdges").innerHTML;g_makeAllUndirected=document.getElementById("makeAllUndirected").innerHTML;g_makeAllDirected=document.getElementById("makeAllDirected").innerHTML;g_pairWrongFormat=document.getElementById("pairWrongFormat").innerHTML;g_fix=document.getElementById("fixButton").innerHTML;g_reuseSavedEdge=document.getElementById("reuseSavedEdge").innerHTML;g_MaxClique=document.getElementById("maxClique").innerHTML;g_MaxCliqueNotFound=document.getElementById("maxCliqueNotFound").innerHTML;g_MaxCliqueSizeIs=document.getElementById("maxCliqueSizeIs").innerHTML;g_MaxCliqueContains=document.getElementById("maxCliqueContains").innerHTML;g_wrongImageFormatPNGAndJPEG=document.getElementById("wrongImageFormatPNGAndJPEG").innerHTML;g_wrongImageSizeP1=document.getElementById("wrongImageSizeP1").innerHTML;g_originalGraph=document.getElementById("originalGraph").innerHTML;g_autoSavedGraph=document.getElementById("autoSavedGraph").innerHTML;g_selectGraphToLoad=document.getElementById("selectGraphToLoad").innerHTML;g_vertexNamePlaceHolder=document.getElementById("vertexNamePlaceHolder").innerHTML;g_MaxIndependentSet=document.getElementById("maxIndependentSet").innerHTML;g_MaxIndependentSetNotFound=document.getElementById("maxIndependentSetNotFound").innerHTML;g_MaxIndependentSetSizeIs=document.getElementById("maxIndependentSetSizeIs").innerHTML;g_MaxIndependentSetContains=document.getElementById("maxIndependentSetContains").innerHTML;g_FindAllShortestPathes=document.getElementById("findAllShortestPathes").innerHTML;g_numberOfShortestPathesFrom=document.getElementById("numberOfShortestPathesFrom").innerHTML;} function UndoStack(maxUndoStackSize){this.undoStack=[];this.maxUndoStackSize=maxUndoStackSize;} UndoStack.prototype.PushToStack=function(actionName,dataToSave) {var object={};object.actionName=actionName;object.data=dataToSave;this.undoStack.push(object);while(this.undoStack.length>this.maxUndoStackSize) diff --git a/script/pages/editor/model/texts.js b/script/pages/editor/model/texts.js index 5ff934e..61a2604 100644 --- a/script/pages/editor/model/texts.js +++ b/script/pages/editor/model/texts.js @@ -218,6 +218,9 @@ var g_MaxIndependentSetNotFound = "Max Independent Set is not found"; var g_MaxIndependentSetSizeIs = "Max Independent Set size is "; var g_MaxIndependentSetContains = ". Set contains these vertecies: "; +var g_FindAllShortestPathes = "Find all shortest paths"; +var g_numberOfShortestPathesFrom = "Number of shortest paths from "; + function loadTexts() { g_textsSelectAndMove = document.getElementById("SelectAndMoveObject").innerHTML; @@ -443,4 +446,7 @@ function loadTexts() g_MaxIndependentSetNotFound = document.getElementById("maxIndependentSetNotFound").innerHTML; g_MaxIndependentSetSizeIs = document.getElementById("maxIndependentSetSizeIs").innerHTML; g_MaxIndependentSetContains = document.getElementById("maxIndependentSetContains").innerHTML; + + g_FindAllShortestPathes = document.getElementById("findAllShortestPathes").innerHTML; + g_numberOfShortestPathesFrom = document.getElementById("numberOfShortestPathesFrom").innerHTML; } \ No newline at end of file diff --git a/tpl/home.php b/tpl/home.php index 9a08668..6284e80 100755 --- a/tpl/home.php +++ b/tpl/home.php @@ -987,6 +987,9 @@

+ +

+