public class VectorLookupTable extends Object
VectorLookupTable
performs the function of
multilinear interpolation for vector lookup tables with an
arbitrary number of dimensions.
todo - method for degrading a table (see LookupTable
)
Constructor and Description |
---|
VectorLookupTable(int length,
double[] values,
double[]... dimensions)
Constructs an array lookup table for the lookup values and dimensions supplied as arguments.
|
VectorLookupTable(int length,
double[] values,
IntervalPartition... dimensions)
Constructs an array lookup table for the lookup values and dimensions supplied as arguments.
|
VectorLookupTable(int length,
float[] values,
float[]... dimensions)
Constructs an array lookup table for the lookup values and dimensions supplied as arguments.
|
VectorLookupTable(int length,
float[] values,
IntervalPartition... dimensions)
Constructs an array lookup table for the lookup values and dimensions supplied as arguments.
|
Modifier and Type | Method and 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 array for the given coordinates.
|
public VectorLookupTable(int length, double[] values, IntervalPartition... dimensions)
length
- the length of the lookup vector.values
- the lookup values. The values
array must be laid out in row-major
order, so that the dimension associated with the last axis varies fastest.dimensions
- the interval partitions defining the dimensions associated with the lookup
table. An interval partition is a strictly increasing sequence of at least
two real numbers, see IntervalPartition
.IllegalArgumentException
- if length
is less than 1
or the length of
values
is not equal to length
times the number
of coordinate grid vertices.NullPointerException
- if the values
array or the dimensions
array
is null
or any dimension is null
.public VectorLookupTable(int length, float[] values, IntervalPartition... dimensions)
length
- the length of the lookup vector.values
- the lookup values. The values
array must be laid out in row-major
order, so that the dimension associated with the last axis varies fastest.dimensions
- the interval partitions defining the dimensions associated with the lookup
table. An interval partition is a strictly increasing sequence of at least
two real numbers, see IntervalPartition
.IllegalArgumentException
- if length
is less than 1
or the length of
values
is not equal to length
times the number
of coordinate grid vertices.NullPointerException
- if the values
array or the dimensions
array
is null
or any dimension is null
.public VectorLookupTable(int length, double[] values, double[]... dimensions)
length
- the length of the lookup vector.values
- the lookup values. The values
array must be laid out in row-major
order, so that the dimension associated with the last axis varies fastest.dimensions
- the interval partitions defining the dimensions associated with the lookup
table. An interval partition is a strictly increasing sequence of at least
two real numbers, see IntervalPartition
.IllegalArgumentException
- if length
is less than 1
or the length of
values
is not equal to length
times the number
of coordinate grid vertices.NullPointerException
- if the values
array or the dimensions
array
is null
or any dimension is null
.public VectorLookupTable(int length, float[] values, float[]... dimensions)
length
- the length of the lookup vector.values
- the lookup values. The values
array must be laid out in row-major
order, so that the dimension associated with the last axis varies fastest.dimensions
- the interval partitions defining the dimensions associated with the lookup
table. An interval partition is a strictly increasing sequence of at least
two real numbers, see IntervalPartition
.IllegalArgumentException
- if length
is less than 1
or the length of
values
is not equal to length
times the number
of coordinate grid vertices.NullPointerException
- if the values
array or the dimensions
array
is null
or any dimension is null
.public final int getDimensionCount()
public final IntervalPartition[] getDimensions()
public final IntervalPartition getDimension(int i)
i
- the index number of the dimension of interestpublic final double[] getValues(double... coordinates) throws IllegalArgumentException
coordinates
- the coordinates of the lookup point.IllegalArgumentException
- if the length of the coordinates
array is
not equal to the number of dimensions associated
with the lookup table.NullPointerException
- if the coordinates
array is null
.Copyright © 2014–2017 European Space Agency (ESA). All rights reserved.