Changeset 9242 for branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/VariableVectorCreator.cs
- Timestamp:
- 02/25/13 12:37:18 (11 years ago)
- Location:
- branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3
- Property svn:ignore
-
old new 1 1 obj 2 Plugin.cs
-
- Property svn:ignore
-
branches/LearningClassifierSystems/HeuristicLab.Encodings.VariableVector/3.3/VariableVectorCreator.cs
r9194 r9242 22 22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Data;25 24 using HeuristicLab.Operators; 26 25 using HeuristicLab.Optimization; … … 34 33 35 34 #region Parameter Properties 36 public IValueLookupParameter<PercentValue> SpreadPercentageParameter { 37 get { return (IValueLookupParameter<PercentValue>)Parameters["SpreadPercentage"]; } 38 } 39 public IValueLookupParameter<VariableVector> SampleVariableVectorParameter { 40 get { return (IValueLookupParameter<VariableVector>)Parameters["SampleVariableVector"]; } 35 public IValueLookupParameter<IVariableVectorClassificationProblemData> ProblemDataParameter { 36 get { return (IValueLookupParameter<IVariableVectorClassificationProblemData>)Parameters["ProblemData"]; } 41 37 } 42 38 public ILookupParameter<VariableVector> VariableVectorParameter { … … 48 44 #endregion 49 45 46 protected IVariableVectorClassificationProblemData ProblemData { 47 get { return ProblemDataParameter.ActualValue; } 48 } 49 50 50 [StorableConstructor] 51 51 protected VariableVectorCreator(bool deserializing) : base(deserializing) { } … … 55 55 public VariableVectorCreator() 56 56 : base() { 57 Parameters.Add(new ValueLookupParameter<PercentValue>("SpreadPercentage", "")); 58 Parameters.Add(new ValueLookupParameter<VariableVector>("SampleVariableVector", "")); 57 Parameters.Add(new ValueLookupParameter<IVariableVectorClassificationProblemData>("ProblemData", "")); 59 58 Parameters.Add(new LookupParameter<VariableVector>("VariableVector", "")); 60 59 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators.")); … … 62 61 63 62 public override IOperation Apply() { 64 VariableVectorParameter.ActualValue = Create(RandomParameter.ActualValue, SampleVariableVectorParameter.ActualValue, SpreadPercentageParameter.ActualValue.Value);63 VariableVectorParameter.ActualValue = Create(RandomParameter.ActualValue, ProblemData.SampleVariableVectorParameter.Value, ProblemData.SpreadPercentageParameter.Value.Value); 65 64 return base.Apply(); 66 65 }
Note: See TracChangeset
for help on using the changeset viewer.