Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2821


Ignore:
Timestamp:
02/17/10 19:22:45 (15 years ago)
Author:
gkronber
Message:

Removed access to local variable DIFFERENTIALS_ALLOWED in time series prognosis engines. #877 (Predefined GP engines for time series prognosis are defect because of the removal of local variables of function library injectors in #748)

Location:
trunk/sources
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification.Networks/3.2/FunctionLibraryInjector.cs

    r2627 r2821  
    6666
    6767    protected override FunctionLibrary CreateFunctionLibrary() {
    68       return Create(GetVariableValue<BoolData>(DIFFERENTIALS_ALLOWED, null, false).Data, minTimeOffset, maxTimeOffset);
     68      return Create(minTimeOffset, maxTimeOffset);
    6969    }
    7070
    71     public static FunctionLibrary Create(bool includeDifferential, int minTimeOffset, int maxTimeOffset) {
     71    public static FunctionLibrary Create(int minTimeOffset, int maxTimeOffset) {
    7272      FunctionLibrary functionLibrary = new FunctionLibrary();
    7373
     
    8383      List<IFunction> f0Functions =
    8484        new List<IFunction>() {
    85           variable, constant, addition, subtraction,
     85          differential, variable, constant, addition, subtraction,
    8686          division, multiplication};
    8787
    88       if (includeDifferential)
    89         f0Functions.Add(differential);
     88
    9089      #endregion
    9190
     
    144143      SetAllowedSubOperators(openSub, f1Functions);
    145144
    146       if (includeDifferential)
    147         functionLibrary.AddFunction(differential);
    148145      f0Functions.ForEach(x => functionLibrary.AddFunction(x));
    149146      f1Functions.ForEach(x => functionLibrary.AddFunction(x));
  • trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/OffspringSelectionGPTimeSeriesPrognosis.cs

    r2722 r2821  
    5454      SequentialProcessor seq = new SequentialProcessor();
    5555      DefaultFunctionLibraryInjector funLibInjector = new DefaultFunctionLibraryInjector();
    56       funLibInjector.GetVariable("Differentials").Value = new BoolData(true);
    5756      seq.AddSubOperator(funLibInjector);
    5857      seq.AddSubOperator(new ScalingTreeEvaluatorInjector());
  • trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/StandardGPTimeSeriesPrognosis.cs

    r2722 r2821  
    5454      SequentialProcessor seq = new SequentialProcessor();
    5555      DefaultFunctionLibraryInjector funLibInjector = new DefaultFunctionLibraryInjector();
    56       funLibInjector.GetVariable("Differentials").Value = new BoolData(true);
    5756      seq.AddSubOperator(funLibInjector);
    5857      seq.AddSubOperator(new ScalingTreeEvaluatorInjector());
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/FunctionLibraryInjectors/DefaultFunctionLibraryInjector.cs

    r2728 r2821  
    126126      return functionLibrary;
    127127    }
    128 
    129     private void ConditionalAddFunction(string condName, IFunction fun, List<IFunction> list) {
    130       if (GetVariableValue<BoolData>(condName, null, false).Data) list.Add(fun);
    131     }
    132 
    133     private void ConditionalAddOperator(string condName, FunctionLibrary functionLib, IFunction op) {
    134       if (GetVariableValue<BoolData>(condName, null, false).Data) functionLib.AddFunction(op);
    135     }
    136128  }
    137129}
Note: See TracChangeset for help on using the changeset viewer.