What kind of interpolation is to choose for 1 million points?

Need to build a f-Ju by points, and then analyze it. Points can be up to several million. What kind of interpolation it is better to choose from the point of view of efficiency and speed of finding the value of a function at a particular point in the program? Lagrange interpolation is not suitable, because there the degree of f-AI increased with increasing number of points.
Yet consider interpolation using the Fourier expansion.
Maybe there are some types of predictions, more suitable for my task?
June 8th 19 at 16:57
2 answers
June 8th 19 at 16:59
With so many points to you and linear enough.
And generally to interpolate using cubic splines.
Or if you imagine about the function of many of the parametric fit to pull.
linear is not suitable, because the function must be broken because it is then necessary to analyze. - Emiliano28 commented on June 8th 19 at 17:02
And how exactly to analyze? I don't really understand how you prevent romanesti linear functions or splines coachnet. You will then receive from the interpolator just the values in point --- it will be like a black box. - Courtney commented on June 8th 19 at 17:05
The problem is to build a few functions and then solve the system of equations.
Example:
Points got two functions. You need to find such points to 2 * |F2(x1) F1(x2)| = |F1(x2) F2(x3)|
76a0ce030c.jpg - Emiliano28 commented on June 8th 19 at 17:08
Here you gumannost does not interfere - Courtney commented on June 8th 19 at 17:11
And then if necessary do the full interpolation? Take and looking for the three points will best suit your condition. And then looking for a dichotomy already near these points. - Courtney commented on June 8th 19 at 17:14
, segments (A, B,...) can be hundreds. And the dependencies between them can be very different. If you find them the best way that comes to mind is just a complete overkill, and a huge number of iterations.
Why gumannost does not interfere? f-ia will get a patch and then how to solve this problem? - Emiliano28 commented on June 8th 19 at 17:17
Describe your solution, because I don't get how coachnet can let.

And brute force do not necessarily need to lead to some good value and in the correct order. - Courtney commented on June 8th 19 at 17:20
The solution still is (I'll explain on the example above):
You need to make the system of equations. We have only 3 unknowns, respectively, should be 3 equations. One equation is already is a 2 * |F2(x1) F1(x2)| = |F1(x2) F2(x3)|. In order to keep the system full, you need to add 2 more equations. Will the iteration to pick up. I.e. for our example, But should be in 2 times less than B. Accordingly, in one system ur-iy A=1, B=2. Next selected znaczenia, where A=2, B=4; A=3, B=6 etc.
If there is a more optimal way solutions will be glad to hear - Emiliano28 commented on June 8th 19 at 17:23
It's not a system of equations that one equation with three unknowns. It can have multiple (and even infinitely many solutions).

I would have switched to the function F(x1,x2,x3) = 2 * |F2(x1) F1(x2)| - |F1(x2) F2(x3)|, and solve the equation F(x1,x2,x3)=0, any method for solving equations. For example, would be considered gradient, breaking the space (x1,x2,x3) in the region with a constant direction of the gradient, and check if the area for the presence of the root.

Well, or has used any additional information about functionality.

Again, if we expect the smooth functions can simply calculate the difference value of the function at the point, and look for a brute force close on smaller distances - the smoothness of the us ensures that the solution is somewhere nearby. - Courtney commented on June 8th 19 at 17:26
, i.e., a piecewise function is not suitable, right? - Emiliano28 commented on June 8th 19 at 17:29
Yes, no, why? Here the opposite of the slope coefficient is the gradient of a function, it is possible to use to optimize the search - Courtney commented on June 8th 19 at 17:32
and what are the names of these methods(using gradients or smooth)? I would like to read about them - Emiliano28 commented on June 8th 19 at 17:35
I work in Semenych areas, so konkretnuyu literature will not name.

But I have deformylase the decision - not by complex transformations reduce the problem to the search of zeros of this function:
$$
F(x1,x2,x3) = (4 * (F2(x1) F1(x2))^2 - (F1(x2) F2(x3))^2)^2
$$
But the function is not negative, so you can just find her lows - and this is a standard task. I have to use scipy.optimize - Courtney commented on June 8th 19 at 17:38
June 8th 19 at 17:01
Cubic splines - I think the best would be.
There search is done linearly:
//*************************************************************************/
//Count values interpolant at a given point
//*************************************************************************/
double Interpolate(double x)
{
 //double result;
 int i=0;

 while (KnotArray[i].x < x)
i++;
i--;
 return Coef[i][0] + Coef[i][1]*(x-KnotArray[i].x) + Coef[i][2]*powf((x-KnotArray[i].x),2) + Coef[i][3]*powf((x-KnotArray[i].x),3); 

}
Splines do not quite fit, because we receive many piecewise functions. And me to task, after receiving f-AI, it is necessary to analyze it, and to carry out the necessary analysis only using 1U "whole" feature - Emiliano28 commented on June 8th 19 at 17:04

Find more questions by tags Linear algebraHigher mathematicsMathematics