Skip to main content

Module workbook

Module workbook 

Source
Expand description

Workbook-level dependency algorithms — the sheet dimension sheet-core’s single-sheet graph leaves to this crate.

Three questions, all answered over the union of per-sheet local edges (owned by each sheet’s sheet_core::DependencyGraph) and the engine’s cross-sheet edges:

  • topological_order — a total, deterministic evaluation order over every formula cell in the workbook (Kahn’s algorithm with a sorted frontier; ties break on (sheet, row, col)).
  • dirty_closure — the transitive dependents of an edit set, the minimal recompute set for incremental recalculation.
  • circular_members — the exact cycle membership among the cells Kahn’s algorithm left unordered (Kosaraju’s algorithm; a cell counts when it sits on a multi-cell cycle or references itself).

All functions are pure walks over engine state: no mutation, no recursion (explicit stacks — formula chains are unbounded), and deterministic output for deterministic input.