Class BivariateArrayGrid
- java.lang.Object
-
- dev.nm.analysis.curvefit.interpolation.bivariate.BivariateArrayGrid
-
- All Implemented Interfaces:
BivariateGrid
public class BivariateArrayGrid extends Object implements BivariateGrid
Implementation ofBivariateGrid, backed by arrays.
-
-
Constructor Summary
Constructors Constructor Description BivariateArrayGrid(double[][] z, double[] x, double[] y)Constructs a new grid with a given two-dimensional array of grid values, and values for grid line positions along the x-axis and the y-axis.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intsizeX()Define the size of the grid along the x-axis.intsizeY()Define the size of the grid along the y-axis.double[]x()Get the values of the independent variable xi.doublex(int i)Get the value of xi, the i-th value of the independent variable x.double[]y()Get the values of the independent variable yj.doubley(int j)Get the value of yj, the j-th value of the independent variable y.doublez(int i, int j)Get the value of the dependent variable z at the given indices in the grid.
-
-
-
Constructor Detail
-
BivariateArrayGrid
public BivariateArrayGrid(double[][] z, double[] x, double[] y)Constructs a new grid with a given two-dimensional array of grid values, and values for grid line positions along the x-axis and the y-axis.- Parameters:
z- the grid valuesx- the grid line positions along the x-axisy- the grid line positions along the y-axis
-
-
Method Detail
-
z
public double z(int i, int j)Description copied from interface:BivariateGridGet the value of the dependent variable z at the given indices in the grid.- Specified by:
zin interfaceBivariateGrid- Parameters:
i- the index along the x-axisj- the index along the y-axis- Returns:
- z(xi, yj)
-
x
public double[] x()
Description copied from interface:BivariateGridGet the values of the independent variable xi.- Specified by:
xin interfaceBivariateGrid- Returns:
- xi's
-
y
public double[] y()
Description copied from interface:BivariateGridGet the values of the independent variable yj.- Specified by:
yin interfaceBivariateGrid- Returns:
- yj's
-
x
public double x(int i)
Description copied from interface:BivariateGridGet the value of xi, the i-th value of the independent variable x.- Specified by:
xin interfaceBivariateGrid- Parameters:
i- the index- Returns:
- xi
-
y
public double y(int j)
Description copied from interface:BivariateGridGet the value of yj, the j-th value of the independent variable y.- Specified by:
yin interfaceBivariateGrid- Parameters:
j- the index- Returns:
- yj
-
sizeX
public int sizeX()
Description copied from interface:BivariateGridDefine the size of the grid along the x-axis. That is, the number of points along the x-axis.- Specified by:
sizeXin interfaceBivariateGrid- Returns:
- the size along the x-axis
-
sizeY
public int sizeY()
Description copied from interface:BivariateGridDefine the size of the grid along the y-axis. That is, the number of points along the y-axis.- Specified by:
sizeYin interfaceBivariateGrid- Returns:
- the size along the y-axis
-
-