Menu

[r37]: / GraphScript / trunk / scripts / algorithmsupport.js  Maximize  Restore  History

Download this file

28 lines (24 with data), 546 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//-------------------------------------------------------------------------------
//Create a new algorithm instance
function createAlgorithm()
{
return new Packages.ls.graph.script.Algorithm();
}
function runAlgorithm(alg)
{
if (!alg) return;
alg.run();
}
function addAlgorithmStep(alg,stepFunc,nextStepInd)
{
if (alg)
{
var step = new Packages.ls.graph.script.AlgorithmStep()
{
execute : stepFunc,
getNextStep : function() { return nextStepInd; }
};
//popup(alg+"");
alg.addStep(step);
}
}
MongoDB Logo MongoDB