mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-02-16 10:40:57 +00:00
Support negative weight for edges.
This commit is contained in:
@@ -234,7 +234,7 @@ Graph.prototype.FindEdgeMin = function(id1, id2)
|
||||
Graph.prototype.FindEdgeMax = function(id1, id2)
|
||||
{
|
||||
var res = null;
|
||||
var maxWeight = 0;
|
||||
var maxWeight = -this.infinity;
|
||||
for (var i = 0; i < this.edges.length; i++)
|
||||
{
|
||||
var edge = this.edges[i];
|
||||
|
||||
Reference in New Issue
Block a user