public class ArrayUtil extends Object
| 构造器 | 说明 |
|---|---|
ArrayUtil() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static ucar.ma2.Array |
argSort(ucar.ma2.Array a,
Integer axis) |
Get sorted array index along an axis
|
static ucar.ma2.Array |
array(Object data) |
Create an array
|
static ucar.ma2.Array |
array(ArrayList data) |
Create an array
|
static ucar.ma2.Array |
array(List<Object> data) |
Create an array
|
static ucar.ma2.Array |
arrayRange(Number start,
Number stop,
Number step) |
Array range
|
static ucar.ma2.Array |
arrayRange_bak(Number start,
Number stop,
Number step) |
Array range
|
static ucar.ma2.Array |
arrayRange1(Number start,
int length,
Number step) |
Array range
|
static ucar.ma2.Array |
broadcast(ucar.ma2.Array a,
int[] shape) |
Broadcast array to a new shape
|
static ucar.ma2.Array |
broadcast(ucar.ma2.Array a,
List<Integer> shape) |
Broadcast array to a new shape
|
static ucar.ma2.Array |
concatenate(List<ucar.ma2.Array> arrays,
Integer axis) |
Concatenate arrays to one array along a axis
|
static ucar.ma2.Array |
concatenate(ucar.ma2.Array a,
ucar.ma2.Array b,
Integer axis) |
Concatenate two arrays to one array along a axis
|
static String |
convertToString(ucar.ma2.Array a) |
Array to string
|
static PolygonShape |
convexHull(ucar.ma2.Array x,
ucar.ma2.Array y) |
Computes the smallest convex
Polygon that contains all the
points |
protected static void |
copyTo1DJavaArray(ucar.ma2.IndexIterator iter,
Object javaArray) |
|
protected static void |
copyTo1DJavaArray_Long(ucar.ma2.IndexIterator iter,
Object javaArray) |
|
static Object |
copyToNDJavaArray(ucar.ma2.Array a) |
Convert array to N-Dimension double Java array
|
static Object |
copyToNDJavaArray(ucar.ma2.Array a,
String dtype) |
Convert array to N-Dimension double Java array
|
static Object |
copyToNDJavaArray_Double(ucar.ma2.Array a) |
Convert array to N-Dimension double Java array
|
static Object |
copyToNDJavaArray_Long(ucar.ma2.Array a) |
Convert array to N-Dimension double Java array
|
static ucar.ma2.Array |
cressman(List<Number> x_s,
List<Number> y_s,
ucar.ma2.Array v_s,
List<Number> X,
List<Number> Y,
List<Number> radList) |
Cressman analysis
|
static ucar.ma2.Array |
cressman_bak(List<Number> x_s,
List<Number> y_s,
ucar.ma2.Array v_s,
List<Number> X,
List<Number> Y,
List<Number> radList) |
Cressman analysis
|
static String |
dataTypeString(ucar.ma2.DataType dt) |
Get data type string
|
static ucar.ma2.Array |
delete(ucar.ma2.Array a,
int idx,
int axis) |
Return a new array with sub-arrays along an axis deleted
|
static ucar.ma2.Array |
delete(ucar.ma2.Array a,
List<Integer> idx,
int axis) |
Return a new array with sub-arrays along an axis deleted
|
static ucar.ma2.Array |
diag(ucar.ma2.Array a,
int k) |
Extract a diagonal or construct a diagonal array.
|
static ucar.ma2.Array[] |
extendHalfCell(ucar.ma2.Array x,
ucar.ma2.Array y) |
Extend the grid to half cell, so the grid points are the centers of the
cells
|
static ucar.ma2.Array |
eye(int n,
int m,
int k,
String dtype) |
Return a 2-D array with ones on the diagonal and zeros elsewhere.
|
static ucar.ma2.Array |
factory(ucar.ma2.DataType dt,
int[] shape) |
Array factory
|
static ucar.ma2.Array |
factory(ucar.ma2.DataType dt,
int[] shape,
Object storage) |
Array factory
|
static Object[] |
findIndices(List<List<Number>> points,
List<Number> xi) |
Find indices
|
static Object[] |
findIndices(List<ucar.ma2.Array> points,
ucar.ma2.Array xi) |
Find indices
|
static ucar.ma2.Array |
full(List<Integer> shape,
Object fillValue,
ucar.ma2.DataType dtype) |
Return a new array of given shape and type, filled with fill value.
|
static List<ucar.ma2.Array> |
getArraysFromStationData(StationData stdata) |
Get array list from StationData
|
static int |
getDimIndex(ucar.ma2.Array dim,
double v) |
Get value index in a dimension array
|
static List<ucar.ma2.Array> |
histogram(ucar.ma2.Array a,
double[] bins) |
Histogram x/y array
|
static List<ucar.ma2.Array> |
histogram(ucar.ma2.Array a,
int nbins) |
Histogram x/y array
|
static List<ucar.ma2.Array> |
histogram(ucar.ma2.Array a,
ucar.ma2.Array bins) |
Histogram x/y array
|
static ucar.ma2.Array |
identity(int n,
String dtype) |
Return the identity array - a square array with ones on the main
diagonal.
|
static ucar.ma2.Array |
interpn(List<ucar.ma2.Array> points,
ucar.ma2.Array values,
List<ucar.ma2.Array> xi) |
Multidimensional interpolation on regular grids.
|
static Object |
interpn(List<ucar.ma2.Array> points,
ucar.ma2.Array values,
ucar.ma2.Array xi) |
Multidimensional interpolation on regular grids.
|
static double |
interpn_s(List<List<Number>> points,
ucar.ma2.Array values,
List<Number> xi) |
Multidimensional interpolation on regular grids.
|
static double |
interpn_s(List<ucar.ma2.Array> points,
ucar.ma2.Array values,
ucar.ma2.Array xi) |
Multidimensional interpolation on regular grids.
|
ucar.ma2.Array |
interpolate(ucar.ma2.Array a,
List<Number> X,
List<Number> Y) |
Interpolate array data
|
static ucar.ma2.Array |
interpolation_IDW_Neighbor(List<Number> x_s,
List<Number> y_s,
ucar.ma2.Array a,
List<Number> X,
List<Number> Y,
int NumberOfNearestNeighbors) |
Interpolation with IDW neighbor method
|
static ucar.ma2.Array |
interpolation_IDW_Radius(List<Number> x_s,
List<Number> y_s,
ucar.ma2.Array a,
List<Number> X,
List<Number> Y,
int NeededPointNum,
double radius) |
Interpolation with IDW radius method
|
static ucar.ma2.Array |
interpolation_Inside(List<Number> x_s,
List<Number> y_s,
ucar.ma2.Array a,
List<Number> X,
List<Number> Y) |
Interpolate with inside method - The grid cell value is the average value
of the inside points or fill value if no inside point.
|
static ucar.ma2.Array |
interpolation_Inside(ucar.ma2.Array x_s,
ucar.ma2.Array y_s,
ucar.ma2.Array a,
ucar.ma2.Array X,
ucar.ma2.Array Y,
boolean center) |
Interpolate with inside method - The grid cell value is the average value
of the inside points or fill value if no inside point.
|
static Object |
interpolation_Inside_Count(List<Number> x_s,
List<Number> y_s,
List<Number> X,
List<Number> Y,
boolean pointDensity) |
Interpolate with inside method - The grid cell value is the count number
of the inside points or fill value if no inside point.
|
static ucar.ma2.Array |
interpolation_Inside_Max(List<Number> x_s,
List<Number> y_s,
ucar.ma2.Array a,
List<Number> X,
List<Number> Y) |
Interpolate with inside method - The grid cell value is the maximum value
of the inside points or fill value if no inside point.
|
static ucar.ma2.Array |
interpolation_Inside_Min(List<Number> x_s,
List<Number> y_s,
ucar.ma2.Array a,
List<Number> X,
List<Number> Y) |
Interpolate with inside method - The grid cell value is the minimum value
of the inside points or fill value if no inside point.
|
static ucar.ma2.Array |
interpolation_Nearest(List<Number> x_s,
List<Number> y_s,
ucar.ma2.Array a,
List<Number> X,
List<Number> Y,
double radius) |
Interpolate with nearest method
|
static ucar.ma2.Array |
interpolation_Nearest_1(List<Number> x_s,
List<Number> y_s,
ucar.ma2.Array a,
List<Number> X,
List<Number> Y,
double radius,
double fill_value) |
Interpolate with nearest method
|
static ucar.ma2.Array |
interpolation_Surface(ucar.ma2.Array x_s,
ucar.ma2.Array y_s,
ucar.ma2.Array a,
ucar.ma2.Array X,
ucar.ma2.Array Y) |
Interpolate with surface method
|
static ucar.ma2.Array |
interpolation_Surface_1(ucar.ma2.Array x_s,
ucar.ma2.Array y_s,
ucar.ma2.Array a,
ucar.ma2.Array X,
ucar.ma2.Array Y,
double unDefData) |
Interpolate with surface method
|
static ucar.ma2.Array |
interpolation_Surface_bak(ucar.ma2.Array x_s,
ucar.ma2.Array y_s,
ucar.ma2.Array a,
ucar.ma2.Array X,
ucar.ma2.Array Y) |
Interpolate with surface method
|
static ucar.ma2.Array |
lineSpace(Number start,
Number stop,
int n,
boolean endpoint) |
Array line space
|
static ucar.ma2.Array |
lineSpace_bak(Number start,
Number stop,
int n,
boolean endpoint) |
Array line space
|
static ucar.ma2.Array |
linint2(ucar.ma2.Array a,
ucar.ma2.Array X,
ucar.ma2.Array Y,
ucar.ma2.Array newX,
ucar.ma2.Array newY) |
Interpolates from a rectilinear grid to another rectilinear grid using
bilinear interpolation.
|
static ucar.ma2.DataType |
mergeDataType(ucar.ma2.DataType dt1,
ucar.ma2.DataType dt2) |
Merge data type to one data type
|
static ucar.ma2.Array[] |
meshgrid(ucar.ma2.Array... xs) |
Mesh grid
|
static ucar.ma2.Array[] |
meshgrid(ucar.ma2.Array x,
ucar.ma2.Array y) |
Mesh grid
|
static VectorLayer |
meshLayer(ucar.ma2.Array x_s,
ucar.ma2.Array y_s,
ucar.ma2.Array a,
LegendScheme ls) |
Create mesh polygon layer
|
static VectorLayer |
meshLayer(ucar.ma2.Array x_s,
ucar.ma2.Array y_s,
ucar.ma2.Array a,
LegendScheme ls,
double lonlim) |
Create mesh polygon layer
|
static int |
numASCIICol(String fileName,
String delimiter,
int headerLines) |
Get row number of a ASCII file
|
static int |
numASCIIRow(String fileName) |
Get row number of a ASCII file
|
static ucar.ma2.Array |
ones(int n) |
Get ones array
|
static ucar.ma2.Array |
ones(List<Integer> shape,
String dtype) |
Get ones array
|
static double |
rand() |
Get random value
|
static ucar.ma2.Array |
rand(int n) |
Get random array - one dimension
|
static ucar.ma2.Array |
rand(List<Integer> shape) |
Get random array
|
static ucar.ma2.Array |
readASCIIFile(String fileName,
String delimiter,
int headerLines,
String dataType,
List<Integer> shape,
boolean readFirstCol) |
Read ASCII data file to an array
|
static ucar.ma2.Array |
readBinFile(String fn,
List<Integer> dims,
String dataType,
int skip,
String byteOrder) |
Read array from a binary file
|
static ucar.ma2.Array |
repeat(Number v,
int n) |
Repeat a value n times
|
static ucar.ma2.Array |
repeat(ucar.ma2.Array a,
List<Integer> repeats) |
Repeat elements of an array.
|
static ucar.ma2.Array |
repeat(ucar.ma2.Array a,
List<Integer> repeats,
int axis) |
Repeat elements of an array.
|
static ucar.ma2.Array |
reproject(ucar.ma2.Array data,
List<Number> x,
List<Number> y,
List<Number> rx,
List<Number> ry,
ProjectionInfo fromProj,
ProjectionInfo toProj,
double fill_value,
ResampleMethods resampleMethod) |
Reproject
|
static Object[] |
reproject(ucar.ma2.Array data,
List<Number> xx,
List<Number> yy,
ProjectionInfo fromProj,
ProjectionInfo toProj) |
Project grid data
|
static Object[] |
reproject(ucar.ma2.Array data,
List<Number> xx,
List<Number> yy,
ProjectionInfo fromProj,
ProjectionInfo toProj,
ResampleMethods method) |
Project grid data
|
static ucar.ma2.Array |
reproject(ucar.ma2.Array data,
List<Number> x,
List<Number> y,
ucar.ma2.Array rx,
ucar.ma2.Array ry,
ProjectionInfo fromProj,
ProjectionInfo toProj,
double fill_value,
ResampleMethods resampleMethod) |
Reproject
|
static ucar.ma2.Array |
reproject(ucar.ma2.Array data,
List<Number> x,
List<Number> y,
ucar.ma2.Array rx,
ucar.ma2.Array ry,
ProjectionInfo fromProj,
ProjectionInfo toProj,
ResampleMethods resampleMethod) |
Reproject
|
static ucar.ma2.Array[] |
reproject(ucar.ma2.Array x,
ucar.ma2.Array y,
ProjectionInfo toProj) |
Reproject
|
static ucar.ma2.Array[] |
reproject(ucar.ma2.Array x,
ucar.ma2.Array y,
ProjectionInfo fromProj,
ProjectionInfo toProj) |
Reproject
|
static Object[] |
reproject_back(ucar.ma2.Array data,
List<Number> xx,
List<Number> yy,
ProjectionInfo fromProj,
ProjectionInfo toProj) |
Project grid data
|
static ucar.ma2.Array |
resample_Bilinear(ucar.ma2.Array a,
List<Number> X,
List<Number> Y,
List<Number> newX,
List<Number> newY) |
Resample grid array with bilinear method
|
static ucar.ma2.Array |
resample_Bilinear(ucar.ma2.Array a,
ucar.ma2.Array X,
ucar.ma2.Array Y,
ucar.ma2.Array newX,
ucar.ma2.Array newY) |
Resample grid array with bilinear method
|
static ucar.ma2.Array |
resample_Neighbor(ucar.ma2.Array a,
ucar.ma2.Array X,
ucar.ma2.Array Y,
ucar.ma2.Array newX,
ucar.ma2.Array newY) |
Resample grid array with neighbor method
|
static void |
saveASCIIFile(String fn,
ucar.ma2.Array a,
int colNum,
String format,
String delimiter) |
Save an array data to a ASCII file
|
static void |
saveBinFile(String fn,
ucar.ma2.Array a,
String byteOrder,
boolean append,
boolean sequential) |
Save an array data to a binary file
|
static int |
searchSorted(List<Number> a,
double v) |
Search sorted list index
|
static int |
searchSorted(ucar.ma2.Array a,
double v) |
Search sorted list index
|
static ucar.ma2.Array |
smooth5(ucar.ma2.Array a) |
Smooth with 5 points
|
static ucar.ma2.Array |
smooth5(ucar.ma2.Array a,
int rowNum,
int colNum,
double unDefData) |
Smooth with 5 points
|
static ucar.ma2.Array |
smooth9(ucar.ma2.Array a) |
Smooth with 9 points
|
static ucar.ma2.Array |
sort(ucar.ma2.Array a,
Integer axis) |
Sort array along an axis
|
static ucar.ma2.Array |
tile(Number v,
int n) |
Repeat a value n times
|
static ucar.ma2.Array |
tile(Number v,
List<Integer> repeats) |
Repeat a value n times
|
static ucar.ma2.Array |
tile(ucar.ma2.Array a,
List<Integer> repeats) |
Repeat elements of an array.
|
static ucar.ma2.Array |
toBoolean(ucar.ma2.Array a) |
Convert array to boolean type
|
static ucar.ma2.DataType |
toDataType(String dt) |
To data type - ucar.ma2
|
static ucar.ma2.Array |
toDouble(ucar.ma2.Array a) |
Convert array to double type
|
static ucar.ma2.Array |
toFloat(ucar.ma2.Array a) |
Convert array to float type
|
static ucar.ma2.Array |
toInteger(ucar.ma2.Array a) |
Convert array to integer type
|
static double |
toStation(ucar.ma2.Array data,
List<Number> xArray,
List<Number> yArray,
double x,
double y) |
Interpolate data to a station point
|
static double |
toStation(ucar.ma2.Array data,
List<Number> xArray,
List<Number> yArray,
double x,
double y,
double missingValue) |
Interpolate data to a station point
|
static double |
toStation(ucar.ma2.Array data,
ucar.ma2.Array xArray,
ucar.ma2.Array yArray,
double x,
double y) |
Interpolate data to a station point
|
static double |
toStation_Neighbor(ucar.ma2.Array data,
List<Number> xArray,
List<Number> yArray,
double x,
double y) |
Interpolate data to a station point
|
static double |
toStation_Neighbor(ucar.ma2.Array data,
List<Number> xArray,
List<Number> yArray,
double x,
double y,
double missingValue) |
Interpolate data to a station point
|
static double |
toStation_Neighbor(ucar.ma2.Array data,
ucar.ma2.Array xArray,
ucar.ma2.Array yArray,
double x,
double y) |
Interpolate data to a station point
|
static String |
toString_old(ucar.ma2.Array a) |
Array to string
|
static ucar.ma2.Array |
zeros(int n) |
Get zero array
|
static ucar.ma2.Array |
zeros(List<Integer> shape,
String dtype) |
Get zero array
|
static ucar.ma2.Array |
zeros(List<Integer> shape,
ucar.ma2.DataType dtype) |
Get zero array
|
public static ucar.ma2.Array readASCIIFile(String fileName, String delimiter, int headerLines, String dataType, List<Integer> shape, boolean readFirstCol) throws UnsupportedEncodingException, FileNotFoundException, IOException
fileName - File namedelimiter - DelimiterheaderLines - Headerline numberdataType - Data type stringshape - ShapereadFirstCol - Read first column data or notUnsupportedEncodingExceptionFileNotFoundExceptionIOExceptionpublic static int numASCIIRow(String fileName) throws FileNotFoundException
fileName - File nameFileNotFoundExceptionpublic static int numASCIICol(String fileName, String delimiter, int headerLines) throws FileNotFoundException, IOException
fileName - File namedelimiter - headerLines - FileNotFoundExceptionIOExceptionpublic static void saveBinFile(String fn, ucar.ma2.Array a, String byteOrder, boolean append, boolean sequential)
fn - File patha - ArraybyteOrder - Byte orderappend - If append to existing filesequential - If write as sequential binary file - Fortranpublic static void saveASCIIFile(String fn, ucar.ma2.Array a, int colNum, String format, String delimiter) throws IOException
fn - File patha - ArraycolNum - Column number of each lineformat - String formatdelimiter - DelimiterIOExceptionpublic static ucar.ma2.Array readBinFile(String fn, List<Integer> dims, String dataType, int skip, String byteOrder)
fn - Binary file namedims - DimensionsdataType - Data type stringskip - Skip bytesbyteOrder - Byte orderpublic static ucar.ma2.Array factory(ucar.ma2.DataType dt,
int[] shape)
dt - Data typeshape - Shapepublic static ucar.ma2.Array factory(ucar.ma2.DataType dt,
int[] shape,
Object storage)
dt - Data typeshape - Shapestorage - Array valuespublic static ucar.ma2.Array array(Object data)
data - Objectpublic static ucar.ma2.Array array(ArrayList data)
data - Array like datapublic static ucar.ma2.Array array(List<Object> data)
data - Array like datapublic static ucar.ma2.Array arrayRange_bak(Number start, Number stop, Number step)
start - Start valuestop - Stop valuestep - Step valuepublic static ucar.ma2.Array arrayRange(Number start, Number stop, Number step)
start - Start valuestop - Stop valuestep - Step valuepublic static ucar.ma2.Array arrayRange1(Number start, int length, Number step)
start - Start valuelength - Lengthstep - Step valuepublic static ucar.ma2.Array lineSpace(Number start, Number stop, int n, boolean endpoint)
start - Start valuestop - Stop valuen - Number valueendpoint - If stop is includedpublic static ucar.ma2.Array lineSpace_bak(Number start, Number stop, int n, boolean endpoint)
start - Start valuestop - Stop valuen - Number valueendpoint - If stop is includedpublic static ucar.ma2.Array zeros(int n)
n - Numberpublic static ucar.ma2.Array zeros(List<Integer> shape, String dtype)
shape - Shapedtype - Data typepublic static ucar.ma2.Array zeros(List<Integer> shape, ucar.ma2.DataType dtype)
shape - Shapedtype - Data typepublic static ucar.ma2.Array full(List<Integer> shape, Object fillValue, ucar.ma2.DataType dtype)
shape - ShapefillValue - Fill valuedtype - Data typepublic static ucar.ma2.Array ones(int n)
n - Numberpublic static ucar.ma2.Array ones(List<Integer> shape, String dtype)
shape - Shapedtype - Data typepublic static ucar.ma2.Array identity(int n,
String dtype)
n - Number of rows (and columns) in n x n output.dtype - Data typepublic static ucar.ma2.Array eye(int n,
int m,
int k,
String dtype)
n - Number of rows in the output.m - Number of columns in the output.k - Index of the diagonal: 0 (the default) refers to the main
diagonal, a positive value refers to an upper diagonal, and a negative
value to a lower diagonal.dtype - Data typepublic static ucar.ma2.Array diag(ucar.ma2.Array a,
int k)
a - If a is a 2-D array, return a copy of its k-th diagonal. If a is
a 1-D array, return a 2-D array with a on the k-th diagonal.k - Diagonal in question.public static ucar.ma2.Array repeat(Number v, int n)
v - The valuen - N timespublic static ucar.ma2.Array repeat(ucar.ma2.Array a,
List<Integer> repeats)
a - The valuerepeats - The number of repetitions for each elementpublic static ucar.ma2.Array repeat(ucar.ma2.Array a,
List<Integer> repeats,
int axis)
a - The valuerepeats - The number of repetitions for each elementaxis - The axispublic static ucar.ma2.Array tile(Number v, int n)
v - The valuen - N timespublic static ucar.ma2.Array tile(Number v, List<Integer> repeats)
v - The valuerepeats - The number of repetitions for each elementpublic static ucar.ma2.Array tile(ucar.ma2.Array a,
List<Integer> repeats)
a - The valuerepeats - The number of repetitions for each elementpublic static double rand()
public static ucar.ma2.Array rand(int n)
n - Array lengthpublic static ucar.ma2.Array rand(List<Integer> shape)
shape - Shapepublic static ucar.ma2.DataType mergeDataType(ucar.ma2.DataType dt1,
ucar.ma2.DataType dt2)
dt1 - Data type 1dt2 - Data type 2public static String convertToString(ucar.ma2.Array a)
a - Array apublic static String toString_old(ucar.ma2.Array a)
a - Array apublic static List<ucar.ma2.Array> getArraysFromStationData(StationData stdata)
stdata - StationDatapublic static String dataTypeString(ucar.ma2.DataType dt)
dt - The data typepublic static ucar.ma2.DataType toDataType(String dt)
dt - Data type stringpublic static ucar.ma2.Array toInteger(ucar.ma2.Array a)
a - Array apublic static ucar.ma2.Array toFloat(ucar.ma2.Array a)
a - Array apublic static ucar.ma2.Array toDouble(ucar.ma2.Array a)
a - Array apublic static ucar.ma2.Array toBoolean(ucar.ma2.Array a)
a - Array apublic static ucar.ma2.Array concatenate(List<ucar.ma2.Array> arrays, Integer axis) throws ucar.ma2.InvalidRangeException
arrays - Array listaxis - The axisucar.ma2.InvalidRangeExceptionpublic static ucar.ma2.Array concatenate(ucar.ma2.Array a,
ucar.ma2.Array b,
Integer axis)
throws ucar.ma2.InvalidRangeException
a - Array ab - Array baxis - The axisucar.ma2.InvalidRangeExceptionpublic static ucar.ma2.Array sort(ucar.ma2.Array a,
Integer axis)
throws ucar.ma2.InvalidRangeException
a - Array aaxis - The axisucar.ma2.InvalidRangeExceptionpublic static ucar.ma2.Array argSort(ucar.ma2.Array a,
Integer axis)
throws ucar.ma2.InvalidRangeException
a - Array aaxis - The axisucar.ma2.InvalidRangeExceptionpublic static Object copyToNDJavaArray(ucar.ma2.Array a, String dtype)
a - Array adtype - Data type stringpublic static Object copyToNDJavaArray(ucar.ma2.Array a)
a - Array apublic static Object copyToNDJavaArray_Long(ucar.ma2.Array a)
a - Array apublic static Object copyToNDJavaArray_Double(ucar.ma2.Array a)
a - Array aprotected static void copyTo1DJavaArray(ucar.ma2.IndexIterator iter,
Object javaArray)
protected static void copyTo1DJavaArray_Long(ucar.ma2.IndexIterator iter,
Object javaArray)
public static ucar.ma2.Array delete(ucar.ma2.Array a,
int idx,
int axis)
a - Input arrayidx - Indexaxis - The axispublic static ucar.ma2.Array delete(ucar.ma2.Array a,
List<Integer> idx,
int axis)
a - Input arrayidx - Indexaxis - The axispublic static List<ucar.ma2.Array> histogram(ucar.ma2.Array a, int nbins)
a - Data arraynbins - bin numberpublic static List<ucar.ma2.Array> histogram(ucar.ma2.Array a, ucar.ma2.Array bins)
a - Data arraybins - bin edgespublic static List<ucar.ma2.Array> histogram(ucar.ma2.Array a, double[] bins)
a - Data arraybins - bin edgespublic static ucar.ma2.Array broadcast(ucar.ma2.Array a,
int[] shape)
a - Array ashape - Shapepublic static ucar.ma2.Array broadcast(ucar.ma2.Array a,
List<Integer> shape)
a - Array ashape - Shapepublic static ucar.ma2.Array[] meshgrid(ucar.ma2.Array x,
ucar.ma2.Array y)
x - X array - vectory - Y array - vectorpublic static ucar.ma2.Array[] meshgrid(ucar.ma2.Array... xs)
xs - X arrayspublic static VectorLayer meshLayer(ucar.ma2.Array x_s, ucar.ma2.Array y_s, ucar.ma2.Array a, LegendScheme ls, double lonlim)
x_s - scatter X arrayy_s - scatter Y arraya - scatter value arrayls - Legend schemelonlim - Longiutde limitation - to avoid the polygon cross -180/180public static VectorLayer meshLayer(ucar.ma2.Array x_s, ucar.ma2.Array y_s, ucar.ma2.Array a, LegendScheme ls)
x_s - scatter X arrayy_s - scatter Y arraya - scatter value arrayls - Legend schemepublic static ucar.ma2.Array smooth5(ucar.ma2.Array a,
int rowNum,
int colNum,
double unDefData)
a - ArrayrowNum - Row numbercolNum - Column numberunDefData - Missing valuepublic static ucar.ma2.Array smooth5(ucar.ma2.Array a)
a - Arraypublic static ucar.ma2.Array smooth9(ucar.ma2.Array a)
a - Arraypublic static ucar.ma2.Array interpolation_IDW_Radius(List<Number> x_s, List<Number> y_s, ucar.ma2.Array a, List<Number> X, List<Number> Y, int NeededPointNum, double radius)
x_s - scatter X arrayy_s - scatter Y arraya - scatter value arrayX - grid X arrayY - grid Y arrayNeededPointNum - needed at least point numberradius - search radiuspublic static ucar.ma2.Array interpolation_IDW_Neighbor(List<Number> x_s, List<Number> y_s, ucar.ma2.Array a, List<Number> X, List<Number> Y, int NumberOfNearestNeighbors)
x_s - scatter X arrayy_s - scatter Y arraya - scatter value arrayX - grid X arrayY - grid Y arrayNumberOfNearestNeighbors - public static ucar.ma2.Array interpolation_Nearest_1(List<Number> x_s, List<Number> y_s, ucar.ma2.Array a, List<Number> X, List<Number> Y, double radius, double fill_value)
x_s - scatter X arrayy_s - scatter Y arraya - scatter value arrayX - x coordinateY - y coordinateradius - Radiusfill_value - undefine valuepublic static ucar.ma2.Array interpolation_Nearest(List<Number> x_s, List<Number> y_s, ucar.ma2.Array a, List<Number> X, List<Number> Y, double radius)
x_s - scatter X arrayy_s - scatter Y arraya - scatter value arrayX - x coordinateY - y coordinateradius - Radiuspublic static ucar.ma2.Array[] extendHalfCell(ucar.ma2.Array x,
ucar.ma2.Array y)
x - Input x coordinatey - Input y coordinatepublic static ucar.ma2.Array interpolation_Inside(List<Number> x_s, List<Number> y_s, ucar.ma2.Array a, List<Number> X, List<Number> Y)
x_s - scatter X arrayy_s - scatter Y arraya - scatter value arrayX - x coordinateY - y coordinatepublic static ucar.ma2.Array interpolation_Inside(ucar.ma2.Array x_s,
ucar.ma2.Array y_s,
ucar.ma2.Array a,
ucar.ma2.Array X,
ucar.ma2.Array Y,
boolean center)
x_s - scatter X arrayy_s - scatter Y arraya - scatter value arrayX - x coordinateY - y coordinatecenter - If the grid point is center or borderpublic static ucar.ma2.Array interpolation_Inside_Max(List<Number> x_s, List<Number> y_s, ucar.ma2.Array a, List<Number> X, List<Number> Y)
x_s - scatter X arrayy_s - scatter Y arraya - scatter value arrayX - x coordinateY - y coordinatepublic static ucar.ma2.Array interpolation_Inside_Min(List<Number> x_s, List<Number> y_s, ucar.ma2.Array a, List<Number> X, List<Number> Y)
x_s - scatter X arrayy_s - scatter Y arraya - scatter value arrayX - x coordinateY - y coordinatepublic static Object interpolation_Inside_Count(List<Number> x_s, List<Number> y_s, List<Number> X, List<Number> Y, boolean pointDensity)
x_s - scatter X arrayy_s - scatter Y arrayX - x coordinateY - y coordinatepointDensity - If return point density valuepublic static ucar.ma2.Array interpolation_Surface_1(ucar.ma2.Array x_s,
ucar.ma2.Array y_s,
ucar.ma2.Array a,
ucar.ma2.Array X,
ucar.ma2.Array Y,
double unDefData)
x_s - scatter X arrayy_s - scatter Y arraya - scatter value arrayX - x coordinateY - y coordinateunDefData - undefine valuepublic static ucar.ma2.Array interpolation_Surface(ucar.ma2.Array x_s,
ucar.ma2.Array y_s,
ucar.ma2.Array a,
ucar.ma2.Array X,
ucar.ma2.Array Y)
x_s - scatter X arrayy_s - scatter Y arraya - scatter value arrayX - x coordinateY - y coordinatepublic static ucar.ma2.Array interpolation_Surface_bak(ucar.ma2.Array x_s,
ucar.ma2.Array y_s,
ucar.ma2.Array a,
ucar.ma2.Array X,
ucar.ma2.Array Y)
x_s - scatter X arrayy_s - scatter Y arraya - scatter value arrayX - x coordinateY - y coordinatepublic static ucar.ma2.Array cressman(List<Number> x_s, List<Number> y_s, ucar.ma2.Array v_s, List<Number> X, List<Number> Y, List<Number> radList)
x_s - scatter X arrayy_s - scatter Y arrayv_s - scatter value arrayX - x arrayY - y arrayradList - radii listpublic static ucar.ma2.Array cressman_bak(List<Number> x_s, List<Number> y_s, ucar.ma2.Array v_s, List<Number> X, List<Number> Y, List<Number> radList)
x_s - scatter X arrayy_s - scatter Y arrayv_s - scatter value arrayX - x arrayY - y arrayradList - radii listpublic static ucar.ma2.Array linint2(ucar.ma2.Array a,
ucar.ma2.Array X,
ucar.ma2.Array Y,
ucar.ma2.Array newX,
ucar.ma2.Array newY)
a - The sample arrayX - X coordinate of the sample arrayY - Y coordinate of the sample arraynewX - X coordinate of the query pointsnewY - Y coordinate of the query pointspublic static ucar.ma2.Array resample_Bilinear(ucar.ma2.Array a,
List<Number> X,
List<Number> Y,
List<Number> newX,
List<Number> newY)
a - The sample arrayX - X coordinate of the sample arrayY - Y coordinate of the sample arraynewX - X coordinate of the query pointsnewY - Y coordinate of the query pointspublic static ucar.ma2.Array resample_Bilinear(ucar.ma2.Array a,
ucar.ma2.Array X,
ucar.ma2.Array Y,
ucar.ma2.Array newX,
ucar.ma2.Array newY)
a - The sample arrayX - X coordinate of the sample arrayY - Y coordinate of the sample arraynewX - X coordinate of the query pointsnewY - Y coordinate of the query pointspublic static ucar.ma2.Array resample_Neighbor(ucar.ma2.Array a,
ucar.ma2.Array X,
ucar.ma2.Array Y,
ucar.ma2.Array newX,
ucar.ma2.Array newY)
a - The sample arrayX - X coordinate of the sample arrayY - Y coordinate of the sample arraynewX - X coordinate of the query pointsnewY - Y coordinate of the query pointspublic ucar.ma2.Array interpolate(ucar.ma2.Array a,
List<Number> X,
List<Number> Y)
a - ArrayX - X coordinatesY - Y coordinatespublic static double interpn_s(List<List<Number>> points, ucar.ma2.Array values, List<Number> xi)
points - The points defining the regular grid in n dimensions.values - The data on the regular grid in n dimensions.xi - The coordinates to sample the gridded data atpublic static double interpn_s(List<ucar.ma2.Array> points, ucar.ma2.Array values, ucar.ma2.Array xi)
points - The points defining the regular grid in n dimensions.values - The data on the regular grid in n dimensions.xi - The coordinates to sample the gridded data atpublic static ucar.ma2.Array interpn(List<ucar.ma2.Array> points, ucar.ma2.Array values, List<ucar.ma2.Array> xi)
points - The points defining the regular grid in n dimensions.values - The data on the regular grid in n dimensions.xi - The coordinates to sample the gridded data at - 2Dpublic static Object interpn(List<ucar.ma2.Array> points, ucar.ma2.Array values, ucar.ma2.Array xi) throws ucar.ma2.InvalidRangeException
points - The points defining the regular grid in n dimensions.values - The data on the regular grid in n dimensions.xi - The coordinates to sample the gridded data at - 2Ducar.ma2.InvalidRangeExceptionpublic static Object[] findIndices(List<List<Number>> points, List<Number> xi)
points - The points defining the regular grid in n dimensions.xi - The coordinates to sample the gridded data atpublic static Object[] findIndices(List<ucar.ma2.Array> points, ucar.ma2.Array xi)
points - The points defining the regular grid in n dimensions.xi - The coordinates to sample the gridded data atpublic static int searchSorted(List<Number> a, double v)
a - Sorted listv - valuepublic static int searchSorted(ucar.ma2.Array a,
double v)
a - Sorted listv - valuepublic static ucar.ma2.Array[] reproject(ucar.ma2.Array x,
ucar.ma2.Array y,
ProjectionInfo toProj)
x - X arrayy - Y arraytoProj - To projectionpublic static ucar.ma2.Array[] reproject(ucar.ma2.Array x,
ucar.ma2.Array y,
ProjectionInfo fromProj,
ProjectionInfo toProj)
x - X arrayy - Y arrayfromProj - From projectiontoProj - To projectionpublic static double toStation(ucar.ma2.Array data,
List<Number> xArray,
List<Number> yArray,
double x,
double y,
double missingValue)
data - Data arrayxArray - X arrayyArray - Y arrayx - X coordinate of the stationy - Y coordinate of the stationmissingValue - Missing valuepublic static double toStation(ucar.ma2.Array data,
List<Number> xArray,
List<Number> yArray,
double x,
double y)
data - Data arrayxArray - X arrayyArray - Y arrayx - X coordinate of the stationy - Y coordinate of the stationpublic static int getDimIndex(ucar.ma2.Array dim,
double v)
dim - Dimension arrayv - The valuepublic static double toStation(ucar.ma2.Array data,
ucar.ma2.Array xArray,
ucar.ma2.Array yArray,
double x,
double y)
data - Data arrayxArray - X arrayyArray - Y arrayx - X coordinate of the stationy - Y coordinate of the stationpublic static double toStation_Neighbor(ucar.ma2.Array data,
List<Number> xArray,
List<Number> yArray,
double x,
double y,
double missingValue)
data - Data arrayxArray - X arrayyArray - Y arrayx - X coordinate of the stationy - Y coordinate of the stationmissingValue - Missing valuepublic static double toStation_Neighbor(ucar.ma2.Array data,
List<Number> xArray,
List<Number> yArray,
double x,
double y)
data - Data arrayxArray - X arrayyArray - Y arrayx - X coordinate of the stationy - Y coordinate of the stationpublic static double toStation_Neighbor(ucar.ma2.Array data,
ucar.ma2.Array xArray,
ucar.ma2.Array yArray,
double x,
double y)
data - Data arrayxArray - X arrayyArray - Y arrayx - X coordinate of the stationy - Y coordinate of the stationpublic static Object[] reproject_back(ucar.ma2.Array data, List<Number> xx, List<Number> yy, ProjectionInfo fromProj, ProjectionInfo toProj) throws ucar.ma2.InvalidRangeException
data - Data arrayxx - X arrayyy - Y arrayfromProj - From projectiontoProj - To projectionucar.ma2.InvalidRangeExceptionpublic static Object[] reproject(ucar.ma2.Array data, List<Number> xx, List<Number> yy, ProjectionInfo fromProj, ProjectionInfo toProj, ResampleMethods method) throws ucar.ma2.InvalidRangeException
data - Data arrayxx - X arrayyy - Y arrayfromProj - From projectiontoProj - To projectionmethod - Resample methoducar.ma2.InvalidRangeExceptionpublic static Object[] reproject(ucar.ma2.Array data, List<Number> xx, List<Number> yy, ProjectionInfo fromProj, ProjectionInfo toProj) throws ucar.ma2.InvalidRangeException
data - Data arrayxx - X arrayyy - Y arrayfromProj - From projectiontoProj - To projectionucar.ma2.InvalidRangeExceptionpublic static ucar.ma2.Array reproject(ucar.ma2.Array data,
List<Number> x,
List<Number> y,
ucar.ma2.Array rx,
ucar.ma2.Array ry,
ProjectionInfo fromProj,
ProjectionInfo toProj,
double fill_value,
ResampleMethods resampleMethod)
throws ucar.ma2.InvalidRangeException
data - Data arrayx - X arrayy - Y arrayrx - Result x arrayry - Result y arrayfromProj - From projectiontoProj - To projectionfill_value - Fill valueresampleMethod - Resample methoducar.ma2.InvalidRangeExceptionpublic static ucar.ma2.Array reproject(ucar.ma2.Array data,
List<Number> x,
List<Number> y,
ucar.ma2.Array rx,
ucar.ma2.Array ry,
ProjectionInfo fromProj,
ProjectionInfo toProj,
ResampleMethods resampleMethod)
throws ucar.ma2.InvalidRangeException
data - Data arrayx - X arrayy - Y arrayrx - Result x arrayry - Result y arrayfromProj - From projectiontoProj - To projectionresampleMethod - Resample methoducar.ma2.InvalidRangeExceptionpublic static ucar.ma2.Array reproject(ucar.ma2.Array data,
List<Number> x,
List<Number> y,
List<Number> rx,
List<Number> ry,
ProjectionInfo fromProj,
ProjectionInfo toProj,
double fill_value,
ResampleMethods resampleMethod)
data - Data arrayx - X arrayy - Y arrayrx - Result x arrayry - Result y arrayfromProj - From projectiontoProj - To projectionfill_value - Fill valueresampleMethod - Resample methodpublic static PolygonShape convexHull(ucar.ma2.Array x, ucar.ma2.Array y)
Polygon that contains all the
pointsx - X arrayy - Y arrayCopyright © 2019. All rights reserved.