Causality Analyzer
    Preparing search index...

    Junction Tree Belief Propagation.

    Computes all marginals in one pass by:

    1. Moralizing and triangulating the graph
    2. Building a junction tree of cliques
    3. Running Hugin message passing (collect + distribute)

    For small-to-medium networks (≤50 variables), this is more efficient than running variable elimination for each query.

    interface JunctionTreeResult {
        messageCount: number;
        posteriors: Map<string, Map<number, number>>;
    }
    Index
    messageCount: number

    Number of messages passed

    posteriors: Map<string, Map<number, number>>

    Posterior for each variable: value → probability