Changeset 1262 for branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification.TimeSeries
- Timestamp:
- 03/05/09 18:32:59 (15 years ago)
- Location:
- branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification.TimeSeries
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification.TimeSeries/OffspringSelectionGP.cs
r1254 r1262 34 34 namespace HeuristicLab.GP.StructureIdentification.TimeSeries { 35 35 public class OffspringSelectionGP : HeuristicLab.GP.StructureIdentification.OffspringSelectionGP { 36 private BoolData autoregressive = new BoolData(); 37 public bool Autoregressive { 38 get { return autoregressive.Data; } 39 set { autoregressive.Data = value; } 36 public virtual bool Autoregressive { 37 get { return GetVariableInjector().GetVariable("Autoregressive").GetValue<BoolData>().Data; } 38 set { GetVariableInjector().GetVariable("Autoregressive").GetValue<BoolData>().Data = value; } 40 39 } 41 40 42 41 protected override IOperator CreateFunctionLibraryInjector() { 43 42 return new FunctionLibraryInjector(); … … 50 49 protected override IOperator CreateGlobalInjector() { 51 50 VariableInjector injector = (VariableInjector)base.CreateGlobalInjector(); 52 injector.AddVariable(new HeuristicLab.Core.Variable("Autoregressive", autoregressive));51 injector.AddVariable(new HeuristicLab.Core.Variable("Autoregressive", new BoolData())); 53 52 return injector; 54 53 } … … 67 66 return new OffspringSelectionGpEditor(this); 68 67 } 68 69 public override object Clone(IDictionary<Guid, object> clonedObjects) { 70 OffspringSelectionGP clone = (OffspringSelectionGP)base.Clone(clonedObjects); 71 clone.Autoregressive = Autoregressive; 72 return clone; 73 } 69 74 } 70 75 } -
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification.TimeSeries/OffspringSelectionGpEditor.cs
r1253 r1262 19 19 20 20 protected override void SetDataBinding() { 21 base.SetDataBinding(); 21 base.SetDataBinding(); 22 22 autoregressionCheckbox.DataBindings.Add("Checked", OffspringSelectionGP, "Autoregressive"); 23 23 } -
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification.TimeSeries/StandardGP.cs
r1254 r1262 34 34 namespace HeuristicLab.GP.StructureIdentification.TimeSeries { 35 35 public class StandardGP : HeuristicLab.GP.StructureIdentification.StandardGP { 36 private BoolData autoregressive = new BoolData();37 36 public bool Autoregressive { 38 get { return autoregressive.Data; }39 set { autoregressive.Data = value; }37 get { return GetVariableInjector().GetVariable("Autoregressive").GetValue<BoolData>().Data; } 38 set { GetVariableInjector().GetVariable("Autoregressive").GetValue<BoolData>().Data = value; } 40 39 } 41 40 … … 50 49 protected override IOperator CreateGlobalInjector() { 51 50 VariableInjector injector = (VariableInjector)base.CreateGlobalInjector(); 52 injector.AddVariable(new HeuristicLab.Core.Variable("Autoregressive", autoregressive));51 injector.AddVariable(new HeuristicLab.Core.Variable("Autoregressive", new BoolData())); 53 52 return injector; 54 53 } … … 138 137 } 139 138 } 139 public override object Clone(IDictionary<Guid, object> clonedObjects) { 140 OffspringSelectionGP clone = (OffspringSelectionGP)base.Clone(clonedObjects); 141 clone.Autoregressive = Autoregressive; 142 return clone; 143 } 140 144 } 141 145 }
Note: See TracChangeset
for help on using the changeset viewer.