Changeset 3187 for trunk/sources/HeuristicLab.Encodings.RealVectorEncoding
- Timestamp:
- 03/22/10 22:58:43 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3
- Files:
-
- 9 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj
r3182 r3187 103 103 <Compile Include="Crossovers\UniformSomePositionsArithmeticCrossover.cs" /> 104 104 <Compile Include="HeuristicLabEncodingsRealVectorEncodingPlugin.cs" /> 105 <Compile Include="Interfaces\IAdditiveRealVectorMoveOperator.cs" /> 105 106 <Compile Include="Interfaces\IRealVectorBoundsChecker.cs" /> 107 <Compile Include="Interfaces\IRealVectorMoveGenerator.cs" /> 108 <Compile Include="Interfaces\IRealVectorMoveOperator.cs" /> 109 <Compile Include="Moves\Polynomial\StochasticPolynomialMultiMoveGenerator.cs" /> 110 <Compile Include="Moves\AdditiveMoveMaker.cs" /> 111 <Compile Include="Moves\AdditiveMove.cs" /> 112 <Compile Include="Moves\AdditiveMoveGenerator.cs" /> 106 113 <Compile Include="RealVector.cs" /> 107 114 <Compile Include="Manipulators\BreederGeneticAlgorithmManipulator.cs" /> -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/PolynomialAllPositionManipulator.cs
r3060 r3187 48 48 /// </summary> 49 49 /// <remarks> 50 /// The manipulated value is not restricted by the (possibly) specified lower and upper bounds. Use the <see cref="BoundsChecker"/> to correct the values after performing the mutation.50 /// If there are bounds specified the manipulated value is restricted by the given lower and upper bounds. 51 51 /// </remarks> 52 52 public ValueLookupParameter<DoubleValue> MaximumManipulationParameter { -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/PolynomialOnePositionManipulator.cs
r3060 r3187 47 47 /// </summary> 48 48 /// <remarks> 49 /// The manipulated value is not restricted by the (possibly) specified lower and upper bounds. Use the <see cref="BoundsChecker"/> to correct the values after performing the mutation.49 /// If there are bounds specified the manipulated value is restricted by the given lower and upper bounds. 50 50 /// </remarks> 51 51 public ValueLookupParameter<DoubleValue> MaximumManipulationParameter { … … 73 73 if (contiguity.Value < 0) throw new ArgumentException("PolynomialOnePositionManipulator: Contiguity value is smaller than 0", "contiguity"); 74 74 int index = random.Next(vector.Length); 75 vector[index] += Apply(random, contiguity.Value) * maxManipulation.Value; 76 } 77 78 public static double Apply(IRandom random, double contiguity) { 75 79 double u = random.NextDouble(), delta = 0; 76 80 77 81 if (u < 0.5) { 78 delta = Math.Pow(2 * u, 1.0 / (contiguity .Value+ 1)) - 1.0;82 delta = Math.Pow(2 * u, 1.0 / (contiguity + 1)) - 1.0; 79 83 } else if (u > 0.5) { 80 delta = 1.0 - Math.Pow(2.0 - 2.0 * u, 1.0 / contiguity .Value+ 1);81 } else if (u == 0.5)delta = 0;84 delta = 1.0 - Math.Pow(2.0 - 2.0 * u, 1.0 / contiguity + 1); 85 } else delta = 0; 82 86 83 vector[index] += delta * maxManipulation.Value;87 return delta; 84 88 } 85 89
Note: See TracChangeset
for help on using the changeset viewer.