Added max flow algorithm.

This commit is contained in:
Unick Soft
2018-04-14 22:39:52 +03:00
parent e14bf77af6
commit c1c0d55075
10 changed files with 633 additions and 101 deletions

View File

@@ -210,9 +210,19 @@ BaseAlgorithmEx.prototype.CalculateAlgorithm = function(queryString, resultCallb
$edges = $xml.find( "edge" );
$edges.each(function(){
var source = $(this).attr('source');
var target = $(this).attr('target');
pathObjects.push(graph.FindEdge(source, target));
var source = $(this).attr('source');
var target = $(this).attr('target');
var edge = graph.FindEdge(source, target);
pathObjects.push(edge);
$data = $(this).find("data");
$data.each(function(){
if (!properties[edge.id])
{
properties[edge.id] = {};
}
properties[edge.id][$(this).attr('key')] = $(this).text();
});
});
console.log(result);