Package org.esa.snap.core.util.math
Class MatrixLookupTable
- java.lang.Object
-
- org.esa.snap.core.util.math.MatrixLookupTable
-
public class MatrixLookupTable extends Object
The classMatrixLookupTable
performs the function of multilinear interpolation for matrix lookup tables with an arbitrary number of dimensions.The implementation simply delegates to an
VectorLookupTable
.
-
-
Constructor Summary
Constructors Constructor Description MatrixLookupTable(int m, int n, MatrixFactory matrixFactory, double[] values, double[]... dimensions)
MatrixLookupTable(int m, int n, MatrixFactory matrixFactory, double[] values, IntervalPartition... dimensions)
MatrixLookupTable(int m, int n, MatrixFactory matrixFactory, float[] values, float[]... dimensions)
MatrixLookupTable(int m, int n, MatrixFactory matrixFactory, float[] values, IntervalPartition... dimensions)
MatrixLookupTable(int m, int n, MatrixFactory matrixFactory, VectorLookupTable vectorLookupTable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntervalPartition
getDimension(int i)
Returns the the ith dimension associated with the lookup table.int
getDimensionCount()
Returns the number of dimensions associated with the lookup table.IntervalPartition[]
getDimensions()
Returns the dimensions associated with the lookup table.double[][]
getValues(double... coordinates)
Returns an interpolated value matrix for the given coordinates.
-
-
-
Constructor Detail
-
MatrixLookupTable
public MatrixLookupTable(int m, int n, MatrixFactory matrixFactory, double[] values, IntervalPartition... dimensions)
-
MatrixLookupTable
public MatrixLookupTable(int m, int n, MatrixFactory matrixFactory, float[] values, IntervalPartition... dimensions)
-
MatrixLookupTable
public MatrixLookupTable(int m, int n, MatrixFactory matrixFactory, double[] values, double[]... dimensions)
-
MatrixLookupTable
public MatrixLookupTable(int m, int n, MatrixFactory matrixFactory, float[] values, float[]... dimensions)
-
MatrixLookupTable
public MatrixLookupTable(int m, int n, MatrixFactory matrixFactory, VectorLookupTable vectorLookupTable)
-
-
Method Detail
-
getDimensionCount
public final int getDimensionCount()
Returns the number of dimensions associated with the lookup table.- Returns:
- the number of dimensions.
-
getDimensions
public final IntervalPartition[] getDimensions()
Returns the dimensions associated with the lookup table.- Returns:
- the dimensions.
-
getDimension
public final IntervalPartition getDimension(int i)
Returns the the ith dimension associated with the lookup table.- Parameters:
i
- the index number of the dimension of interest- Returns:
- the ith dimension.
-
getValues
public final double[][] getValues(double... coordinates) throws IllegalArgumentException
Returns an interpolated value matrix for the given coordinates.- Parameters:
coordinates
- the coordinates of the lookup point.- Returns:
- the interpolated value matrix.
- Throws:
IllegalArgumentException
- if the length of thecoordinates
array is not equal to the number of dimensions associated with the lookup table.NullPointerException
- if thecoordinates
array isnull
.
-
-