- Timestamp:
- 04/16/13 13:13:41 (12 years ago)
- Location:
- branches/OaaS
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS
- Property svn:ignore
-
old new 21 21 protoc.exe 22 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll 23 24 packages
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/OaaS/HeuristicLab.Encodings.IntegerVectorEncoding
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding (added) merged: 8246,8600,8790,8806
- Property svn:mergeinfo changed
-
branches/OaaS/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/RoundedAverageCrossover.cs
r8019 r9363 67 67 int min = bounds[i % bounds.Rows, 0], max = bounds[i % bounds.Rows, 1], step = 1; 68 68 if (bounds.Columns > 2) step = bounds[i % bounds.Rows, 2]; 69 max = FloorFeasible(min, max, step, max - 1); 69 70 result[i] = RoundFeasible(min, max, step, avg); 70 71 } -
branches/OaaS/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/RoundedBlendAlphaBetaCrossover.cs
r8019 r9363 105 105 if (beta.Value < 0) throw new ArgumentException("RoundedBlendAlphaBetaCrossover: Parameter beta must be greater or equal to 0.", "beta"); 106 106 if (bounds == null || bounds.Rows < 1 || bounds.Columns < 2) throw new ArgumentException("RoundedBlendAlphaBetaCrossover: Invalid bounds specified.", "bounds"); 107 107 108 108 int length = betterParent.Length; 109 109 double min, max, d; … … 114 114 maxBound = bounds[i % bounds.Rows, 1]; 115 115 if (bounds.Columns > 2) step = bounds[i % bounds.Rows, 2]; 116 maxBound = FloorFeasible(minBound, maxBound, step, maxBound - 1); 116 117 117 118 d = Math.Abs(betterParent[i] - worseParent[i]); -
branches/OaaS/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/RoundedBlendAlphaCrossover.cs
r8019 r9363 85 85 var result = new IntegerVector(length); 86 86 double max = 0, min = 0, d = 0, resMin = 0, resMax = 0; 87 int minBound s, maxBounds, step = 1;87 int minBound, maxBound, step = 1; 88 88 89 89 for (int i = 0; i < length; i++) { 90 minBound s= bounds[i % bounds.Rows, 0];91 maxBound s= bounds[i % bounds.Rows, 1];90 minBound = bounds[i % bounds.Rows, 0]; 91 maxBound = bounds[i % bounds.Rows, 1]; 92 92 if (bounds.Columns > 2) step = bounds[i % bounds.Rows, 2]; 93 maxBound = FloorFeasible(minBound, maxBound, step, maxBound - 1); 94 93 95 max = Math.Max(parent1[i], parent2[i]); 94 96 min = Math.Min(parent1[i], parent2[i]); 95 97 d = Math.Abs(max - min); 96 resMin = FloorFeasible(minBound s, maxBounds, step, min - d * alpha.Value);97 resMax = CeilingFeasible(minBound s, maxBounds, step, max + d * alpha.Value);98 resMin = FloorFeasible(minBound, maxBound, step, min - d * alpha.Value); 99 resMax = CeilingFeasible(minBound, maxBound, step, max + d * alpha.Value); 98 100 99 result[i] = RoundFeasible(minBound s, maxBounds, step, resMin + random.NextDouble() * Math.Abs(resMax - resMin));101 result[i] = RoundFeasible(minBound, maxBound, step, resMin + random.NextDouble() * Math.Abs(resMax - resMin)); 100 102 } 101 103 return result; -
branches/OaaS/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/RoundedHeuristicCrossover.cs
r8019 r9363 88 88 max = bounds[i % bounds.Rows, 1]; 89 89 if (bounds.Columns > 2) step = bounds[i % bounds.Rows, 2]; 90 max = FloorFeasible(min, max, step, max - 1); 90 91 result[i] = RoundFeasible(min, max, step, betterParent[i] + factor * (betterParent[i] - worseParent[i])); 91 92 } -
branches/OaaS/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/RoundedLocalCrossover.cs
r8019 r9363 64 64 max = bounds[i % bounds.Rows, 1]; 65 65 if (bounds.Columns > 2) step = bounds[i % bounds.Rows, 2]; 66 max = FloorFeasible(min, max, step, max - 1); 66 67 factor = random.NextDouble(); 67 68 result[i] = RoundFeasible(min, max, step, (factor * parent1[i]) + ((1 - factor) * parent2[i])); -
branches/OaaS/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/RoundedUniformArithmeticCrossover.cs
r8019 r9363 85 85 int min = bounds[i % bounds.Rows, 0], max = bounds[i % bounds.Rows, 1], step = 1; 86 86 if (bounds.Columns > 2) step = bounds[i % bounds.Rows, 2]; 87 max = FloorFeasible(min, max, step, max - 1); 87 88 double value = alpha.Value * parent1[i] + (1 - alpha.Value) * parent2[i]; 88 89 result[i] = RoundFeasible(min, max, step, value);
Note: See TracChangeset
for help on using the changeset viewer.