Skip to contents

Assigns each row to its nearest supplied center in two streaming passes. The resulting float32 rows are contiguous by posting and retain one-based original row IDs. This builds storage only; it does not perform KNN search or certify the quality of the supplied centers.

Usage

massive_coarse_postings(
  x,
  centers,
  output,
  chunk_rows = NULL,
  n.cores = 1L,
  memory_limit = "1GB",
  checkpoint = FALSE,
  resume = FALSE,
  checkpoint_every = 100L
)

Arguments

x

A file-backed massive_matrix() descriptor.

centers

Finite matrix with one center per row and one column per input feature.

output

New prefix for .features.f32, .ids.u32, .offsets.u64, and .manifest.rds files.

chunk_rows

Maximum rows in one read block.

n.cores

CPU workers used for nearest-center assignment.

memory_limit

Conservative algorithm-buffer RAM budget.

checkpoint

Save a resumable posting-list checkpoint.

resume

Continue a matching interrupted build.

checkpoint_every

Save after this many write-pass blocks.

Value

A lightweight posting-list descriptor.