Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/14/17 15:31:22 (7 years ago)
Author:
rhanghof
Message:

#2817

  • Added some unit tests
  • Enhanced the documentation
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/PackingPosition.cs

    r15462 r15471  
    105105    /// <summary>
    106106    /// Compares two packing positions by their coordinates.
    107     /// The order of comparing is z -> x -> y.
     107    /// The order of comparing is y (height) -> z (depth) -> x (width).
    108108    /// </summary>
    109109    /// <param name="other"></param>
    110110    /// <returns></returns>
    111111    public int CompareTo(PackingPosition other) {
     112      int result = Y.CompareTo(other.Y);
     113      if (result == 0)
     114        result = Z.CompareTo(other.Z);
     115      if (result == 0)
     116        result = X.CompareTo(other.X);
     117      /*
    112118      int result = Z.CompareTo(other.Z);
    113119      if (result == 0)
     
    115121      if (result == 0)
    116122        result = Y.CompareTo(other.Y);
    117      
     123      */
    118124      return result;
    119125
Note: See TracChangeset for help on using the changeset viewer.