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 int
sizeX()
Define the size of the grid along the x-axis.int
sizeY()
Define the size of the grid along the y-axis.double[]
x()
Get the values of the independent variable xi.double
x(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.double
y(int j)
Get the value of yj, the j-th value of the independent variable y.double
z(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:BivariateGrid
Get the value of the dependent variable z at the given indices in the grid.- Specified by:
z
in 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:BivariateGrid
Get the values of the independent variable xi.- Specified by:
x
in interfaceBivariateGrid
- Returns:
- xi's
-
y
public double[] y()
Description copied from interface:BivariateGrid
Get the values of the independent variable yj.- Specified by:
y
in interfaceBivariateGrid
- Returns:
- yj's
-
x
public double x(int i)
Description copied from interface:BivariateGrid
Get the value of xi, the i-th value of the independent variable x.- Specified by:
x
in interfaceBivariateGrid
- Parameters:
i
- the index- Returns:
- xi
-
y
public double y(int j)
Description copied from interface:BivariateGrid
Get the value of yj, the j-th value of the independent variable y.- Specified by:
y
in interfaceBivariateGrid
- Parameters:
j
- the index- Returns:
- yj
-
sizeX
public int sizeX()
Description copied from interface:BivariateGrid
Define the size of the grid along the x-axis. That is, the number of points along the x-axis.- Specified by:
sizeX
in interfaceBivariateGrid
- Returns:
- the size along the x-axis
-
sizeY
public int sizeY()
Description copied from interface:BivariateGrid
Define the size of the grid along the y-axis. That is, the number of points along the y-axis.- Specified by:
sizeY
in interfaceBivariateGrid
- Returns:
- the size along the y-axis
-
-