Changeset 9473 for branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/MultiComponentVector/Moves/ThreeWay/Moves/SingleItemRotationMove.cs
- Timestamp:
- 05/09/13 15:03:41 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/MultiComponentVector/Moves/ThreeWay/Moves/SingleItemRotationMove.cs
r9440 r9473 48 48 49 49 public override MultiComponentVectorEncoding GetVectorAfterMove() { 50 var result = new MultiComponentVectorEncoding(); 51 result.PackingInformations = new ItemList<PackingInformation>(this.MultiComponentVector.PackingInformations); 52 result.PackingInformations[ItemIndex].Rotated = !result.PackingInformations[ItemIndex].Rotated; 50 return GetVectorAfterMove (MultiComponentVector, ItemIndex); 51 } 52 public static MultiComponentVectorEncoding GetVectorAfterMove(MultiComponentVectorEncoding multiComponentVector, int itemIndex) { 53 var result = multiComponentVector.Clone(new Cloner()) as MultiComponentVectorEncoding; 54 result.PackingInformations[itemIndex].Rotated = !result.PackingInformations[itemIndex].Rotated; 53 55 return result; 54 56 } … … 57 59 return typeof(SingleItemRotationMoveAttribute); 58 60 } 61 62 public override string ToString() { 63 return "RM(i=" + ItemIndex+")"; 64 } 59 65 } 60 66 }
Note: See TracChangeset
for help on using the changeset viewer.