![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Generic directed-acyclic-graph circuit template and gate identifier. More...
#include <unordered_map>#include <unordered_set>#include <iostream>#include <set>#include <vector>#include <type_traits>

Go to the source code of this file.
Classes | |
| class | Circuit< gateType > |
| Generic template base class for provenance circuits. More... | |
| class | CircuitException |
| Exception type thrown by circuit operations on invalid input. More... | |
Enumerations | |
| enum class | gate_t : size_t |
| Strongly-typed gate identifier. More... | |
Functions | |
| gate_t & | operator++ (gate_t &g) |
Pre-increment operator for gate_t. | |
| bool | operator< (gate_t t, std::vector< gate_t >::size_type u) |
Compare a gate_t against a std::vector size type. | |
| std::string | to_string (gate_t g) |
Convert a gate_t to its decimal string representation. | |
| std::istream & | operator>> (std::istream &i, gate_t &g) |
Read a gate_t from an input stream. | |
| std::ostream & | operator<< (std::ostream &o, gate_t g) |
Write a gate_t to an output stream as its decimal value. | |
Generic directed-acyclic-graph circuit template and gate identifier.
This header provides two central abstractions:
A strongly-typed wrapper around size_t used as a compact gate identifier within a circuit. Using a distinct type prevents accidental mixing of gate IDs with plain integers. Helper operators (increment, comparison, stream I/O, to_string) make it convenient to use in loops and containers.
A CRTP-style template base class for all circuit variants in ProvSQL (BooleanCircuit, GenericCircuit, DotCircuit, WhereCircuit). A circuit is a directed acyclic graph where:
gateType (a user-supplied enum).Circuit.hpp (included by subclass headers) provides the out-of-line template method implementations.
Exception type thrown when a circuit operation fails (e.g. UUID not found, type mismatch).
Definition in file Circuit.h.
|
strong |
|
inline |
|
inline |