mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-02-16 02:30:51 +00:00
Support negative weight for edges.
This commit is contained in:
@@ -218,6 +218,10 @@ FindLongestPath.prototype.getPriority = function()
|
||||
return -9.4;
|
||||
}
|
||||
|
||||
FindLongestPath.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateFindLongestPath(graph, app)
|
||||
|
||||
@@ -209,6 +209,11 @@ FindShortPatchsFromOne.prototype.IsSupportMultiGraph = function()
|
||||
return true;
|
||||
}
|
||||
|
||||
FindShortPatchsFromOne.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateFindShortPatchsFromOne(graph, app)
|
||||
{
|
||||
|
||||
@@ -96,6 +96,11 @@ MaxClique.prototype.IsSupportNegativeWeight = function()
|
||||
return true;
|
||||
}
|
||||
|
||||
MaxClique.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
function CreateMaxClique(graph, app)
|
||||
{
|
||||
return new MaxClique(graph, app)
|
||||
|
||||
@@ -188,13 +188,13 @@ FindMaxFlow.prototype.getPriority = function()
|
||||
}
|
||||
|
||||
// @return true, if you change resotry graph after use.
|
||||
BaseAlgorithm.prototype.wantRestore = function()
|
||||
FindMaxFlow.prototype.wantRestore = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// calls this method if wantRestore return true.
|
||||
BaseAlgorithm.prototype.restore = function()
|
||||
FindMaxFlow.prototype.restore = function()
|
||||
{
|
||||
if (this.selectedEdges != null)
|
||||
{
|
||||
@@ -216,6 +216,11 @@ BaseAlgorithm.prototype.restore = function()
|
||||
}
|
||||
}
|
||||
|
||||
FindMaxFlow.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateFindMaxFlow(graph, app)
|
||||
|
||||
@@ -155,6 +155,10 @@ MinimumSpanningTree.prototype.IsSupportMultiGraph = function ()
|
||||
return true;
|
||||
}
|
||||
|
||||
MinimumSpanningTree.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Factory for algorithm.
|
||||
function CreateMinimumSpanningTree(graph, app)
|
||||
|
||||
@@ -221,6 +221,11 @@ FindShortPathNew.prototype.IsSupportMultiGraph = function ()
|
||||
return true;
|
||||
}
|
||||
|
||||
FindShortPathNew.prototype.IsSupportNegativeWeight = function()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Factory for connected components.
|
||||
function CreateFindShortPathNew(graph, app)
|
||||
|
||||
Reference in New Issue
Block a user