Skip to main content

solve_single_entries_neumann

Function solve_single_entries_neumann 

Source
pub fn solve_single_entries_neumann(
    matrix: &dyn Matrix,
    b: &[Precision],
    targets: &[usize],
    max_terms: usize,
    tolerance: Precision,
) -> Result<Vec<(usize, Precision)>>
Expand description

Batched variant — compute x[i] for every i in targets, sharing no per-target state. The orchestrator crate::contrastive::contrastive_solve_on_change is the natural caller: pass targets = closure_indices(matrix, &delta.indices, depth) and you get the candidate-set solution map for top-k anomaly ranking.

§Returns

Vec<(usize, Precision)> sorted ascending by index, suitable for feeding straight into crate::contrastive::find_anomalous_rows_in_subset after fanning out via a dense-vector materialisation step.

§Complexity

O(|targets| · max_terms · |closure_max| · branching). Still SubLinear in n when each per-target closure is bounded.