mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-10-20 15:27:20 +00:00
Support negative weight for edges.
This commit is contained in:
1 parent
2e302b9013
commit
61bafa7d51
12 files changed
+37
-9
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user