Changeset 2174 for trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/FunctionLibraryInjector.cs
- Timestamp:
- 07/20/09 20:14:47 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/FunctionLibraryInjector.cs
r2165 r2174 32 32 namespace HeuristicLab.GP.StructureIdentification { 33 33 public class FunctionLibraryInjector : OperatorBase { 34 private const string NUMBEROFINPUTVARIABLES = "NumberOfInputVariables";35 34 private const string FUNCTIONLIBRARY = "FunctionLibrary"; 36 35 private const string TARGETVARIABLE = "TargetVariable"; … … 70 69 public FunctionLibraryInjector() 71 70 : base() { 72 AddVariableInfo(new VariableInfo(NUMBEROFINPUTVARIABLES, "The number of available input variables", typeof(IntData), VariableKind.In));73 71 AddVariableInfo(new VariableInfo(TARGETVARIABLE, "The target variable", typeof(IntData), VariableKind.In)); 74 72 AddVariableInfo(new VariableInfo(MINTIMEOFFSET, "Minimal time offset for all features", typeof(IntData), VariableKind.In)); … … 111 109 StructId.Variable variable; 112 110 GPOperatorLibrary operatorLibrary; 113 int nInputVariables = GetVariableValue<IntData>(NUMBEROFINPUTVARIABLES, scope, true).Data;114 111 int targetVariable = GetVariableValue<IntData>(TARGETVARIABLE, scope, true).Data; 115 112 … … 225 222 ConditionalAddOperator(XOR_ALLOWED, operatorLibrary, xor); 226 223 227 variable.SetConstraints( 1, nInputVariables,minTimeOffset, maxTimeOffset);228 differential.SetConstraints( 1, nInputVariables,minTimeOffset, maxTimeOffset);224 variable.SetConstraints(minTimeOffset, maxTimeOffset); 225 differential.SetConstraints(minTimeOffset, maxTimeOffset); 229 226 230 227 scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(FUNCTIONLIBRARY), operatorLibrary));
Note: See TracChangeset
for help on using the changeset viewer.