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

◆ nd_stats_value_index()

static int nd_stats_value_index ( const ND_STATS stats,
const int *  indexes 
)
inlinestatic

Definition at line 82 of file gserialized_estimate_support.h.

83{
84 int d;
85 int accum = 1;
86 int vdx = 0;
87
88 for (d = 0; d < (int)(stats->ndims); d++)
89 {
90 int size = (int)(stats->size[d]);
91 if (indexes[d] < 0 || indexes[d] >= size)
92 return -1;
93 vdx += indexes[d] * accum;
94 accum *= size;
95 }
96 return vdx;
97}

References ND_STATS_T::ndims, and ND_STATS_T::size.

Referenced by compute_gserialized_stats_mode(), estimate_join_selectivity(), estimate_selectivity(), and nd_stats_indexing_behaviour().

Here is the caller graph for this function: