Changeset 9089 for branches/LearningClassifierSystems/HeuristicLab.Encodings.CombinedIntegerVectorEncoding/3.3/Creators
- Timestamp:
- 12/27/12 19:14:51 (12 years ago)
- Location:
- branches/LearningClassifierSystems
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/LearningClassifierSystems
-
Property
svn:ignore
set to
*.suo
-
Property
svn:ignore
set to
-
branches/LearningClassifierSystems/HeuristicLab.Encodings.CombinedIntegerVectorEncoding/3.3
-
Property
svn:ignore
set to
*.user
Plugin.cs
-
Property
svn:ignore
set to
-
branches/LearningClassifierSystems/HeuristicLab.Encodings.CombinedIntegerVectorEncoding/3.3/Creators/UniformRandomCombinedIntegerVectorCreator.cs
r8941 r9089 50 50 /// <returns>The newly created integer vector.</returns> 51 51 public static CombinedIntegerVector Apply(IRandom random, int length, IntMatrix bounds, int actionPartLength) { 52 var result = new CombinedIntegerVector(length, actionPartLength, GetElementsOfBounds(bounds));52 var result = new CombinedIntegerVector(length, actionPartLength, bounds); 53 53 result.Randomize(random, bounds); 54 54 return result; 55 }56 57 private static int[,] GetElementsOfBounds(IntMatrix bounds) {58 int[,] realBounds = new int[bounds.Rows, bounds.Columns];59 for (int i = 0; i < bounds.Rows; i++) {60 for (int j = 0; j < bounds.Columns; j++) {61 realBounds[i, j] = bounds[i, j];62 }63 }64 return realBounds;65 55 } 66 56
Note: See TracChangeset
for help on using the changeset viewer.