Compute start and count for getting a subset of x.
Given a grid x
we find x_start
and x_count
so that [subset_x_min, subset_x_max]
is in [x[x_start], x[x_start + x_count]]
.
x_start
and x_count
define the smallest subset of x
with this property.
Note that x_start + x_count <= x.size()
as long as x
is strictly increasing.
- Parameters
-
[in] | x | input grid (defined interpolation domain) |
[in] | subset_x_min | minimum x of a subset (interpolation range) |
[in] | subset_x_max | maxumum x of a subset (interpolation range) |
[out] | x_start | starting index |
[out] | x_count | number of elements required |
Definition at line 50 of file LocalInterpCtx.cc.
Referenced by pism::LocalInterpCtx::LocalInterpCtx().