30#ifndef PROVSQL_EXPECTATION_H
31#define PROVSQL_EXPECTATION_H
58 std::optional<gate_t> event_root = std::nullopt);
67 std::optional<gate_t> event_root = std::nullopt);
80 std::optional<gate_t> event_root = std::nullopt);
107 std::optional<gate_t> &event_opt);
gate_t
Strongly-typed gate identifier.
Semiring-agnostic in-memory provenance circuit.
double compute_raw_moment(const GenericCircuit &gc, gate_t root, unsigned k, std::optional< gate_t > event_root)
Compute the raw moment (or if event_root is set) for k >= 0.
gate_t lift_conditioning(GenericCircuit &gc, gate_t root, std::optional< gate_t > &event_opt)
Lift conditioning out of a scalar arithmetic expression.
double compute_central_moment(const GenericCircuit &gc, gate_t root, unsigned k, std::optional< gate_t > event_root)
Compute the central moment (or if event_root is set).
double evaluateBooleanProbability(const GenericCircuit &gc, gate_t boolRoot)
Probability that the Boolean subcircuit rooted at boolRoot evaluates to true under the tuple-independ...
double compute_expectation(const GenericCircuit &gc, gate_t root, std::optional< gate_t > event_root)
Compute (or if event_root is set) over the scalar sub-circuit rooted at root.