Chunk-native, memory-bounded decimation to an exact target count.
Design: positions resident; KD blocks as an IO pattern only; per-block exact global 16-NN +
edge costs (GPU when a device is supplied) reduced to K resident
candidates; global bucketed greedy matching with chain closure; a second
heavy pass moment-matches groups and streams the output.
The returned source supports a single sequential pass (it computes the
merge stream on demand) — the PLY-terminal consumption model. Its close
releases the input source and any intermediate spill files. Deep targets
run multiple generations; intermediates land in RAM when small enough,
else in temp PLY spills under opts.spill.scratchDir.
Chunk-native, memory-bounded decimation to an exact target count.
Design: positions resident; KD blocks as an IO pattern only; per-block exact global 16-NN + edge costs (GPU when a device is supplied) reduced to K resident candidates; global bucketed greedy matching with chain closure; a second heavy pass moment-matches groups and streams the output.
The returned source supports a single sequential pass (it computes the merge stream on demand) — the PLY-terminal consumption model. Its
closereleases the input source and any intermediate spill files. Deep targets run multiple generations; intermediates land in RAM when small enough, else in temp PLY spills underopts.spill.scratchDir.