nag_2d_panel_sort (e02zac) sorts two-dimensional data into rectangular panels.
A set of
data points with rectangular Cartesian coordinates
are sorted into panels defined by lines parallel to the
and
axes. The intercepts of these lines on the
and
axes are given in
, for
and
, for
, respectively. The function orders the data so that all points in a panel occur before data in succeeding panels, where the panels are numbered from bottom to top and then left to right, with the usual arrangement of axes, as shown in the diagram. Within a panel the points maintain their original order.
Figure 1
A data point lying exactly on one or more panel sides is taken to be in the highest-numbered panel adjacent to the point. The function does not physically rearrange the data, but provides the array
point which contains a linked list for each panel, pointing to the data in that panel. The total number of panels is
.
None.
Not applicable.
Not applicable.
This function was written to sort two-dimensional data in the manner required by function
nag_2d_spline_fit_panel (e02dac). The first
arguments of nag_2d_panel_sort (e02zac) are the same as the arguments in
nag_2d_spline_fit_panel (e02dac) which have the same name.
This example reads in data points and the intercepts of the panel sides on the
and
axes; it calls nag_2d_panel_sort (e02zac) to set up the index array
point; and finally it prints the data points in panel order.