code: protected void shiftRight(int start, int end)
    {
      float prevVal = positions[start];
      long prevCnt = bins[start];
  
      for (int i = start + 1; i <= end; ++i) {
        float tmpVal = positions[i];
        long tmpCnt = bins[i];
  
        positions[i] = prevVal;
        bins[i] = prevCnt;
  
        prevVal = tmpVal;
        prevCnt = tmpCnt;
      }
    }
docs: Shifts the given range the histogram bins one slot to the right
  
  @param start index of the first bin to shift
  @param end   index of the rightmost bin to shift into