Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/13/18 13:31:24 (6 years ago)
Author:
mkommend
Message:

#1973: Adapted symbolic expression tree compilers to allow more than 256 child nodes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeCompiler.cs

    r15583 r15766  
    6363        Instruction instr = new Instruction();
    6464        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;
    6767        instr.opCode = opCodeMapper(node);
    6868        if (node.Symbol is Argument) {
Note: See TracChangeset for help on using the changeset viewer.