/** * Discards the <code>i</code> initial elements of the array. For example, * if the array contains the elements 1,2,3,4, invoking * <code>discardFrontElements(2)</code> will cause the first two elements * to be discarded, leaving 3,4 in the array. Throws illegalArgumentException * if i exceeds numElements. * * @param i the number of elements to discard from the front of the array * @throws MathIllegalArgumentException if i is greater than numElements. * @since 2.0 */ public synchronized void discardFrontElements(int i) throws MathIllegalArgumentException { discardExtremeElements(i,true); }
/** * Discards the <code>i</code> last elements of the array. For example, * if the array contains the elements 1,2,3,4, invoking * <code>discardMostRecentElements(2)</code> will cause the last two elements * to be discarded, leaving 1,2 in the array. Throws illegalArgumentException * if i exceeds numElements. * * @param i the number of elements to discard from the end of the array * @throws MathIllegalArgumentException if i is greater than numElements. * @since 2.0 */ public synchronized void discardMostRecentElements(int i) throws MathIllegalArgumentException { discardExtremeElements(i,false); }
/** * Discards the <code>i</code> initial elements of the array. For example, * if the array contains the elements 1,2,3,4, invoking * <code>discardFrontElements(2)</code> will cause the first two elements * to be discarded, leaving 3,4 in the array. Throws illegalArgumentException * if i exceeds numElements. * * @param i the number of elements to discard from the front of the array * @throws MathIllegalArgumentException if i is greater than numElements. * @since 2.0 */ public synchronized void discardFrontElements(int i) throws MathIllegalArgumentException { discardExtremeElements(i,true); }
/** * Discards the <code>i</code> last elements of the array. For example, * if the array contains the elements 1,2,3,4, invoking * <code>discardMostRecentElements(2)</code> will cause the last two elements * to be discarded, leaving 1,2 in the array. Throws illegalArgumentException * if i exceeds numElements. * * @param i the number of elements to discard from the end of the array * @throws MathIllegalArgumentException if i is greater than numElements. * @since 2.0 */ public synchronized void discardMostRecentElements(int i) throws MathIllegalArgumentException { discardExtremeElements(i,false); }
/** * Discards the <code>i</code> last elements of the array. For example, * if the array contains the elements 1,2,3,4, invoking * <code>discardMostRecentElements(2)</code> will cause the last two elements * to be discarded, leaving 1,2 in the array. Throws illegalArgumentException * if i exceeds numElements. * * @param i the number of elements to discard from the end of the array * @throws MathIllegalArgumentException if i is greater than numElements. * @since 2.0 */ public synchronized void discardMostRecentElements(int i) throws MathIllegalArgumentException { discardExtremeElements(i,false); }
/** * Discards the <code>i</code> initial elements of the array. For example, * if the array contains the elements 1,2,3,4, invoking * <code>discardFrontElements(2)</code> will cause the first two elements * to be discarded, leaving 3,4 in the array. Throws illegalArgumentException * if i exceeds numElements. * * @param i the number of elements to discard from the front of the array * @throws MathIllegalArgumentException if i is greater than numElements. * @since 2.0 */ public synchronized void discardFrontElements(int i) throws MathIllegalArgumentException { discardExtremeElements(i,true); }