Package org.esa.snap.core.util.math
Interface Array
- All Known Implementing Classes:
Array.Double,Array.Float
public interface Array
Interface for wrapping primitive arrays.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classClass for wrappingdoubleprimitive arrays.static classClass for wrappingfloatprimitive arrays. -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyTo(int srcPos, double[] dest, int destPos, int length) Copies an array from the primitive array wrapped, beginning at the specified position, to the specified position of the destination array.intReturns the length of the primitive array wrapped.doublegetValue(int i) Returns the ith value of the array wrapped.
-
Method Details
-
getLength
int getLength()Returns the length of the primitive array wrapped.- Returns:
- the lenght of the primitive array wrapped.
-
getValue
double getValue(int i) Returns the ith value of the array wrapped.- Parameters:
i- the array index.- Returns:
- the ith value of the array wrapped.
-
copyTo
void copyTo(int srcPos, double[] dest, int destPos, int length) Copies an array from the primitive array wrapped, beginning at the specified position, to the specified position of the destination array.- Parameters:
srcPos- starting position in the primitive array wrapped.dest- the destination array.destPos- starting position in the destination array.length- the number of array elements to be copied.
-