Changeset 9944
- Timestamp:
- 09/10/13 17:23:25 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs
r9871 r9944 333 333 334 334 private static LinearInstruction[] GetPrefixSequence(LinearInstruction[] code, int startIndex) { 335 var s = new Stack<int>(); 335 336 var list = new List<LinearInstruction>(); 336 int i = startIndex; 337 while (i != code.Length) { 337 s.Push(startIndex); 338 while (s.Any()) { 339 int i = s.Pop(); 338 340 var instr = code[i]; 341 // push instructions in reverse execution order 342 for (int j = instr.nArguments - 1; j >= 0; j--) s.Push(instr.childIndex + j); 339 343 list.Add(instr); 340 i = instr.nArguments > 0 ? instr.childIndex : i + 1;341 344 } 342 345 return list.ToArray();
Note: See TracChangeset
for help on using the changeset viewer.