Changeset 3677
- Timestamp:
- 05/06/10 16:53:52 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/MichalewiczNonUniformAllPositionsManipulator.cs
r3376 r3677 42 42 /// </summary> 43 43 public LookupParameter<IntValue> GenerationParameter { 44 get { return (LookupParameter<IntValue>)Parameters["Generation "]; }44 get { return (LookupParameter<IntValue>)Parameters["Generations"]; } 45 45 } 46 46 /// <summary> … … 64 64 public MichalewiczNonUniformAllPositionsManipulator() 65 65 : base() { 66 Parameters.Add(new LookupParameter<IntValue>("Generation ", "Current generation of the algorithm"));66 Parameters.Add(new LookupParameter<IntValue>("Generations", "Current generation of the algorithm")); 67 67 Parameters.Add(new LookupParameter<IntValue>("MaximumGenerations", "Maximum number of generations")); 68 Parameters.Add(new ValueLookupParameter<DoubleValue>("GenerationDependency", "Specifies the degree of dependency on the number of generations ", new DoubleValue(5)));68 Parameters.Add(new ValueLookupParameter<DoubleValue>("GenerationDependency", "Specifies the degree of dependency on the number of generations. A value of 0 means no dependency and the higher the value the stronger the progress towards maximum generations will be taken into account by sampling closer around the current position. Value must be >= 0.", new DoubleValue(5))); 69 69 } 70 70 … … 79 79 /// <param name="currentGeneration">The current generation of the algorithm.</param> 80 80 /// <param name="maximumGenerations">Maximum number of generations.</param> 81 /// <param name="generationsDependency">Specifies the degree of dependency on the number of generations. </param>81 /// <param name="generationsDependency">Specifies the degree of dependency on the number of generations. A value of 0 means no dependency and the higher the value the stronger the progress towards maximum generations will be taken into account by sampling closer around the current position. Value must be >= 0.</param> 82 82 /// <returns>The manipulated real vector.</returns> 83 83 public static void Apply(IRandom random, RealVector vector, DoubleMatrix bounds, IntValue currentGeneration, IntValue maximumGenerations, DoubleValue generationsDependency) { 84 84 if (currentGeneration.Value > maximumGenerations.Value) throw new ArgumentException("MichalewiczNonUniformAllPositionManipulator: CurrentGeneration must be smaller or equal than MaximumGeneration", "currentGeneration"); 85 if (generationsDependency.Value < 0) throw new ArgumentException("MichalewiczNonUniformOnePositionManipulator: GenerationsDependency must be >= 0."); 85 86 int length = vector.Length; 86 87 -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/MichalewiczNonUniformOnePositionManipulator.cs
r3376 r3677 42 42 /// </summary> 43 43 public LookupParameter<IntValue> GenerationParameter { 44 get { return (LookupParameter<IntValue>)Parameters["Generation "]; }44 get { return (LookupParameter<IntValue>)Parameters["Generations"]; } 45 45 } 46 46 /// <summary> … … 64 64 public MichalewiczNonUniformOnePositionManipulator() 65 65 : base() { 66 Parameters.Add(new LookupParameter<IntValue>("Generation ", "Current generation of the algorithm"));66 Parameters.Add(new LookupParameter<IntValue>("Generations", "Current generation of the algorithm")); 67 67 Parameters.Add(new LookupParameter<IntValue>("MaximumGenerations", "Maximum number of generations")); 68 Parameters.Add(new ValueLookupParameter<DoubleValue>("GenerationDependency", "Specifies the degree of dependency on the number of generations ", new DoubleValue(5)));68 Parameters.Add(new ValueLookupParameter<DoubleValue>("GenerationDependency", "Specifies the degree of dependency on the number of generations. A value of 0 means no dependency and the higher the value the stronger the progress towards maximum generations will be taken into account by sampling closer around the current position. Value must be >= 0.", new DoubleValue(5))); 69 69 } 70 70 … … 79 79 /// <param name="currentGeneration">The current generation of the algorithm.</param> 80 80 /// <param name="maximumGenerations">Maximum number of generations.</param> 81 /// <param name="generationsDependency">Specifies the degree of dependency on the number of generations. </param>81 /// <param name="generationsDependency">Specifies the degree of dependency on the number of generations. A value of 0 means no dependency and the higher the value the stronger the progress towards maximum generations will be taken into account by sampling closer around the current position. Value must be >= 0.</param> 82 82 /// <returns>The manipulated real vector.</returns> 83 83 public static void Apply(IRandom random, RealVector vector, DoubleMatrix bounds, IntValue currentGeneration, IntValue maximumGenerations, DoubleValue generationsDependency) { 84 84 if (currentGeneration.Value > maximumGenerations.Value) throw new ArgumentException("MichalewiczNonUniformOnePositionManipulator: CurrentGeneration must be smaller or equal than MaximumGeneration", "currentGeneration"); 85 if (generationsDependency.Value < 0) throw new ArgumentException("MichalewiczNonUniformOnePositionManipulator: GenerationsDependency must be >= 0."); 85 86 int length = vector.Length; 86 87 int index = random.Next(length);
Note: See TracChangeset
for help on using the changeset viewer.