30#ifndef PROVSQL_EXPECTATION_H
31#define PROVSQL_EXPECTATION_H
73 std::optional<gate_t> event_root = std::nullopt);
82 std::optional<gate_t> event_root = std::nullopt);
95 std::optional<gate_t> event_root = std::nullopt);
112 std::optional<gate_t> event_root = std::nullopt);
139 std::optional<gate_t> &event_opt);
gate_t
Strongly-typed gate identifier.
Semiring-agnostic in-memory provenance circuit.
virtual char const * what() const noexcept
Return the error message as a C-string.
CircuitException(const std::string &m)
Construct with a descriptive error message.
NoValueException(const std::string &what)
Construct for the quantity what.
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.
double compute_quantile(const GenericCircuit &gc, gate_t root, double p, std::optional< gate_t > event_root)
Compute the p-quantile of the scalar rooted at root (of the truncated distribution if event_root is ...
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.