Changeset 11460 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler
- Timestamp:
- 10/13/14 13:17:27 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeLinearCompiler.cs
r11208 r11460 26 26 public static LinearInstruction[] Compile(ISymbolicExpressionTree tree, Func<ISymbolicExpressionTreeNode, byte> opCodeMapper) { 27 27 var root = tree.Root.GetSubtree(0).GetSubtree(0); 28 return Compile(root, opCodeMapper); 29 } 30 31 public static LinearInstruction[] Compile(ISymbolicExpressionTreeNode root, Func<ISymbolicExpressionTreeNode, byte> opCodeMapper) { 28 32 var code = new LinearInstruction[root.GetLength()]; 29 33 code[0] = new LinearInstruction { dynamicNode = root, nArguments = (byte)root.SubtreeCount, opCode = opCodeMapper(root) };
Note: See TracChangeset
for help on using the changeset viewer.