Skip to main content

recompute

Function recompute 

Source
pub fn recompute<E: From<MergeError>>(
    before: &impl RemovalView<Error = E>,
    after: &impl RemovalView<Error = E>,
    touched: impl IntoIterator<Item = RowId>,
) -> Result<RemovalResult, E>
Expand description

Recompute only the rows whose removal a change to touched can change: the touched rows and, through any chain, their children and rivals, in the union of the before/after views. Including old edges releases former losers and children when a claim/reference changes. Their parents and rivals in the after view, closed the same way, are evaluated with them, so proofs/merge.md B9 (Audience.lean, removal_local) gives exactly the full recomputation’s answer there. Every other row’s inputs and dependencies are unchanged, so its removal stands; a parent’s other children are never read. The caller must include admin changes’ rows among touched. No global row enumeration is performed by this function. Each competition group is expanded at most once in each view, so rivals are visited by group membership rather than by every pair of competing rows.