Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/21/10 15:21:34 (14 years ago)
Author:
gkronber
Message:

Refactored symbolic expression tree encoding and problem classes for symbolic regression. #937 , #938

Location:
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Compiler
Files:
1 added
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Compiler/Instruction.cs

    r3456 r3462  
    2626using System.Collections.Generic;
    2727using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols;
     28using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
    2929
    30 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
    31   public enum CodeSymbol : byte {
    32     Add,
    33     Sub,
    34     Mul,
    35     Div,
    36     Call,
    37     Arg,
    38     Values,
    39     Dynamic
    40   };
     30namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Compiler {
     31  // total size of this struct should be small to improve cache access while executing the code
     32  // should be aligned to 8/16/32 byte
     33  // size = 4(8) + 1 + 1 + 2 = 8 (12)
    4134  public struct Instruction {
     35    // the tree node can hold additional data that is necessary for the execution of this instruction
     36    public SymbolicExpressionTreeNode dynamicNode;
     37    // op code of the function that determines what operation should be executed
     38    public byte opCode;
     39    // number of arguments of the current instruction
    4240    public byte nArguments;
    43     public CodeSymbol symbol;
    44     public short iArg0;
    45     public SymbolicExpressionTreeNode dynamicNode;
     41    // an optional short value (addresses for calls, argument index for arguments)
     42    public ushort iArg0;
    4643  }
    4744}
Note: See TracChangeset for help on using the changeset viewer.