- Timestamp:
- 03/05/09 20:05:32 (16 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
r1262 r1265 35 35 public class OffspringSelectionGP : HeuristicLab.GP.StructureIdentification.OffspringSelectionGP { 36 36 public virtual bool Autoregressive { 37 get { return GetVariableInjector().GetVariable("Autoregressive").GetValue<BoolData>().Data; }38 set { GetVariableInjector().GetVariable("Autoregressive").GetValue<BoolData>().Data = value; }37 get { return ProblemInjector.GetVariable("Autoregressive").GetValue<BoolData>().Data; } 38 set { ProblemInjector.GetVariable("Autoregressive").GetValue<BoolData>().Data = value; } 39 39 } 40 40 … … 45 45 protected override IOperator CreateProblemInjector() { 46 46 return new ProblemInjector(); 47 }48 49 protected override IOperator CreateGlobalInjector() {50 VariableInjector injector = (VariableInjector)base.CreateGlobalInjector();51 injector.AddVariable(new HeuristicLab.Core.Variable("Autoregressive", new BoolData()));52 return injector;53 47 } 54 48 … … 66 60 return new OffspringSelectionGpEditor(this); 67 61 } 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 }74 62 } 75 63 } -
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification.TimeSeries/ProblemInjector.cs
r1252 r1265 40 40 public ProblemInjector() 41 41 : base() { 42 AddVariableInfo(new Core.VariableInfo("Autoregressive", "Autoregressive modelling includes previous values of the target variable to predict future values.", typeof(BoolData), Core.VariableKind.New)); 43 GetVariableInfo("Autoregressive").Local = true; 44 AddVariable(new Core.Variable("Autoregressive", new BoolData())); 45 42 46 AddVariableInfo(new Core.VariableInfo("MaxTimeOffset", "MaxTimeOffset", typeof(IntData), Core.VariableKind.New)); 43 47 GetVariableInfo("MaxTimeOffset").Local = true; -
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification.TimeSeries/StandardGP.cs
r1262 r1265 35 35 public class StandardGP : HeuristicLab.GP.StructureIdentification.StandardGP { 36 36 public bool Autoregressive { 37 get { return GetVariableInjector().GetVariable("Autoregressive").GetValue<BoolData>().Data; }38 set { GetVariableInjector().GetVariable("Autoregressive").GetValue<BoolData>().Data = value; }37 get { return ProblemInjector.GetVariable("Autoregressive").GetValue<BoolData>().Data; } 38 set { ProblemInjector.GetVariable("Autoregressive").GetValue<BoolData>().Data = value; } 39 39 } 40 40 … … 45 45 protected override IOperator CreateProblemInjector() { 46 46 return new ProblemInjector(); 47 }48 49 protected override IOperator CreateGlobalInjector() {50 VariableInjector injector = (VariableInjector)base.CreateGlobalInjector();51 injector.AddVariable(new HeuristicLab.Core.Variable("Autoregressive", new BoolData()));52 return injector;53 47 } 54 48 … … 137 131 } 138 132 } 139 public override object Clone(IDictionary<Guid, object> clonedObjects) {140 OffspringSelectionGP clone = (OffspringSelectionGP)base.Clone(clonedObjects);141 clone.Autoregressive = Autoregressive;142 return clone;143 }144 133 } 145 134 }
Note: See TracChangeset
for help on using the changeset viewer.