Changed algorithms menu design.

This commit is contained in:
Oleg Sh
2022-02-12 20:16:29 +02:00
parent 9c6cfb4197
commit 430e6a80be
26 changed files with 180 additions and 22 deletions

View File

@@ -29,6 +29,11 @@ BFSAlgorithm.prototype.getMessage = function(local)
return this.message;
}
BFSAlgorithm.prototype.getCategory = function()
{
return 1;
}
BFSAlgorithm.prototype.result = function(resultCallback)
{
var result = {};

View File

@@ -70,6 +70,11 @@ DFSAlgorithm.prototype.getPriority = function()
return -9.5;
}
DFSAlgorithm.prototype.getCategory = function()
{
return 1;
}
DFSAlgorithm.prototype.step = function()
{
for (var i = this.visited.length - 1; i >= 0; i--)

View File

@@ -30,6 +30,11 @@ FindEulerianLoop.prototype.getMessage = function(local)
return this.message;
}
FindEulerianLoop.prototype.getCategory = function()
{
return 1;
}
FindEulerianLoop.prototype.result = function(resultCallback)
{
this.outResultCallback = function (result ) { resultCallback(result); };

View File

@@ -30,6 +30,11 @@ FindEulerianPath.prototype.getMessage = function(local)
return this.message;
}
FindEulerianPath.prototype.getCategory = function()
{
return 1;
}
FindEulerianPath.prototype.result = function(resultCallback)
{
this.outResultCallback = function (result ) { resultCallback(result); };

View File

@@ -40,6 +40,11 @@ FindAllPathes.prototype.getMessage = function(local)
return this.message;
}
FindAllPathes.prototype.getCategory = function()
{
return 1;
}
FindAllPathes.prototype.result = function(resultCallback)
{
if (this.firstObject && this.secondObject)

View File

@@ -40,6 +40,11 @@ FindShortPatchsFromOne.prototype.getMessage = function(local)
return this.message;
}
FindShortPatchsFromOne.prototype.getCategory = function()
{
return 1;
}
FindShortPatchsFromOne.prototype.result = function(resultCallback)
{
if (this.firstObject)

View File

@@ -39,6 +39,11 @@ FloidAlgorithm.prototype.getMessage = function(local)
return this.message;
}
FloidAlgorithm.prototype.getCategory = function()
{
return 1;
}
FloidAlgorithm.prototype.result = function(resultCallback)
{
var result = {};

View File

@@ -30,6 +30,11 @@ FindHamiltonianLoop.prototype.getMessage = function(local)
return this.message;
}
FindHamiltonianLoop.prototype.getCategory = function()
{
return 1;
}
FindHamiltonianLoop.prototype.result = function(resultCallback)
{
this.outResultCallback = function (result ) { resultCallback(result); };

View File

@@ -30,6 +30,11 @@ FindHamiltonianPath.prototype.getMessage = function(local)
return this.message;
}
FindHamiltonianPath.prototype.getCategory = function()
{
return 1;
}
FindHamiltonianPath.prototype.result = function(resultCallback)
{
this.outResultCallback = function (result ) { resultCallback(result); };

View File

@@ -37,6 +37,11 @@ FindShortPathNew.prototype.getMessage = function(local)
return this.message;
}
FindShortPathNew.prototype.getCategory = function()
{
return 1;
}
FindShortPathNew.prototype.result = function(resultCallback)
{
if (this.firstObject && this.secondObject)