30#include "matpack_math.h"
46DEBUG_ONLY(
const Numeric sum_check_epsilon = 1e-6;)
70#define LOOPIT(x) for (const Numeric* x = &t##x.fd[1]; x >= &t##x.fd[0]; --x)
82 os << gp.
idx <<
" " << gp.
fd[0] <<
" " << gp.
fd[1] <<
"\n";
142 ConstVectorView old_grid,
143 ConstVectorView new_grid,
144 const Numeric& extpolfac) {
145 const Index n_old = old_grid.nelem();
146 const Index n_new = new_grid.nelem();
164 bool ascending = (old_grid[0] <= old_grid[1]);
177 const Numeric og_min =
178 old_grid[0] - extpolfac * (old_grid[1] - old_grid[0]);
179 const Numeric og_max =
180 old_grid[n_old - 1] +
181 extpolfac * (old_grid[n_old - 1] - old_grid[n_old - 2]);
194 Numeric frac = (new_grid[0] - og_min) / (og_max - og_min);
201 Index current_position = (Index)rint(frac * (Numeric)(n_old - 2));
213 Numeric lower = old_grid[current_position];
214 Numeric upper = old_grid[current_position + 1];
217 for (Index i_new = 0; i_new < n_new; ++i_new) {
221 const Numeric tng = new_grid[i_new];
236 if (tng < lower && current_position > 0) {
239 lower = old_grid[current_position];
240 }
while (tng < lower && current_position > 0);
242 upper = old_grid[current_position + 1];
244 tgp.
idx = current_position;
245 tgp.
fd[0] = (tng - lower) / (upper - lower);
246 tgp.
fd[1] = 1.0 - tgp.
fd[0];
251 if (tng >= upper && current_position < n_old - 2) {
254 upper = old_grid[current_position + 1];
255 }
while (tng >= upper && current_position < n_old - 2);
257 lower = old_grid[current_position];
259 tgp.
idx = current_position;
260 tgp.
fd[0] = (tng - lower) / (upper - lower);
261 tgp.
fd[1] = 1.0 - tgp.
fd[0];
271 tgp.
idx = current_position;
272 tgp.
fd[0] = (tng - lower) / (upper - lower);
273 tgp.
fd[1] = 1.0 - tgp.
fd[0];
295 const Numeric og_max =
296 old_grid[0] - extpolfac * (old_grid[1] - old_grid[0]);
297 const Numeric og_min =
298 old_grid[n_old - 1] +
299 extpolfac * (old_grid[n_old - 1] - old_grid[n_old - 2]);
303 Numeric frac = 1 - (new_grid[0] - og_min) / (og_max - og_min);
309 Index current_position = (Index)rint(frac * (Numeric)(n_old - 2));
321 Numeric lower = old_grid[current_position];
322 Numeric upper = old_grid[current_position + 1];
324 for (Index i_new = 0; i_new < n_new; ++i_new) {
326 const Numeric tng = new_grid[i_new];
340 if (tng > lower && current_position > 0) {
343 lower = old_grid[current_position];
344 }
while (tng > lower && current_position > 0);
346 upper = old_grid[current_position + 1];
348 tgp.
idx = current_position;
349 tgp.
fd[0] = (tng - lower) / (upper - lower);
350 tgp.
fd[1] = 1.0 - tgp.
fd[0];
354 if (tng <= upper && current_position < n_old - 2) {
357 upper = old_grid[current_position + 1];
358 }
while (tng <= upper && current_position < n_old - 2);
360 lower = old_grid[current_position];
362 tgp.
idx = current_position;
363 tgp.
fd[0] = (tng - lower) / (upper - lower);
364 tgp.
fd[1] = 1.0 - tgp.
fd[0];
375 tgp.
idx = current_position;
376 tgp.
fd[0] = (tng - lower) / (upper - lower);
377 tgp.
fd[1] = 1.0 - tgp.
fd[0];
410 ConstVectorView old_grid,
411 const Numeric& new_grid,
412 const Numeric& extpolfac) {
414 Vector
v(1, new_grid);
415 gridpos(agp, old_grid,
v, extpolfac);
435 const Index n = grid.nelem();
438 for (Index i = 0; i < n - 1; i++) {
443 gp[n - 1].idx = n - 2;
460 gp_new.
fd[0] = gp_old.
fd[0];
461 gp_new.
fd[1] = gp_old.
fd[1];
478 return (Numeric(gp.
idx) + gp.
fd[0]);
501 if (gp.
fd[0] < 0.0) {
504 }
else if (gp.
fd[0] > 1.0) {
509 if (gp.
fd[1] < 0.0) {
512 }
else if (gp.
fd[1] > 1.0) {
544 if (gp.
fd[0] > 0.5) {
553 if (gp.
idx == n - 1) {
598 for (Index i = 0; i < gp.
nelem(); i++) {
599 if (gp[i].idx == ie) {
622 for (Index i = 0; i < gp.
nelem(); i++) {
644 const bool& strict) {
648 if (gp.
idx == i && gp.
fd[0] == 0) {
650 }
else if (gp.
idx == i - 1 && gp.
fd[1] == 0) {
687 if (gp.
fd[0] > 0 && gp.
fd[1] > 0) {
692 else if (gp.
fd[0] == 0) {
788 itw[iti] = (*r) * (*c);
820 itw[iti] = (*p) * (*r) * (*c);
855 itw[iti] = (*b) * (*p) * (*r) * (*c);
893 itw[iti] = (*s) * (*b) * (*p) * (*r) * (*c);
934 itw[iti] = (*v) * (*s) * (*b) * (*p) * (*r) * (*c);
961 ARTS_ASSERT(is_same_within_epsilon(sum(itw), 1, sum_check_epsilon));
967 for (Index
c = 0;
c < 2; ++
c) {
968 tia +=
a[tc.
idx +
c] * itw[iti];
1001 ARTS_ASSERT(is_same_within_epsilon(sum(itw), 1, sum_check_epsilon));
1007 for (Index r = 0; r < 2; ++r)
1008 for (Index
c = 0;
c < 2; ++
c) {
1009 tia +=
a(tr.
idx + r, tc.
idx +
c) * itw[iti];
1044 ARTS_ASSERT(is_same_within_epsilon(sum(itw), 1, sum_check_epsilon));
1050 for (Index p = 0; p < 2; ++p)
1051 for (Index r = 0; r < 2; ++r)
1052 for (Index
c = 0;
c < 2; ++
c) {
1053 tia +=
a(tp.
idx + p, tr.
idx + r, tc.
idx +
c) * itw[iti];
1090 ARTS_ASSERT(is_same_within_epsilon(sum(itw), 1, sum_check_epsilon));
1096 for (Index
b = 0;
b < 2; ++
b)
1097 for (Index p = 0; p < 2; ++p)
1098 for (Index r = 0; r < 2; ++r)
1099 for (Index
c = 0;
c < 2; ++
c) {
1140 ARTS_ASSERT(is_same_within_epsilon(sum(itw), 1, sum_check_epsilon));
1146 for (Index s = 0; s < 2; ++s)
1147 for (Index
b = 0;
b < 2; ++
b)
1148 for (Index p = 0; p < 2; ++p)
1149 for (Index r = 0; r < 2; ++r)
1150 for (Index
c = 0;
c < 2; ++
c) {
1151 tia +=
a(ts.
idx + s,
1197 ARTS_ASSERT(is_same_within_epsilon(sum(itw), 1, sum_check_epsilon));
1203 for (Index
v = 0;
v < 2; ++
v)
1204 for (Index s = 0; s < 2; ++s)
1205 for (Index
b = 0;
b < 2; ++
b)
1206 for (Index p = 0; p < 2; ++p)
1207 for (Index r = 0; r < 2; ++r)
1208 for (Index
c = 0;
c < 2; ++
c) {
1209 tia +=
a(tv.
idx +
v,
1243 Index n = cgp.
nelem();
1248 for (Index i = 0; i < n; ++i) {
1314 Index n = cgp.
nelem();
1320 for (Index i = 0; i < n; ++i) {
1336 itw(i, iti) = (*r) * (*c);
1369 Index n = cgp.
nelem();
1376 for (Index i = 0; i < n; ++i) {
1386 itw(i, iti) = (*p) * (*r) * (*c);
1421 Index n = cgp.
nelem();
1429 for (Index i = 0; i < n; ++i) {
1441 itw(i, iti) = (*b) * (*p) * (*r) * (*c);
1478 Index n = cgp.
nelem();
1487 for (Index i = 0; i < n; ++i) {
1501 itw(i, iti) = (*s) * (*b) * (*p) * (*r) * (*c);
1540 Index n = cgp.
nelem();
1550 for (Index i = 0; i < n; ++i) {
1566 itw(i, iti) = (*v) * (*s) * (*b) * (*p) * (*r) * (*c);
1590 ConstMatrixView itw,
1593 Index n = cgp.
nelem();
1602 is_same_within_epsilon(sum(itw(0, Range(joker))), 1, sum_check_epsilon));
1605 for (Index i = 0; i < n; ++i) {
1611 Numeric& tia = ia[i];
1615 for (Index
c = 0;
c < 2; ++
c) {
1617 tia +=
a(tc.
idx +
c) * itw(i, iti);
1646 ConstMatrixView itw,
1650 Index n = cgp.
nelem();
1660 is_same_within_epsilon(sum(itw(0, Range(joker))), 1, sum_check_epsilon));
1663 for (Index i = 0; i < n; ++i) {
1670 Numeric& tia = ia[i];
1674 for (Index r = 0; r < 2; ++r)
1675 for (Index
c = 0;
c < 2; ++
c) {
1676 tia +=
a(tr.
idx + r, tc.
idx +
c) * itw(i, iti);
1706 ConstMatrixView itw,
1711 Index n = cgp.
nelem();
1722 is_same_within_epsilon(sum(itw(0, Range(joker))), 1, sum_check_epsilon));
1725 for (Index i = 0; i < n; ++i) {
1733 Numeric& tia = ia[i];
1737 for (Index p = 0; p < 2; ++p)
1738 for (Index r = 0; r < 2; ++r)
1739 for (Index
c = 0;
c < 2; ++
c) {
1740 tia +=
a(tp.
idx + p, tr.
idx + r, tc.
idx +
c) * itw(i, iti);
1771 ConstMatrixView itw,
1777 Index n = cgp.
nelem();
1789 is_same_within_epsilon(sum(itw(0, Range(joker))), 1, sum_check_epsilon));
1792 for (Index i = 0; i < n; ++i) {
1801 Numeric& tia = ia[i];
1805 for (Index
b = 0;
b < 2; ++
b)
1806 for (Index p = 0; p < 2; ++p)
1807 for (Index r = 0; r < 2; ++r)
1808 for (Index
c = 0;
c < 2; ++
c) {
1842 ConstMatrixView itw,
1849 Index n = cgp.
nelem();
1862 is_same_within_epsilon(sum(itw(0, Range(joker))), 1, sum_check_epsilon));
1865 for (Index i = 0; i < n; ++i) {
1875 Numeric& tia = ia[i];
1879 for (Index s = 0; s < 2; ++s)
1880 for (Index
b = 0;
b < 2; ++
b)
1881 for (Index p = 0; p < 2; ++p)
1882 for (Index r = 0; r < 2; ++r)
1883 for (Index
c = 0;
c < 2; ++
c) {
1884 tia +=
a(ts.
idx + s,
1922 ConstMatrixView itw,
1930 Index n = cgp.
nelem();
1944 is_same_within_epsilon(sum(itw(0, Range(joker))), 1, sum_check_epsilon));
1947 for (Index i = 0; i < n; ++i) {
1958 Numeric& tia = ia[i];
1962 for (Index
v = 0;
v < 2; ++
v)
1963 for (Index s = 0; s < 2; ++s)
1964 for (Index
b = 0;
b < 2; ++
b)
1965 for (Index p = 0; p < 2; ++p)
1966 for (Index r = 0; r < 2; ++r)
1967 for (Index
c = 0;
c < 2; ++
c) {
1968 tia +=
a(tv.
idx +
v,
2009 Index nr = rgp.
nelem();
2010 Index nc = cgp.
nelem();
2015 for (Index ir = 0; ir < nr; ++ir) {
2019 for (Index ic = 0; ic < nc; ++ic) {
2034 itw(ir, ic, iti) = (*r) * (*c);
2068 Index np = pgp.
nelem();
2069 Index nr = rgp.
nelem();
2070 Index nc = cgp.
nelem();
2075 for (Index ip = 0; ip < np; ++ip) {
2077 for (Index ir = 0; ir < nr; ++ir) {
2079 for (Index ic = 0; ic < nc; ++ic) {
2087 itw(ip, ir, ic, iti) = (*p) * (*r) * (*c);
2124 Index nb = bgp.
nelem();
2125 Index np = pgp.
nelem();
2126 Index nr = rgp.
nelem();
2127 Index nc = cgp.
nelem();
2132 for (Index ib = 0; ib < nb; ++ib) {
2134 for (Index ip = 0; ip < np; ++ip) {
2136 for (Index ir = 0; ir < nr; ++ir) {
2138 for (Index ic = 0; ic < nc; ++ic) {
2147 itw(ib, ip, ir, ic, iti) = (*b) * (*p) * (*r) * (*c);
2187 Index ns = sgp.
nelem();
2188 Index nb = bgp.
nelem();
2189 Index np = pgp.
nelem();
2190 Index nr = rgp.
nelem();
2191 Index nc = cgp.
nelem();
2193 ARTS_ASSERT(is_size(itw, ns, nb, np, nr, nc, 32));
2196 for (Index is = 0; is < ns; ++is) {
2198 for (Index ib = 0; ib < nb; ++ib) {
2200 for (Index ip = 0; ip < np; ++ip) {
2202 for (Index ir = 0; ir < nr; ++ir) {
2204 for (Index ic = 0; ic < nc; ++ic) {
2214 itw(is, ib, ip, ir, ic, iti) =
2215 (*s) * (*b) * (*p) * (*r) * (*c);
2258 Index nv = vgp.
nelem();
2259 Index ns = sgp.
nelem();
2260 Index nb = bgp.
nelem();
2261 Index np = pgp.
nelem();
2262 Index nr = rgp.
nelem();
2263 Index nc = cgp.
nelem();
2265 ARTS_ASSERT(is_size(itw, nv, ns, nb, np, nr, nc, 64));
2268 for (Index iv = 0; iv < nv; ++iv) {
2270 for (Index is = 0; is < ns; ++is) {
2272 for (Index ib = 0; ib < nb; ++ib) {
2274 for (Index ip = 0; ip < np; ++ip) {
2276 for (Index ir = 0; ir < nr; ++ir) {
2278 for (Index ic = 0; ic < nc; ++ic) {
2289 itw(iv, is, ib, ip, ir, ic, iti) =
2290 (*v) * (*s) * (*b) * (*p) * (*r) * (*c);
2324 ConstTensor3View itw,
2328 Index nr = rgp.
nelem();
2329 Index nc = cgp.
nelem();
2338 sum(itw(0, 0, Range(joker))), 1, sum_check_epsilon));
2341 for (Index ir = 0; ir < nr; ++ir) {
2345 for (Index ic = 0; ic < nc; ++ic) {
2351 Numeric& tia = ia(ir, ic);
2355 for (Index r = 0; r < 2; ++r)
2356 for (Index
c = 0;
c < 2; ++
c) {
2359 tia +=
a(tr.
idx + r, tc.
idx +
c) * itw(ir, ic, iti);
2390 ConstTensor4View itw,
2395 Index np = pgp.
nelem();
2396 Index nr = rgp.
nelem();
2397 Index nc = cgp.
nelem();
2405 sum(itw(0, 0, 0, Range(joker))), 1, sum_check_epsilon));
2408 for (Index ip = 0; ip < np; ++ip) {
2410 for (Index ir = 0; ir < nr; ++ir) {
2412 for (Index ic = 0; ic < nc; ++ic) {
2418 Numeric& tia = ia(ip, ir, ic);
2422 for (Index p = 0; p < 2; ++p)
2423 for (Index r = 0; r < 2; ++r)
2424 for (Index
c = 0;
c < 2; ++
c) {
2429 itw(ip, ir, ic, iti);
2462 ConstTensor5View itw,
2468 Index nb = bgp.
nelem();
2469 Index np = pgp.
nelem();
2470 Index nr = rgp.
nelem();
2471 Index nc = cgp.
nelem();
2479 sum(itw(0, 0, 0, 0, Range(joker))), 1, sum_check_epsilon));
2482 for (Index ib = 0; ib < nb; ++ib) {
2484 for (Index ip = 0; ip < np; ++ip) {
2486 for (Index ir = 0; ir < nr; ++ir) {
2488 for (Index ic = 0; ic < nc; ++ic) {
2494 Numeric& tia = ia(ib, ip, ir, ic);
2498 for (Index
b = 0;
b < 2; ++
b)
2499 for (Index p = 0; p < 2; ++p)
2500 for (Index r = 0; r < 2; ++r)
2501 for (Index
c = 0;
c < 2; ++
c) {
2503 itw(ib, ip, ir, ic, iti);
2538 ConstTensor6View itw,
2545 Index ns = sgp.
nelem();
2546 Index nb = bgp.
nelem();
2547 Index np = pgp.
nelem();
2548 Index nr = rgp.
nelem();
2549 Index nc = cgp.
nelem();
2551 ARTS_ASSERT(is_size(itw, ns, nb, np, nr, nc, 32));
2557 sum(itw(0, 0, 0, 0, 0, Range(joker))), 1, sum_check_epsilon));
2560 for (Index is = 0; is < ns; ++is) {
2562 for (Index ib = 0; ib < nb; ++ib) {
2564 for (Index ip = 0; ip < np; ++ip) {
2566 for (Index ir = 0; ir < nr; ++ir) {
2568 for (Index ic = 0; ic < nc; ++ic) {
2574 Numeric& tia = ia(is, ib, ip, ir, ic);
2578 for (Index s = 0; s < 2; ++s)
2579 for (Index
b = 0;
b < 2; ++
b)
2580 for (Index p = 0; p < 2; ++p)
2581 for (Index r = 0; r < 2; ++r)
2582 for (Index
c = 0;
c < 2; ++
c) {
2583 tia +=
a(ts.
idx + s,
2588 itw(is, ib, ip, ir, ic, iti);
2625 ConstTensor7View itw,
2633 Index nv = vgp.
nelem();
2634 Index ns = sgp.
nelem();
2635 Index nb = bgp.
nelem();
2636 Index np = pgp.
nelem();
2637 Index nr = rgp.
nelem();
2638 Index nc = cgp.
nelem();
2640 ARTS_ASSERT(is_size(itw, nv, ns, nb, np, nr, nc, 64));
2646 sum(itw(0, 0, 0, 0, 0, 0, Range(joker))), 1, sum_check_epsilon));
2649 for (Index iv = 0; iv < nv; ++iv) {
2651 for (Index is = 0; is < ns; ++is) {
2653 for (Index ib = 0; ib < nb; ++ib) {
2655 for (Index ip = 0; ip < np; ++ip) {
2657 for (Index ir = 0; ir < nr; ++ir) {
2659 for (Index ic = 0; ic < nc; ++ic) {
2665 Numeric& tia = ia(iv, is, ib, ip, ir, ic);
2669 for (Index
v = 0;
v < 2; ++
v)
2670 for (Index s = 0; s < 2; ++s)
2671 for (Index
b = 0;
b < 2; ++
b)
2672 for (Index p = 0; p < 2; ++p)
2673 for (Index r = 0; r < 2; ++r)
2674 for (Index
c = 0;
c < 2; ++
c) {
2675 tia +=
a(tv.
idx +
v,
2681 itw(iv, is, ib, ip, ir, ic, iti);
2720 Numeric den, dif, dift, ho, hp,
w;
2722 dif = abs(x - xa[0]);
2728 for (Index i = 0; i < n; i++) {
2729 if ((dift = abs(x - xa[i])) < dif) {
2740 for (Index m = 1; m < n; m++) {
2741 for (Index i = 0; i < n - m; i++) {
2744 w =
c[i + 1] -
d[i];
2752 y_int += (dy_int = (2 * (ns + 1) < (n - m) ?
c[ns + 1] :
d[ns--]));
2776 Index N_x = x.nelem();
2781 Vector xa(4), ya(4);
2790 Index interp_method = 1;
2792 if (interp_method == 1) {
2794 if ((gp.
fd[0] <= 0.5 && gp.
idx > 0) || gp.
idx == N_x - 2) {
2795 xa[0] = x[gp.
idx - 1];
2797 xa[2] = x[gp.
idx + 1];
2799 ya[0] = y[gp.
idx - 1];
2801 ya[2] = y[gp.
idx + 1];
2804 else if ((gp.
fd[0] > 0.5 && gp.
idx < N_x - 2) || gp.
idx == 0) {
2806 xa[1] = x[gp.
idx + 1];
2807 xa[2] = x[gp.
idx + 2];
2810 ya[1] = y[gp.
idx + 1];
2811 ya[2] = y[gp.
idx + 2];
2814 else if (gp.
idx == N_x - 1) {
2827 polint(y_int, dy_int, xa, ya, 3, x_i);
2831 else if (interp_method == 2) {
2834 xa[1] = x[gp.
idx + 1];
2835 xa[2] = x[gp.
idx + 2];
2838 ya[1] = y[gp.
idx + 1];
2839 ya[2] = y[gp.
idx + 2];
2840 }
else if (gp.
idx == N_x - 1) {
2841 xa[0] = x[gp.
idx - 2];
2842 xa[1] = x[gp.
idx - 1];
2845 ya[0] = y[gp.
idx - 2];
2846 ya[1] = y[gp.
idx - 1];
2849 xa[0] = x[gp.
idx - 1];
2851 xa[2] = x[gp.
idx + 1];
2853 ya[0] = y[gp.
idx - 1];
2855 ya[2] = y[gp.
idx + 1];
2859 polint(y_int, dy_int, xa, ya, 3, x_i);
2862 else if (interp_method == 3) {
2865 xa[0] = -x[gp.
idx + 1];
2866 xa[1] = x[gp.
idx + 0];
2867 xa[2] = x[gp.
idx + 1];
2868 xa[3] = x[gp.
idx + 2];
2870 ya[0] = y[gp.
idx + 1];
2871 ya[1] = y[gp.
idx + 0];
2872 ya[2] = y[gp.
idx + 1];
2873 ya[3] = y[gp.
idx + 2];
2874 }
else if (gp.
idx == N_x - 1) {
2875 xa[0] = x[gp.
idx - 1];
2876 xa[1] = x[gp.
idx - 0];
2877 xa[2] = 2 * x[gp.
idx] - x[gp.
idx - 1];
2878 xa[3] = 2 * x[gp.
idx] - x[gp.
idx - 2];
2880 ya[0] = y[gp.
idx - 1];
2881 ya[1] = y[gp.
idx - 0];
2882 ya[2] = y[gp.
idx - 1];
2883 ya[3] = y[gp.
idx - 2];
2884 }
else if (gp.
idx == N_x - 2) {
2885 xa[0] = x[gp.
idx - 2];
2886 xa[1] = x[gp.
idx - 1];
2888 xa[3] = x[gp.
idx + 1];
2890 ya[0] = y[gp.
idx - 2];
2891 ya[1] = y[gp.
idx - 1];
2893 ya[3] = y[gp.
idx + 1];
2895 xa[0] = x[gp.
idx - 1];
2897 xa[2] = x[gp.
idx + 1];
2898 xa[3] = x[gp.
idx + 2];
2900 ya[0] = y[gp.
idx - 1];
2902 ya[2] = y[gp.
idx + 1];
2903 ya[3] = y[gp.
idx + 2];
2906 polint(y_int, dy_int, xa, ya, 4, x_i);
This file contains the definition of Array.
void arts_exit(int status)
This is the exit function of ARTS.
Index nelem() const ARTS_NOEXCEPT
#define ARTS_ASSERT(condition,...)
Index gridpos2gridrange(const GridPos &gp, const bool &upwards)
gridpos2gridrange
void gridpos_force_end_fd(GridPos &gp, const Index &n)
gridpos_force_end_fd
void gridpos(ArrayOfGridPos &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Numeric &extpolfac)
Set up a grid position Array.
void gridpos_check_fd(GridPos &gp)
gridpos_check_fd
void gridpos_upperend_check(GridPos &gp, const Index &ie)
gridpos_upperend_check
void interpweights(VectorView itw, const GridPos &tc)
Red 1D interpolation weights.
#define LOOPIT(x)
Macro for interpolation weight loops.
Numeric interp_poly(ConstVectorView x, ConstVectorView y, const Numeric &x_i, const GridPos &gp)
Polynomial interpolation.
const Numeric FD_TOL
The maximum difference from 1 that we allow for a sum check.
ostream & operator<<(ostream &os, const GridPos &gp)
Output operator for GridPos.
void polint(Numeric &y_int, Numeric &dy_int, ConstVectorView xa, ConstVectorView ya, const Index &n, const Numeric &x)
Polynomial interpolation.
bool is_gridpos_at_index_i(const GridPos &gp, const Index &i, const bool &strict)
is_gridpos_at_index_i
void gp4length1grid(ArrayOfGridPos &gp)
Grid position matching a grid of length 1.
Numeric interp(ConstVectorView itw, ConstVectorView a, const GridPos &tc)
Red 1D Interpolate.
void gridpos_copy(GridPos &gp_new, const GridPos &gp_old)
gridpos_copy
void gridpos_1to1(ArrayOfGridPos &gp, ConstVectorView grid)
gridpos_1to1
Numeric fractional_gp(const GridPos &gp)
fractional_gp
Header file for interpolation.cc.
Structure to store a grid position.
std::array< Numeric, 2 > fd