MCPcopy Create free account
hub / github.com/documentdb/documentdb / reverse_centroids

Function reverse_centroids

pg_documentdb/src/aggregation/bson_tdigest.c:157–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155
156
157static void
158reverse_centroids(centroid_t *centroids, int ncentroids)
159{
160 int start = 0,
161 end = (ncentroids - 1);
162
163 while (start < end)
164 {
165 centroid_t tmp = centroids[start];
166 centroids[start] = centroids[end];
167 centroids[end] = tmp;
168
169 start++;
170 end--;
171 }
172}
173
174
175static void

Callers 1

tdigest_sortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected