ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
CmpEvaluatorCommon.cpp File Reference

Implementation of the shared HAVING gate_cmp evaluator machinery. More...

#include "CmpEvaluatorCommon.h"
#include <algorithm>
#include "having_semantics.hpp"
#include "provsql_utils.h"
Include dependency graph for CmpEvaluatorCommon.cpp:

Go to the source code of this file.

Namespaces

namespace  provsql

Functions

bool provsql::matchAggCmp (GenericCircuit &gc, gate_t cmp, AggCmpMatch &out)
 Try to match cmp against gate_cmp(gate_agg(α, semimod_i(K_i, m_i)*), gate_value(C)).
std::vector< unsigned > provsql::computeRefCounts (const GenericCircuit &gc)
 Reference count of every gate as a wire-target across the whole circuit.
double provsql::contributorProb (const GenericCircuit &gc, gate_t g, const std::vector< unsigned > &ref, bool &ok)
 Read-once marginal probability of a count/aggregate contributor (the K side of a semimod).

Detailed Description

Implementation of the shared HAVING gate_cmp evaluator machinery.

See CmpEvaluatorCommon.h.

Definition in file CmpEvaluatorCommon.cpp.