@Override public int compareTo(Metrics o) {
      Metrics m = (Metrics)o;
      for ( int i = 0; i < this.height; ++i ) {
        if ( i >= m.getHeight() ) {
          return -1;
        }
        for ( int j = 0; j < this.width; ++j ) {
          if ( i >= m.getWidth() ) {
            return -1;
          }
          int c = this.valueAt(i,j) - m.valueAt(i, j);
          if ( c != 0 ) {
            return c;
          }
        }
      }
      return 0;
    }