Changeset 3231 for trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Creators/RandomPermutationCreator.cs
- Timestamp:
- 03/29/10 17:53:12 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Creators/RandomPermutationCreator.cs
r3160 r3231 47 47 get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; } 48 48 } 49 public IValueParameter<PermutationType> PermutationTypeParameter { 50 get { return (IValueParameter<PermutationType>)Parameters["PermutationType"]; } 51 } 52 53 public PermutationTypes PermutationType { 54 get { return PermutationTypeParameter.Value.Value; } 55 set { PermutationTypeParameter.Value.Value = value; } 56 } 49 57 50 58 public RandomPermutationCreator() … … 53 61 Parameters.Add(new ValueLookupParameter<IntValue>("Length", "The length of the new random permutation.")); 54 62 Parameters.Add(new LookupParameter<Permutation>("Permutation", "The new random permutation.")); 63 Parameters.Add(new ValueParameter<PermutationType>("PermutationType", "The type of the permutation.", new PermutationType(PermutationTypes.RelativeUndirected))); 55 64 } 56 65 57 66 public override IOperation Apply() { 58 PermutationParameter.ActualValue = new Permutation( LengthParameter.ActualValue.Value, RandomParameter.ActualValue);67 PermutationParameter.ActualValue = new Permutation(PermutationType, LengthParameter.ActualValue.Value, RandomParameter.ActualValue); 59 68 return base.Apply(); 60 69 }
Note: See TracChangeset
for help on using the changeset viewer.