MCPcopy Create free account
hub / github.com/microsoft/SandDance / processPartition

Function processPartition

docs/tests/v2/es6/js/sanddance.js:93281–93305  ·  view source on GitHub ↗
(list, state, cmp, _)

Source from the content-addressed store, hash-verified

93279};
93280
93281function processPartition(list, state, cmp, _) {
93282 var sort = _.sort,
93283 range = sort && !_.ignorePeers,
93284 frame = _.frame || [null, 0],
93285 data = list.data(cmp),
93286 // use cmp for stable sort
93287 n = data.length,
93288 i = 0,
93289 b = range ? (0, _d3Array.bisector)(sort) : null,
93290 w = {
93291 i0: 0,
93292 i1: 0,
93293 p0: 0,
93294 p1: 0,
93295 index: 0,
93296 data: data,
93297 compare: sort || (0, _vegaUtil.constant)(-1)
93298 };
93299
93300 for (state.init(); i < n; ++i) {
93301 setWindow(w, frame, i, n);
93302 if (range) adjustRange(w, b);
93303 state.update(w, data[i]);
93304 }
93305}
93306
93307function setWindow(w, f, i, n) {
93308 w.p0 = w.i0;

Callers 1

sanddance.jsFile · 0.70

Calls 3

setWindowFunction · 0.70
adjustRangeFunction · 0.70
updateMethod · 0.45

Tested by

no test coverage detected