mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-04-05 07:16:17 +00:00
Added multi graph supports for some algorithms.
This commit is contained in:
@@ -120,6 +120,21 @@ Graph.prototype.FindEdge = function(id1, id2)
|
||||
return this.FindEdgeAny(id1, id2);
|
||||
}
|
||||
|
||||
Graph.prototype.FindEdgeById = function(edgeId)
|
||||
{
|
||||
var res = null;
|
||||
for (var i = 0; i < this.edges.length; i++)
|
||||
{
|
||||
if (this.edges[i].id == edgeId)
|
||||
{
|
||||
res = this.edges[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
Graph.prototype.FindEdgeAny = function(id1, id2)
|
||||
{
|
||||
var res = null;
|
||||
|
||||
Reference in New Issue
Block a user