PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void quantile_llist_index_update ( struct quantile_llist qll,
struct quantile_llist_element qle,
uint32_t  idx 
)
static

Definition at line 4045 of file rt_api.c.

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().

4045  {
4046  uint32_t anchor = (uint32_t) floor(idx / 100);
4047 
4048  if (qll->tail == qle) return;
4049 
4050  if (
4051  (anchor != 0) && (
4052  NULL == qll->index[anchor].element ||
4053  idx <= qll->index[anchor].index
4054  )
4055  ) {
4056  qll->index[anchor].index = idx;
4057  qll->index[anchor].element = qle;
4058  }
4059 
4060  if (anchor != 0 && NULL == qll->index[0].element) {
4061  qll->index[0].index = 0;
4062  qll->index[0].element = qll->head;
4063  }
4064 }
struct quantile_llist_element * element
Definition: rt_api.h:2335
struct quantile_llist_element * tail
Definition: rt_api.h:2315
struct quantile_llist_index * index
Definition: rt_api.h:2319
struct quantile_llist_element * head
Definition: rt_api.h:2314

Here is the caller graph for this function: