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/FunctionLibraryInjector.cs

    r2165 r2174  
    3232namespace HeuristicLab.GP.StructureIdentification {
    3333  public class FunctionLibraryInjector : OperatorBase {
    34     private const string NUMBEROFINPUTVARIABLES = "NumberOfInputVariables";
    3534    private const string FUNCTIONLIBRARY = "FunctionLibrary";
    3635    private const string TARGETVARIABLE = "TargetVariable";
     
    7069    public FunctionLibraryInjector()
    7170      : base() {
    72       AddVariableInfo(new VariableInfo(NUMBEROFINPUTVARIABLES, "The number of available input variables", typeof(IntData), VariableKind.In));
    7371      AddVariableInfo(new VariableInfo(TARGETVARIABLE, "The target variable", typeof(IntData), VariableKind.In));
    7472      AddVariableInfo(new VariableInfo(MINTIMEOFFSET, "Minimal time offset for all features", typeof(IntData), VariableKind.In));
     
    111109      StructId.Variable variable;
    112110      GPOperatorLibrary operatorLibrary;
    113       int nInputVariables = GetVariableValue<IntData>(NUMBEROFINPUTVARIABLES, scope, true).Data;
    114111      int targetVariable = GetVariableValue<IntData>(TARGETVARIABLE, scope, true).Data;
    115112
     
    225222      ConditionalAddOperator(XOR_ALLOWED, operatorLibrary, xor);
    226223
    227       variable.SetConstraints(1, nInputVariables, minTimeOffset, maxTimeOffset);
    228       differential.SetConstraints(1, nInputVariables, minTimeOffset, maxTimeOffset);
     224      variable.SetConstraints(minTimeOffset, maxTimeOffset);
     225      differential.SetConstraints(minTimeOffset, maxTimeOffset);
    229226
    230227      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(FUNCTIONLIBRARY), operatorLibrary));
Note: See TracChangeset for help on using the changeset viewer.