Changeset 8086 for branches/ScatterSearch (trunk integration)/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Creators/UniformRandomIntegerVectorCreator.cs
- Timestamp:
- 06/22/12 11:11:38 (13 years ago)
- Location:
- branches/ScatterSearch (trunk integration)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ScatterSearch (trunk integration)
- Property svn:ignore
-
old new 20 20 bin 21 21 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Encodings.IntegerVectorEncoding
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding merged eligible /branches/Benchmarking/sources/HeuristicLab.Encodings.IntegerVectorEncoding 6917-7005 /branches/CloningRefactoring/HeuristicLab.Encodings.IntegerVectorEncoding 4656-4721 /branches/DataAnalysis Refactoring/HeuristicLab.Encodings.IntegerVectorEncoding 5471-5808 /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Encodings.IntegerVectorEncoding 5815-6180 /branches/DataAnalysis/HeuristicLab.Encodings.IntegerVectorEncoding 4458-4459,4462,4464 /branches/GP.Grammar.Editor/HeuristicLab.Encodings.IntegerVectorEncoding 6284-6795 /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Encodings.IntegerVectorEncoding 5060 /branches/IntegerVectorEncoding/HeuristicLab.Encodings.IntegerVectorEncoding 7681-8018 /branches/NET40/sources/HeuristicLab.Encodings.IntegerVectorEncoding 5138-5162 /branches/ParallelEngine/HeuristicLab.Encodings.IntegerVectorEncoding 5175-5192 /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Encodings.IntegerVectorEncoding 7568-7810 /branches/QAPAlgorithms/HeuristicLab.Encodings.IntegerVectorEncoding 6350-6627 /branches/Restructure trunk solution/HeuristicLab.Encodings.IntegerVectorEncoding 6828 /branches/SuccessProgressAnalysis/HeuristicLab.Encodings.IntegerVectorEncoding 5370-5682 /branches/Trunk/HeuristicLab.Encodings.IntegerVectorEncoding 6829-6865 /branches/VNS/HeuristicLab.Encodings.IntegerVectorEncoding 5594-5752 /branches/histogram/HeuristicLab.Encodings.IntegerVectorEncoding 5959-6341
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Creators/UniformRandomIntegerVectorCreator.cs
r7259 r8086 49 49 /// <param name="max">The maximum value of the sampling range for each vector element (exclusive).</param> 50 50 /// <returns>The newly created integer vector.</returns> 51 public static IntegerVector Apply(IRandom random, int length, int min, int max) { 52 int[] result = new int[length]; 53 for (int i = 0; i < length; i++) 54 result[i] = random.Next(min, max); 55 return new IntegerVector(result); 51 public static IntegerVector Apply(IRandom random, int length, IntMatrix bounds) { 52 var result = new IntegerVector(length); 53 result.Randomize(random, bounds); 54 return result; 56 55 } 57 56 … … 61 60 /// <param name="random">The pseudo random number generator to use.</param> 62 61 /// <param name="length">The length of the int vector.</param> 63 /// <param name="minimum">The minimum value of the sampling range for each vector element (inclusive).</param> 64 /// <param name="maximum">The maximum value of the sampling range for each vector element (exclusive).</param> 62 /// <param name="bounds">Contains in each row for each dimension minimum (inclusive), maximum (inclusive), and step size.</param> 65 63 /// <returns>The newly created int vector.</returns> 66 protected override IntegerVector Create(IRandom random, IntValue length, Int Value minimum, IntValue maximum) {67 return Apply(random, length.Value, minimum.Value, maximum.Value);64 protected override IntegerVector Create(IRandom random, IntValue length, IntMatrix bounds) { 65 return Apply(random, length.Value, bounds); 68 66 } 69 67 }
Note: See TracChangeset
for help on using the changeset viewer.