Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/20/09 20:14:47 (15 years ago)
Author:
gkronber
Message:

Implemented #302 (Show variable names instead of var<index> in GP function trees).

  • Added a new operator that chooses a random value from a list of possible values.
  • Changed mutation operator for variables and differentials
  • Changed internal linear representation of function trees to support different types for local data.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/TreeEvaluatorBase.cs

    r2034 r2174  
    7878        case EvaluatorSymbolTable.DIFFERENTIAL:
    7979        case EvaluatorSymbolTable.VARIABLE: {
    80             instr.i_arg0 = (short)f.data[0]; // var
    81             instr.d_arg0 = f.data[1]; // weight
    82             instr.i_arg1 = (short)f.data[2]; // sample-offset
     80            instr.i_arg0 = (short)dataset.GetVariableIndex((string)f.localData[0]); // var
     81            instr.d_arg0 = (double)f.localData[1]; // weight
     82            instr.i_arg1 = (short)(int)f.localData[2]; // sample-offset
    8383            break;
    8484          }
    8585        case EvaluatorSymbolTable.CONSTANT: {
    86             instr.d_arg0 = f.data[0]; // value
     86            instr.d_arg0 = (double)f.localData[0]; // value
    8787            break;
    8888          }
Note: See TracChangeset for help on using the changeset viewer.