Changeset 9204 for branches/LearningClassifierSystems/HeuristicLab.Encodings.CombinedIntegerVectorEncoding/3.3/Manipulator/UniformOnePositionInConditionManipulator.cs
- Timestamp:
- 02/04/13 16:16:38 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/LearningClassifierSystems/HeuristicLab.Encodings.CombinedIntegerVectorEncoding/3.3/Manipulator/UniformOnePositionInConditionManipulator.cs
r9090 r9204 41 41 } 42 42 43 protected override CombinedIntegerVector Manipulate(IRandom random, CombinedIntegerVector parent, CombinedIntegerVector child) {44 return Manipulate( parent, child, random.Next(((CombinedIntegerVector)child.Condition).Length));43 protected override CombinedIntegerVector Manipulate(IRandom random, CombinedIntegerVector input, CombinedIntegerVector child) { 44 return Manipulate(input, child, random.Next(((CombinedIntegerVector)child.Condition).Length)); 45 45 } 46 46 47 public static CombinedIntegerVector Manipulate(CombinedIntegerVector parent, CombinedIntegerVector child, int index) {47 public static CombinedIntegerVector Manipulate(CombinedIntegerVector input, CombinedIntegerVector child, int index) { 48 48 int max = child.Bounds[index % child.Bounds.Rows, 1] - 1; 49 49 if (child[index].Equals(max)) { 50 child[index] = parent[index];50 child[index] = input[index]; 51 51 } else { 52 52 child[index] = max;
Note: See TracChangeset
for help on using the changeset viewer.