Changeset 9598 for branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/BinPacking2D.cs
- Timestamp:
- 06/07/13 15:35:12 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/BinPacking2D.cs
r9596 r9598 62 62 if (sourcePointX.X < BinMeasures.Width && sourcePointX.Y < BinMeasures.Height) { 63 63 //Traversing down the y-axis 64 while (sourcePointX.Y > 0 && !IsPointOccupied(new TwoDimensionalPacking(0, sourcePointX.X, sourcePointX.Y - 1))) {64 while (sourcePointX.Y > 0 && (-1).Equals(IsPointOccupied(new TwoDimensionalPacking(0, sourcePointX.X, sourcePointX.Y - 1)))) { 65 65 sourcePointX.Y--; 66 66 } … … 75 75 if (sourcePointY.X < BinMeasures.Width && sourcePointY.Y < BinMeasures.Height) { 76 76 //Traversing down the x-axis 77 while (sourcePointY.X > 0 && !IsPointOccupied(new TwoDimensionalPacking (0,sourcePointY.X - 1, sourcePointY.Y))) {77 while (sourcePointY.X > 0 && (-1).Equals(IsPointOccupied(new TwoDimensionalPacking (0,sourcePointY.X - 1, sourcePointY.Y)))) { 78 78 sourcePointY.X--; 79 79 } … … 166 166 } 167 167 168 169 168 public override int ShortestPossibleSideFromPoint(TwoDimensionalPacking position) { 170 169 int shortestSide = int.MaxValue;
Note: See TracChangeset
for help on using the changeset viewer.