PostGIS 3.7.0dev-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 899 of file rt_statistics.c.

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

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: