You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gilles Sadowski <gi...@harfang.homelinux.org> on 2010/03/18 13:18:39 UTC
[Math] Bicubic interpolation
Hello.
This is in reference to the second feature request in issue
https://issues.apache.org/jira/browse/MATH-353
If I'm not mistaken, this interpolation algorithm requires a regular grid of
samples.
The method "interpolate" in interface "MultivariateRealInterpolator" cannot
enforce this as the sample coordinates must be specified independently for
each sample; they are passed in a single variable:
void interpolate(double[][] samples, double[] values)
e.g. in 2D, samples[i][0] is the x-coordinate,
samples[i][1] is the y-coordinate,
values[i] is f(samples[i][0], samples[i][1])
For a grid in 2D, there should be:
void interpolate(double[] x, double[] y, double[][] values)
i.e. x[i] is the i-th grid x-coordinate
y[j] is the j-th grid y-coordinate
both x and y must be sorted in increasing order
values[i][j] is f(x[i], y[j])
Should we create a "BivariateRealGridInterpolator" interface?
Best,
Gilles
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [Math] Bicubic interpolation
Posted by Luc Maisonobe <Lu...@free.fr>.
Gilles Sadowski a écrit :
> Hello.
>
> This is in reference to the second feature request in issue
> https://issues.apache.org/jira/browse/MATH-353
>
> If I'm not mistaken, this interpolation algorithm requires a regular grid of
> samples.
> The method "interpolate" in interface "MultivariateRealInterpolator" cannot
> enforce this as the sample coordinates must be specified independently for
> each sample; they are passed in a single variable:
> void interpolate(double[][] samples, double[] values)
> e.g. in 2D, samples[i][0] is the x-coordinate,
> samples[i][1] is the y-coordinate,
> values[i] is f(samples[i][0], samples[i][1])
>
> For a grid in 2D, there should be:
> void interpolate(double[] x, double[] y, double[][] values)
> i.e. x[i] is the i-th grid x-coordinate
> y[j] is the j-th grid y-coordinate
> both x and y must be sorted in increasing order
> values[i][j] is f(x[i], y[j])
>
> Should we create a "BivariateRealGridInterpolator" interface?
This is a good idea.
Luc
>
> Best,
> Gilles
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org