Skip to main content

para_graph_fixed

Function para_graph_fixed 

Source
pub fn para_graph_fixed<Extra, V: GraphValue, R: Clone>(
    converged: impl Fn(&R, &R) -> bool,
    f: impl Fn(&GraphQuery<V>, &Pattern<V>, &[R]) -> R,
    init: R,
    view: &GraphView<Extra, V>,
) -> HashMap<V::Id, R>
where V::Id: Eq + Hash + Clone,
Expand description

Fixed-point shape-aware fold for iterative convergence.

Iterates rounds of para_graph until converged(old, new) returns true for all elements, then returns the final map. Each element starts with init.clone().

Each round uses the same topo_shape_sort ordering (the GraphView is immutable). Within each round, already-processed elements’ results are available to later elements (Gauss-Seidel style).

Mirrors paraGraphFixed in the Haskell reference implementation.