PostGIS 3.6.2dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ quantile_llist_index_update()

static void quantile_llist_index_update ( struct quantile_llist qll,
struct quantile_llist_element qle,
uint32_t  idx 
)
static

Definition at line 898 of file rt_statistics.c.

898 {
899 uint32_t anchor = (uint32_t) floor(idx / 100);
900
901 if (qll->tail == qle) return;
902
903 if (
904 (anchor != 0) && (
905 NULL == qll->index[anchor].element ||
906 idx <= qll->index[anchor].index
907 )
908 ) {
909 qll->index[anchor].index = idx;
910 qll->index[anchor].element = qle;
911 }
912
913 if (anchor != 0 && NULL == qll->index[0].element) {
914 qll->index[0].index = 0;
915 qll->index[0].element = qll->head;
916 }
917}
struct quantile_llist_element * element
Definition librtcore.h:2608
struct quantile_llist_element * head
Definition librtcore.h:2587
struct quantile_llist_element * tail
Definition librtcore.h:2588
struct quantile_llist_index * index
Definition librtcore.h:2592

References quantile_llist_index::element, quantile_llist::head, quantile_llist::index, quantile_llist_index::index, and quantile_llist::tail.

Referenced by rt_band_get_quantiles_stream().

Here is the caller graph for this function: