mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-02-16 10:40:57 +00:00
Turn on negative edge weight support
This commit is contained in:
@@ -146,6 +146,12 @@ BaseAlgorithm.prototype.getCategory = function()
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Algorithm support negative edge weight
|
||||
BaseAlgorithm.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Default handler.
|
||||
* Select using mouse, drag.
|
||||
|
||||
@@ -115,6 +115,11 @@ BFSAlgorithm.prototype.IsSupportMultiGraph = function()
|
||||
return true;
|
||||
}
|
||||
|
||||
BFSAlgorithm.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateBFSAlgorithm(graph, app)
|
||||
{
|
||||
|
||||
@@ -375,6 +375,10 @@ Coloring.prototype.IsSupportMultiGraph = function()
|
||||
return true;
|
||||
}
|
||||
|
||||
Coloring.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateColoring(graph, app)
|
||||
|
||||
@@ -119,6 +119,11 @@ FindConnectedComponentNew.prototype.IsSupportMultiGraph = function()
|
||||
return true;
|
||||
}
|
||||
|
||||
FindConnectedComponentNew.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateConnectedComponetsNew(graph, app)
|
||||
|
||||
@@ -114,6 +114,11 @@ DFSAlgorithm.prototype.IsSupportMultiGraph = function()
|
||||
return true;
|
||||
}
|
||||
|
||||
DFSAlgorithm.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateDFSAlgorithm(graph, app)
|
||||
{
|
||||
|
||||
@@ -87,6 +87,11 @@ FindEulerianLoop.prototype.getPriority = function()
|
||||
return -7.5;
|
||||
}
|
||||
|
||||
FindEulerianLoop.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateFindEulerianLoop(graph, app)
|
||||
{
|
||||
|
||||
@@ -87,6 +87,11 @@ FindEulerianPath.prototype.getPriority = function()
|
||||
return -7.5;
|
||||
}
|
||||
|
||||
FindEulerianPath.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateFindEulerianPath(graph, app)
|
||||
{
|
||||
|
||||
@@ -221,6 +221,10 @@ FindAllPathes.prototype.getPriority = function()
|
||||
return -9.4;
|
||||
}
|
||||
|
||||
FindAllPathes.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateFindAllPathes(graph, app)
|
||||
|
||||
@@ -165,6 +165,11 @@ GraphReorder.prototype.IsSupportMultiGraph = function()
|
||||
return true;
|
||||
}
|
||||
|
||||
GraphReorder.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateAlgorithmGraphReorder(graph, app)
|
||||
{
|
||||
|
||||
@@ -104,6 +104,11 @@ FindHamiltonianLoop.prototype.IsSupportMultiGraph = function()
|
||||
return true;
|
||||
}
|
||||
|
||||
FindHamiltonianLoop.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateFindHamiltonianLoop(graph, app)
|
||||
{
|
||||
|
||||
@@ -102,6 +102,11 @@ FindHamiltonianPath.prototype.IsSupportMultiGraph = function()
|
||||
return true;
|
||||
}
|
||||
|
||||
FindHamiltonianPath.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateFindHamiltonianPath(graph, app)
|
||||
{
|
||||
|
||||
@@ -289,6 +289,11 @@ IsomorphismCheck.prototype.messageWasChanged = function()
|
||||
}
|
||||
}
|
||||
|
||||
IsomorphismCheck.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateIsomorphismCheck(graph, app)
|
||||
{
|
||||
|
||||
@@ -91,6 +91,11 @@ MaxClique.prototype.getPriority = function()
|
||||
return -5;
|
||||
}
|
||||
|
||||
MaxClique.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
function CreateMaxClique(graph, app)
|
||||
{
|
||||
return new MaxClique(graph, app)
|
||||
|
||||
@@ -188,6 +188,11 @@ ModernGraphStyle.prototype.IsSupportMultiGraph = function()
|
||||
return true;
|
||||
}
|
||||
|
||||
ModernGraphStyle.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateAlgorithmModernGraphStyle(graph, app)
|
||||
{
|
||||
|
||||
@@ -221,6 +221,11 @@ RadiusAndDiameter.prototype.IsSupportMultiGraph = function ()
|
||||
return true;
|
||||
}
|
||||
|
||||
RadiusAndDiameter.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateAlgorithmRadiusAndDiameter(graph, app)
|
||||
{
|
||||
|
||||
@@ -92,6 +92,11 @@ VerticesDegree.prototype.IsSupportMultiGraph = function ()
|
||||
return true;
|
||||
}
|
||||
|
||||
VerticesDegree.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateAlgorithmVerticesDegree(graph, app)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user