FunctionInterpolation[x^2, {x, 0, 9}] // InputForm
returns:
InterpolatingFunction[
{{0., 9.}},
{5, 3, 0, {13}, {4}, 0, 0, 0, 0, Automatic, {}, {}, False},
{{0., 0.75, 1.5, 2.25, 3., 3.75, 4.5, 5.25, 6., 6.75, 7.5, 8.25, 9.}},
{{0.}, {0.5625}, {2.25}, {5.0625}, {9.}, {14.0625}, {20.25}, {27.5625}, {36.},
{45.5625}, {56.25}, {68.0625}, {81.}},
{Automatic}]
Some of the lists can easily be understood: first line is the Domain
, third line is the list of x coordinates of the interpolating points, fourth line is the list of their y coordinates (why in List
of List
?).
I'd like to understand more precisely the structure to modify it manually (more precisely, I'd like to define an interpolating function by "cropping" the InterpolatingFunction
on a smaller domain, without changing the points in the interval of interest--this last condition was not included in my previous question How to restrict InterpolatingFunction to a smaller domain?).
This would allow me to see for example what's wrong in the following, which I made from another huge interpolating function but is not recognized as a packed InterpolatingFunction
(it does not return the nice form).
InterpolatingFunction[{{-14.7299, -14.6565}}, {5, 7, 1, {3}, {4}, 0,
0, 0, 0, Automatic, {}, {},
False}, {{-211.618, -211.576, -211.481}}, \
{Developer`PackedArrayForm, {0, 2, 4}, {20.9957, 0.784718, 21.0292,
0.782668, 21.1027, 0.777747}}, {Automatic}]
{0,2,4}
to{0, 2, 4, 6}
, the last example works. It's a list of indices of where to split the array of values that follows it. The indices need to start with0
and end with the length of the array. $\endgroup$cropInterpolatingFunction
which I will share here soon. $\endgroup$Developer`PackedArrayForm
IF in a little more detail here. (Well, at least there's a little comment for more of the pieces.) $\endgroup$