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 ; } }
Shifts the given range the histogram bins one slot to the right