Function slice( array, i0, i1 )

Description:
Returns a sub-sequence of values from a given array.

The semantics are like python array slicing, though both limits have to be specified: the output array contains the sequence of elements in the input array from i0 (inclusive) to i1 (exclusive). If a negative value is given in either case, it is added to the length of the input array, so that -1 indicates the last element of the input array. The indices are capped at 0 and the input array length respectively, so a large positive value may be used to indicate the end of the array. If the end index is less than or equal to the start index, a zero-length array is returned.

Note: This documents the double-precision version of the routine. Corresponding routines exist for other data types (float, long, int, short, byte, String, Object).

Parameters:
array (array of floating point)
input array
i0 (integer)
index of first element, inclusive (may be negative to count back from the end)
i1 (integer)
index of the last element, exclusive (may be negative to count back from the end)
Return Value (array of floating point):
array giving the sequence of elements specified by i0 and i1
Examples:
Signature:
double[] slice(double[], int, int)