Skip to contents

Runs a file-backed local-moving level, externally contracts its edges, and keeps higher contracted levels file-backed until a level passes a conservative resident-memory check. At that point it reuses graph_cluster(). Original graph and final labels remain on disk. With checkpoint = TRUE, completed first-level and contraction files can be reused by resume = TRUE after validating input, control, and native-library identities. An interrupted individual scan or higher level is not yet resumable; its partial files remain for inspection. Mapped label pages may contribute to RSS beyond scan buffers.

Usage

massive_louvain(
  graph,
  output,
  max_passes = 10L,
  resolution = 1,
  seed = 1L,
  chunk_rows = 8192L,
  memory_limit = "1GB",
  backend = "cpu",
  checkpoint = FALSE,
  resume = FALSE,
  initial = NULL
)

Arguments

graph

A symmetric result of massive_umap_fuzzy_graph().

output

New path for one-based uint32 final cluster labels.

max_passes

Maximum local-moving sweeps per Louvain level.

resolution

Positive modularity resolution.

seed

Nonnegative random seed.

chunk_rows

Maximum consecutive graph rows per scan block.

memory_limit

RAM budget for scan buffers and resident levels.

backend

Only "cpu" is implemented; other requests fail.

checkpoint

Save completed first-level and contraction stages.

resume

Reuse a matching checkpoint; requires checkpoint = TRUE.

initial

Optional massive_cluster_landmarks() result whose saved labels initialize local moves. Its row order must match graph.

Value

Lightweight file-backed Louvain result with modularity.