List of usage examples for org.apache.commons.math3.analysis.interpolation BicubicInterpolator BicubicInterpolator
BicubicInterpolator
From source file:org.meteoinfo.math.interpolate.InterpUtil.java
/** * Make interpolation function for grid data * @param x X data/* ww w .ja v a 2 s. c o m*/ * @param y Y data * @param z Z data * @return Interpolation function */ public static BivariateFunction getBiInterpFunc(Array x, Array y, Array z) { double[] xd = (double[]) ArrayUtil.copyToNDJavaArray(x); double[] yd = (double[]) ArrayUtil.copyToNDJavaArray(y); double[][] zd = (double[][]) ArrayUtil.copyToNDJavaArray(z); BivariateGridInterpolator li = new BicubicInterpolator(); BivariateFunction func = li.interpolate(xd, yd, zd); return func; }
From source file:uk.ac.diamond.scisoft.analysis.dataset.function.Interpolation2D.java
public static Dataset bicubicInterpolation(IDataset oldx, IDataset oldy, IDataset oldxy, IDataset newx, IDataset newy) {// www. j a va2 s . co m return interpolate(oldx, oldy, oldxy, newx, newy, new BicubicInterpolator()); }