Changeset 2440 for trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/OffspringSelectionGPRegression.cs
- Timestamp:
- 10/20/09 11:20:13 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/OffspringSelectionGPRegression.cs
r2419 r2440 39 39 public override string Name { get { return "OffspringSelectionGP - StructureIdentification"; } } 40 40 41 public virtual intTargetVariable {42 get { return ProblemInjector.GetVariableValue< IntData>("TargetVariable", null, false).Data; }43 set { ProblemInjector.GetVariableValue< IntData>("TargetVariable", null, false).Data = value; }41 public virtual string TargetVariable { 42 get { return ProblemInjector.GetVariableValue<StringData>("TargetVariable", null, false).Data; } 43 set { ProblemInjector.GetVariableValue<StringData>("TargetVariable", null, false).Data = value; } 44 44 } 45 45 … … 57 57 } 58 58 } 59 public IEnumerable< int> AllowedVariables {59 public IEnumerable<string> AllowedVariables { 60 60 get { 61 ItemList< IntData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<IntData>>("AllowedFeatures", null, false);61 ItemList<StringData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<StringData>>("AllowedFeatures", null, false); 62 62 return allowedVariables.Select(x => x.Data); 63 63 } 64 64 set { 65 ItemList< IntData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<IntData>>("AllowedFeatures", null, false);66 foreach ( int x in value) allowedVariables.Add(new IntData(x));65 ItemList<StringData> allowedVariables = ProblemInjector.GetVariableValue<ItemList<StringData>>("AllowedFeatures", null, false); 66 foreach (string x in value) allowedVariables.Add(new StringData(x)); 67 67 } 68 68 }
Note: See TracChangeset
for help on using the changeset viewer.