44DEBUG_ONLY(
const Numeric sum_check_epsilon = 1e-6;)
68#define LOOPIT(x) for (const Numeric* x = &t##x.fd[1]; x >= &t##x.fd[0]; --x)
80 os << gp.
idx <<
" " << gp.
fd[0] <<
" " << gp.
fd[1] <<
"\n";
140 ConstVectorView old_grid,
141 ConstVectorView new_grid,
142 const Numeric& extpolfac) {
143 const Index n_old = old_grid.nelem();
144 const Index n_new = new_grid.nelem();
162 bool ascending = (old_grid[0] <= old_grid[1]);
175 const Numeric og_min =
176 old_grid[0] - extpolfac * (old_grid[1] - old_grid[0]);
177 const Numeric og_max =
178 old_grid[n_old - 1] +
179 extpolfac * (old_grid[n_old - 1] - old_grid[n_old - 2]);
192 Numeric frac = (new_grid[0] - og_min) / (og_max - og_min);
199 Index current_position = (Index)rint(frac * (Numeric)(n_old - 2));
211 Numeric lower = old_grid[current_position];
212 Numeric upper = old_grid[current_position + 1];
215 for (Index i_new = 0; i_new < n_new; ++i_new) {
219 const Numeric tng = new_grid[i_new];
234 if (tng < lower && current_position > 0) {
237 lower = old_grid[current_position];
238 }
while (tng < lower && current_position > 0);
240 upper = old_grid[current_position + 1];
242 tgp.
idx = current_position;
243 tgp.
fd[0] = (tng - lower) / (upper - lower);
244 tgp.
fd[1] = 1.0 - tgp.
fd[0];
249 if (tng >= upper && current_position < n_old - 2) {
252 upper = old_grid[current_position + 1];
253 }
while (tng >= upper && current_position < n_old - 2);
255 lower = old_grid[current_position];
257 tgp.
idx = current_position;
258 tgp.
fd[0] = (tng - lower) / (upper - lower);
259 tgp.
fd[1] = 1.0 - tgp.
fd[0];
269 tgp.
idx = current_position;
270 tgp.
fd[0] = (tng - lower) / (upper - lower);
271 tgp.
fd[1] = 1.0 - tgp.
fd[0];
293 const Numeric og_max =
294 old_grid[0] - extpolfac * (old_grid[1] - old_grid[0]);
295 const Numeric og_min =
296 old_grid[n_old - 1] +
297 extpolfac * (old_grid[n_old - 1] - old_grid[n_old - 2]);
301 Numeric frac = 1 - (new_grid[0] - og_min) / (og_max - og_min);
307 Index current_position = (Index)rint(frac * (Numeric)(n_old - 2));
319 Numeric lower = old_grid[current_position];
320 Numeric upper = old_grid[current_position + 1];
322 for (Index i_new = 0; i_new < n_new; ++i_new) {
324 const Numeric tng = new_grid[i_new];
338 if (tng > lower && current_position > 0) {
341 lower = old_grid[current_position];
342 }
while (tng > lower && current_position > 0);
344 upper = old_grid[current_position + 1];
346 tgp.
idx = current_position;
347 tgp.
fd[0] = (tng - lower) / (upper - lower);
348 tgp.
fd[1] = 1.0 - tgp.
fd[0];
352 if (tng <= upper && current_position < n_old - 2) {
355 upper = old_grid[current_position + 1];
356 }
while (tng <= upper && current_position < n_old - 2);
358 lower = old_grid[current_position];
360 tgp.
idx = current_position;
361 tgp.
fd[0] = (tng - lower) / (upper - lower);
362 tgp.
fd[1] = 1.0 - tgp.
fd[0];
373 tgp.
idx = current_position;
374 tgp.
fd[0] = (tng - lower) / (upper - lower);
375 tgp.
fd[1] = 1.0 - tgp.
fd[0];
408 ConstVectorView old_grid,
409 const Numeric& new_grid,
410 const Numeric& extpolfac) {
412 Vector
v(1, new_grid);
413 gridpos(agp, old_grid,
v, extpolfac);
433 const Index n = grid.nelem();
436 for (Index i = 0; i < n - 1; i++) {
441 gp[n - 1].idx = n - 2;
458 gp_new.
fd[0] = gp_old.
fd[0];
459 gp_new.
fd[1] = gp_old.
fd[1];
476 return (Numeric(gp.
idx) + gp.
fd[0]);
499 if (gp.
fd[0] < 0.0) {
502 }
else if (gp.
fd[0] > 1.0) {
507 if (gp.
fd[1] < 0.0) {
510 }
else if (gp.
fd[1] > 1.0) {
542 if (gp.
fd[0] > 0.5) {
551 if (gp.
idx == n - 1) {
596 for (Index i = 0; i < gp.
nelem(); i++) {
597 if (gp[i].idx == ie) {
620 for (Index i = 0; i < gp.
nelem(); i++) {
642 const bool& strict) {
646 if (gp.
idx == i && gp.
fd[0] == 0) {
648 }
else if (gp.
idx == i - 1 && gp.
fd[1] == 0) {
685 if (gp.
fd[0] > 0 && gp.
fd[1] > 0) {
690 else if (gp.
fd[0] == 0) {
786 itw[iti] = (*r) * (*c);
818 itw[iti] = (*p) * (*r) * (*c);
853 itw[iti] = (*b) * (*p) * (*r) * (*c);
891 itw[iti] = (*s) * (*b) * (*p) * (*r) * (*c);
932 itw[iti] = (*v) * (*s) * (*b) * (*p) * (*r) * (*c);
959 ARTS_ASSERT(is_same_within_epsilon(sum(itw), 1, sum_check_epsilon));
965 for (Index
c = 0;
c < 2; ++
c) {
966 tia +=
a[tc.
idx +
c] * itw[iti];
999 ARTS_ASSERT(is_same_within_epsilon(sum(itw), 1, sum_check_epsilon));
1005 for (Index r = 0; r < 2; ++r)
1006 for (Index
c = 0;
c < 2; ++
c) {
1007 tia +=
a(tr.
idx + r, tc.
idx +
c) * itw[iti];
1042 ARTS_ASSERT(is_same_within_epsilon(sum(itw), 1, sum_check_epsilon));
1048 for (Index p = 0; p < 2; ++p)
1049 for (Index r = 0; r < 2; ++r)
1050 for (Index
c = 0;
c < 2; ++
c) {
1051 tia +=
a(tp.
idx + p, tr.
idx + r, tc.
idx +
c) * itw[iti];
1088 ARTS_ASSERT(is_same_within_epsilon(sum(itw), 1, sum_check_epsilon));
1094 for (Index
b = 0;
b < 2; ++
b)
1095 for (Index p = 0; p < 2; ++p)
1096 for (Index r = 0; r < 2; ++r)
1097 for (Index
c = 0;
c < 2; ++
c) {
1138 ARTS_ASSERT(is_same_within_epsilon(sum(itw), 1, sum_check_epsilon));
1144 for (Index s = 0; s < 2; ++s)
1145 for (Index
b = 0;
b < 2; ++
b)
1146 for (Index p = 0; p < 2; ++p)
1147 for (Index r = 0; r < 2; ++r)
1148 for (Index
c = 0;
c < 2; ++
c) {
1149 tia +=
a(ts.
idx + s,
1195 ARTS_ASSERT(is_same_within_epsilon(sum(itw), 1, sum_check_epsilon));
1201 for (Index
v = 0;
v < 2; ++
v)
1202 for (Index s = 0; s < 2; ++s)
1203 for (Index
b = 0;
b < 2; ++
b)
1204 for (Index p = 0; p < 2; ++p)
1205 for (Index r = 0; r < 2; ++r)
1206 for (Index
c = 0;
c < 2; ++
c) {
1207 tia +=
a(tv.
idx +
v,
1241 Index n = cgp.
nelem();
1246 for (Index i = 0; i < n; ++i) {
1312 Index n = cgp.
nelem();
1318 for (Index i = 0; i < n; ++i) {
1334 itw(i, iti) = (*r) * (*c);
1367 Index n = cgp.
nelem();
1374 for (Index i = 0; i < n; ++i) {
1384 itw(i, iti) = (*p) * (*r) * (*c);
1419 Index n = cgp.
nelem();
1427 for (Index i = 0; i < n; ++i) {
1439 itw(i, iti) = (*b) * (*p) * (*r) * (*c);
1476 Index n = cgp.
nelem();
1485 for (Index i = 0; i < n; ++i) {
1499 itw(i, iti) = (*s) * (*b) * (*p) * (*r) * (*c);
1538 Index n = cgp.
nelem();
1548 for (Index i = 0; i < n; ++i) {
1564 itw(i, iti) = (*v) * (*s) * (*b) * (*p) * (*r) * (*c);
1588 ConstMatrixView itw,
1591 Index n = cgp.
nelem();
1600 is_same_within_epsilon(sum(itw(0, Range(joker))), 1, sum_check_epsilon));
1603 for (Index i = 0; i < n; ++i) {
1609 Numeric& tia = ia[i];
1613 for (Index
c = 0;
c < 2; ++
c) {
1615 tia +=
a(tc.
idx +
c) * itw(i, iti);
1644 ConstMatrixView itw,
1648 Index n = cgp.
nelem();
1658 is_same_within_epsilon(sum(itw(0, Range(joker))), 1, sum_check_epsilon));
1661 for (Index i = 0; i < n; ++i) {
1668 Numeric& tia = ia[i];
1672 for (Index r = 0; r < 2; ++r)
1673 for (Index
c = 0;
c < 2; ++
c) {
1674 tia +=
a(tr.
idx + r, tc.
idx +
c) * itw(i, iti);
1704 ConstMatrixView itw,
1709 Index n = cgp.
nelem();
1720 is_same_within_epsilon(sum(itw(0, Range(joker))), 1, sum_check_epsilon));
1723 for (Index i = 0; i < n; ++i) {
1731 Numeric& tia = ia[i];
1735 for (Index p = 0; p < 2; ++p)
1736 for (Index r = 0; r < 2; ++r)
1737 for (Index
c = 0;
c < 2; ++
c) {
1738 tia +=
a(tp.
idx + p, tr.
idx + r, tc.
idx +
c) * itw(i, iti);
1769 ConstMatrixView itw,
1775 Index n = cgp.
nelem();
1787 is_same_within_epsilon(sum(itw(0, Range(joker))), 1, sum_check_epsilon));
1790 for (Index i = 0; i < n; ++i) {
1799 Numeric& tia = ia[i];
1803 for (Index
b = 0;
b < 2; ++
b)
1804 for (Index p = 0; p < 2; ++p)
1805 for (Index r = 0; r < 2; ++r)
1806 for (Index
c = 0;
c < 2; ++
c) {
1840 ConstMatrixView itw,
1847 Index n = cgp.
nelem();
1860 is_same_within_epsilon(sum(itw(0, Range(joker))), 1, sum_check_epsilon));
1863 for (Index i = 0; i < n; ++i) {
1873 Numeric& tia = ia[i];
1877 for (Index s = 0; s < 2; ++s)
1878 for (Index
b = 0;
b < 2; ++
b)
1879 for (Index p = 0; p < 2; ++p)
1880 for (Index r = 0; r < 2; ++r)
1881 for (Index
c = 0;
c < 2; ++
c) {
1882 tia +=
a(ts.
idx + s,
1920 ConstMatrixView itw,
1928 Index n = cgp.
nelem();
1942 is_same_within_epsilon(sum(itw(0, Range(joker))), 1, sum_check_epsilon));
1945 for (Index i = 0; i < n; ++i) {
1956 Numeric& tia = ia[i];
1960 for (Index
v = 0;
v < 2; ++
v)
1961 for (Index s = 0; s < 2; ++s)
1962 for (Index
b = 0;
b < 2; ++
b)
1963 for (Index p = 0; p < 2; ++p)
1964 for (Index r = 0; r < 2; ++r)
1965 for (Index
c = 0;
c < 2; ++
c) {
1966 tia +=
a(tv.
idx +
v,
2007 Index nr = rgp.
nelem();
2008 Index nc = cgp.
nelem();
2013 for (Index ir = 0; ir < nr; ++ir) {
2017 for (Index ic = 0; ic < nc; ++ic) {
2032 itw(ir, ic, iti) = (*r) * (*c);
2066 Index np = pgp.
nelem();
2067 Index nr = rgp.
nelem();
2068 Index nc = cgp.
nelem();
2073 for (Index ip = 0; ip < np; ++ip) {
2075 for (Index ir = 0; ir < nr; ++ir) {
2077 for (Index ic = 0; ic < nc; ++ic) {
2085 itw(ip, ir, ic, iti) = (*p) * (*r) * (*c);
2122 Index nb = bgp.
nelem();
2123 Index np = pgp.
nelem();
2124 Index nr = rgp.
nelem();
2125 Index nc = cgp.
nelem();
2130 for (Index ib = 0; ib < nb; ++ib) {
2132 for (Index ip = 0; ip < np; ++ip) {
2134 for (Index ir = 0; ir < nr; ++ir) {
2136 for (Index ic = 0; ic < nc; ++ic) {
2145 itw(ib, ip, ir, ic, iti) = (*b) * (*p) * (*r) * (*c);
2185 Index ns = sgp.
nelem();
2186 Index nb = bgp.
nelem();
2187 Index np = pgp.
nelem();
2188 Index nr = rgp.
nelem();
2189 Index nc = cgp.
nelem();
2191 ARTS_ASSERT(is_size(itw, ns, nb, np, nr, nc, 32));
2194 for (Index is = 0; is < ns; ++is) {
2196 for (Index ib = 0; ib < nb; ++ib) {
2198 for (Index ip = 0; ip < np; ++ip) {
2200 for (Index ir = 0; ir < nr; ++ir) {
2202 for (Index ic = 0; ic < nc; ++ic) {
2212 itw(is, ib, ip, ir, ic, iti) =
2213 (*s) * (*b) * (*p) * (*r) * (*c);
2256 Index nv = vgp.
nelem();
2257 Index ns = sgp.
nelem();
2258 Index nb = bgp.
nelem();
2259 Index np = pgp.
nelem();
2260 Index nr = rgp.
nelem();
2261 Index nc = cgp.
nelem();
2263 ARTS_ASSERT(is_size(itw, nv, ns, nb, np, nr, nc, 64));
2266 for (Index iv = 0; iv < nv; ++iv) {
2268 for (Index is = 0; is < ns; ++is) {
2270 for (Index ib = 0; ib < nb; ++ib) {
2272 for (Index ip = 0; ip < np; ++ip) {
2274 for (Index ir = 0; ir < nr; ++ir) {
2276 for (Index ic = 0; ic < nc; ++ic) {
2287 itw(iv, is, ib, ip, ir, ic, iti) =
2288 (*v) * (*s) * (*b) * (*p) * (*r) * (*c);
2322 ConstTensor3View itw,
2326 Index nr = rgp.
nelem();
2327 Index nc = cgp.
nelem();
2336 sum(itw(0, 0, Range(joker))), 1, sum_check_epsilon));
2339 for (Index ir = 0; ir < nr; ++ir) {
2343 for (Index ic = 0; ic < nc; ++ic) {
2349 Numeric& tia = ia(ir, ic);
2353 for (Index r = 0; r < 2; ++r)
2354 for (Index
c = 0;
c < 2; ++
c) {
2357 tia +=
a(tr.
idx + r, tc.
idx +
c) * itw(ir, ic, iti);
2388 ConstTensor4View itw,
2393 Index np = pgp.
nelem();
2394 Index nr = rgp.
nelem();
2395 Index nc = cgp.
nelem();
2403 sum(itw(0, 0, 0, Range(joker))), 1, sum_check_epsilon));
2406 for (Index ip = 0; ip < np; ++ip) {
2408 for (Index ir = 0; ir < nr; ++ir) {
2410 for (Index ic = 0; ic < nc; ++ic) {
2416 Numeric& tia = ia(ip, ir, ic);
2420 for (Index p = 0; p < 2; ++p)
2421 for (Index r = 0; r < 2; ++r)
2422 for (Index
c = 0;
c < 2; ++
c) {
2427 itw(ip, ir, ic, iti);
2460 ConstTensor5View itw,
2466 Index nb = bgp.
nelem();
2467 Index np = pgp.
nelem();
2468 Index nr = rgp.
nelem();
2469 Index nc = cgp.
nelem();
2477 sum(itw(0, 0, 0, 0, Range(joker))), 1, sum_check_epsilon));
2480 for (Index ib = 0; ib < nb; ++ib) {
2482 for (Index ip = 0; ip < np; ++ip) {
2484 for (Index ir = 0; ir < nr; ++ir) {
2486 for (Index ic = 0; ic < nc; ++ic) {
2492 Numeric& tia = ia(ib, ip, ir, ic);
2496 for (Index
b = 0;
b < 2; ++
b)
2497 for (Index p = 0; p < 2; ++p)
2498 for (Index r = 0; r < 2; ++r)
2499 for (Index
c = 0;
c < 2; ++
c) {
2501 itw(ib, ip, ir, ic, iti);
2536 ConstTensor6View itw,
2543 Index ns = sgp.
nelem();
2544 Index nb = bgp.
nelem();
2545 Index np = pgp.
nelem();
2546 Index nr = rgp.
nelem();
2547 Index nc = cgp.
nelem();
2549 ARTS_ASSERT(is_size(itw, ns, nb, np, nr, nc, 32));
2555 sum(itw(0, 0, 0, 0, 0, Range(joker))), 1, sum_check_epsilon));
2558 for (Index is = 0; is < ns; ++is) {
2560 for (Index ib = 0; ib < nb; ++ib) {
2562 for (Index ip = 0; ip < np; ++ip) {
2564 for (Index ir = 0; ir < nr; ++ir) {
2566 for (Index ic = 0; ic < nc; ++ic) {
2572 Numeric& tia = ia(is, ib, ip, ir, ic);
2576 for (Index s = 0; s < 2; ++s)
2577 for (Index
b = 0;
b < 2; ++
b)
2578 for (Index p = 0; p < 2; ++p)
2579 for (Index r = 0; r < 2; ++r)
2580 for (Index
c = 0;
c < 2; ++
c) {
2581 tia +=
a(ts.
idx + s,
2586 itw(is, ib, ip, ir, ic, iti);
2623 ConstTensor7View itw,
2631 Index nv = vgp.
nelem();
2632 Index ns = sgp.
nelem();
2633 Index nb = bgp.
nelem();
2634 Index np = pgp.
nelem();
2635 Index nr = rgp.
nelem();
2636 Index nc = cgp.
nelem();
2638 ARTS_ASSERT(is_size(itw, nv, ns, nb, np, nr, nc, 64));
2644 sum(itw(0, 0, 0, 0, 0, 0, Range(joker))), 1, sum_check_epsilon));
2647 for (Index iv = 0; iv < nv; ++iv) {
2649 for (Index is = 0; is < ns; ++is) {
2651 for (Index ib = 0; ib < nb; ++ib) {
2653 for (Index ip = 0; ip < np; ++ip) {
2655 for (Index ir = 0; ir < nr; ++ir) {
2657 for (Index ic = 0; ic < nc; ++ic) {
2663 Numeric& tia = ia(iv, is, ib, ip, ir, ic);
2667 for (Index
v = 0;
v < 2; ++
v)
2668 for (Index s = 0; s < 2; ++s)
2669 for (Index
b = 0;
b < 2; ++
b)
2670 for (Index p = 0; p < 2; ++p)
2671 for (Index r = 0; r < 2; ++r)
2672 for (Index
c = 0;
c < 2; ++
c) {
2673 tia +=
a(tv.
idx +
v,
2679 itw(iv, is, ib, ip, ir, ic, iti);
2718 Numeric den, dif, dift, ho, hp,
w;
2720 dif = abs(x - xa[0]);
2726 for (Index i = 0; i < n; i++) {
2727 if ((dift = abs(x - xa[i])) < dif) {
2738 for (Index m = 1; m < n; m++) {
2739 for (Index i = 0; i < n - m; i++) {
2742 w =
c[i + 1] -
d[i];
2750 y_int += (dy_int = (2 * (ns + 1) < (n - m) ?
c[ns + 1] :
d[ns--]));
2774 Index N_x = x.nelem();
2779 Vector xa(4), ya(4);
2788 Index interp_method = 1;
2790 if (interp_method == 1) {
2792 if ((gp.
fd[0] <= 0.5 && gp.
idx > 0) || gp.
idx == N_x - 2) {
2793 xa[0] = x[gp.
idx - 1];
2795 xa[2] = x[gp.
idx + 1];
2797 ya[0] = y[gp.
idx - 1];
2799 ya[2] = y[gp.
idx + 1];
2802 else if ((gp.
fd[0] > 0.5 && gp.
idx < N_x - 2) || gp.
idx == 0) {
2804 xa[1] = x[gp.
idx + 1];
2805 xa[2] = x[gp.
idx + 2];
2808 ya[1] = y[gp.
idx + 1];
2809 ya[2] = y[gp.
idx + 2];
2812 else if (gp.
idx == N_x - 1) {
2825 polint(y_int, dy_int, xa, ya, 3, x_i);
2829 else if (interp_method == 2) {
2832 xa[1] = x[gp.
idx + 1];
2833 xa[2] = x[gp.
idx + 2];
2836 ya[1] = y[gp.
idx + 1];
2837 ya[2] = y[gp.
idx + 2];
2838 }
else if (gp.
idx == N_x - 1) {
2839 xa[0] = x[gp.
idx - 2];
2840 xa[1] = x[gp.
idx - 1];
2843 ya[0] = y[gp.
idx - 2];
2844 ya[1] = y[gp.
idx - 1];
2847 xa[0] = x[gp.
idx - 1];
2849 xa[2] = x[gp.
idx + 1];
2851 ya[0] = y[gp.
idx - 1];
2853 ya[2] = y[gp.
idx + 1];
2857 polint(y_int, dy_int, xa, ya, 3, x_i);
2860 else if (interp_method == 3) {
2863 xa[0] = -x[gp.
idx + 1];
2864 xa[1] = x[gp.
idx + 0];
2865 xa[2] = x[gp.
idx + 1];
2866 xa[3] = x[gp.
idx + 2];
2868 ya[0] = y[gp.
idx + 1];
2869 ya[1] = y[gp.
idx + 0];
2870 ya[2] = y[gp.
idx + 1];
2871 ya[3] = y[gp.
idx + 2];
2872 }
else if (gp.
idx == N_x - 1) {
2873 xa[0] = x[gp.
idx - 1];
2874 xa[1] = x[gp.
idx - 0];
2875 xa[2] = 2 * x[gp.
idx] - x[gp.
idx - 1];
2876 xa[3] = 2 * x[gp.
idx] - x[gp.
idx - 2];
2878 ya[0] = y[gp.
idx - 1];
2879 ya[1] = y[gp.
idx - 0];
2880 ya[2] = y[gp.
idx - 1];
2881 ya[3] = y[gp.
idx - 2];
2882 }
else if (gp.
idx == N_x - 2) {
2883 xa[0] = x[gp.
idx - 2];
2884 xa[1] = x[gp.
idx - 1];
2886 xa[3] = x[gp.
idx + 1];
2888 ya[0] = y[gp.
idx - 2];
2889 ya[1] = y[gp.
idx - 1];
2891 ya[3] = y[gp.
idx + 1];
2893 xa[0] = x[gp.
idx - 1];
2895 xa[2] = x[gp.
idx + 1];
2896 xa[3] = x[gp.
idx + 2];
2898 ya[0] = y[gp.
idx - 1];
2900 ya[2] = y[gp.
idx + 1];
2901 ya[3] = y[gp.
idx + 2];
2904 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