Changeset 16388 for branches/2892_LR-prediction-intervals/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Timestamp:
- 12/15/18 12:36:08 (6 years ago)
- Location:
- branches/2892_LR-prediction-intervals
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2892_LR-prediction-intervals
- Property svn:ignore
-
old new 1 *.docstates 2 *.psess 3 *.resharper 4 *.suo 5 *.user 6 *.vsp 7 Doxygen 8 FxCopResults.txt 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 11 HeuristicLab 3.3.5.1.ReSharper.user 12 HeuristicLab 3.3.6.0.ReSharper.user 13 HeuristicLab.4.5.resharper.user 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 16 HeuristicLab.resharper.user 17 ProtoGen.exe 1 18 TestResults 19 _ReSharper.HeuristicLab 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 22 _ReSharper.HeuristicLab.ExtLibs 23 bin 24 protoc.exe 25 obj 26 .vs
-
- Property svn:mergeinfo changed
-
Property
svn:global-ignores
set to
*.nuget
packages
- Property svn:ignore
-
branches/2892_LR-prediction-intervals/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Property svn:mergeinfo changed
-
branches/2892_LR-prediction-intervals/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/Instruction.cs
r15583 r16388 29 29 public byte opCode; 30 30 // number of arguments of the current instruction 31 public bytenArguments;31 public ushort nArguments; 32 32 // an optional object value (addresses for calls, argument index for arguments) 33 33 public object data; -
branches/2892_LR-prediction-intervals/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeCompiler.cs
r15583 r16388 63 63 Instruction instr = new Instruction(); 64 64 int subtreesCount = node.SubtreeCount; 65 if (subtreesCount > 255) throw new ArgumentException("Number of subtrees is too big (>255)");66 instr.nArguments = ( byte)subtreesCount;65 if (subtreesCount > ushort.MaxValue) throw new ArgumentException("Number of subtrees is too big (> 65.535)"); 66 instr.nArguments = (ushort)subtreesCount; 67 67 instr.opCode = opCodeMapper(node); 68 68 if (node.Symbol is Argument) { -
branches/2892_LR-prediction-intervals/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeLinearCompiler.cs
r15583 r16388 27 27 var root = tree.Root.GetSubtree(0).GetSubtree(0); 28 28 var code = new LinearInstruction[root.GetLength()]; 29 code[0] = new LinearInstruction { dynamicNode = root, nArguments = (byte)root.SubtreeCount, opCode = opCodeMapper(root) }; 29 if (root.SubtreeCount > ushort.MaxValue) throw new ArgumentException("Number of subtrees is too big (>65.535)"); 30 code[0] = new LinearInstruction { dynamicNode = root, nArguments = (ushort)root.SubtreeCount, opCode = opCodeMapper(root) }; 30 31 int c = 1, i = 0; 31 32 foreach (var node in root.IterateNodesBreadth()) { 32 33 for (int j = 0; j < node.SubtreeCount; ++j) { 33 34 var s = node.GetSubtree(j); 34 code[c + j] = new LinearInstruction { dynamicNode = s, nArguments = (byte)s.SubtreeCount, opCode = opCodeMapper(s) }; 35 if (s.SubtreeCount > ushort.MaxValue) throw new ArgumentException("Number of subtrees is too big (>65.535)"); 36 code[c + j] = new LinearInstruction { dynamicNode = s, nArguments = (ushort)s.SubtreeCount, opCode = opCodeMapper(s) }; 35 37 } 36 38 code[i].childIndex = c;
Note: See TracChangeset
for help on using the changeset viewer.