- Timestamp:
- 02/17/10 19:22:45 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification.Networks/3.2/FunctionLibraryInjector.cs
r2627 r2821 66 66 67 67 protected override FunctionLibrary CreateFunctionLibrary() { 68 return Create( GetVariableValue<BoolData>(DIFFERENTIALS_ALLOWED, null, false).Data,minTimeOffset, maxTimeOffset);68 return Create(minTimeOffset, maxTimeOffset); 69 69 } 70 70 71 public static FunctionLibrary Create( bool includeDifferential,int minTimeOffset, int maxTimeOffset) {71 public static FunctionLibrary Create(int minTimeOffset, int maxTimeOffset) { 72 72 FunctionLibrary functionLibrary = new FunctionLibrary(); 73 73 … … 83 83 List<IFunction> f0Functions = 84 84 new List<IFunction>() { 85 variable, constant, addition, subtraction,85 differential, variable, constant, addition, subtraction, 86 86 division, multiplication}; 87 87 88 if (includeDifferential) 89 f0Functions.Add(differential); 88 90 89 #endregion 91 90 … … 144 143 SetAllowedSubOperators(openSub, f1Functions); 145 144 146 if (includeDifferential)147 functionLibrary.AddFunction(differential);148 145 f0Functions.ForEach(x => functionLibrary.AddFunction(x)); 149 146 f1Functions.ForEach(x => functionLibrary.AddFunction(x)); -
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/OffspringSelectionGPTimeSeriesPrognosis.cs
r2722 r2821 54 54 SequentialProcessor seq = new SequentialProcessor(); 55 55 DefaultFunctionLibraryInjector funLibInjector = new DefaultFunctionLibraryInjector(); 56 funLibInjector.GetVariable("Differentials").Value = new BoolData(true);57 56 seq.AddSubOperator(funLibInjector); 58 57 seq.AddSubOperator(new ScalingTreeEvaluatorInjector()); -
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/3.3/StandardGPTimeSeriesPrognosis.cs
r2722 r2821 54 54 SequentialProcessor seq = new SequentialProcessor(); 55 55 DefaultFunctionLibraryInjector funLibInjector = new DefaultFunctionLibraryInjector(); 56 funLibInjector.GetVariable("Differentials").Value = new BoolData(true);57 56 seq.AddSubOperator(funLibInjector); 58 57 seq.AddSubOperator(new ScalingTreeEvaluatorInjector()); -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/FunctionLibraryInjectors/DefaultFunctionLibraryInjector.cs
r2728 r2821 126 126 return functionLibrary; 127 127 } 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 }136 128 } 137 129 }
Note: See TracChangeset
for help on using the changeset viewer.