![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Template implementation of GenericCircuit::evaluate().
More...


Go to the source code of this file.
Template implementation of GenericCircuit::evaluate().
Provides the out-of-line definition of the evaluate() template method declared in GenericCircuit.h. This file must be included (directly or transitively) by any translation unit that instantiates GenericCircuit::evaluate<S>() for a specific semiring type S.
The evaluate() method performs a post-order traversal of the sub-circuit rooted at gate g, looking up input-gate values from provenance_mapping and combining them using the semiring operations:
| Gate type | Semiring operation |
|---|---|
| gate_input | lookup in provenance_mapping |
| gate_plus | semiring.plus(children) |
| gate_times | semiring.times(children) |
| gate_monus | semiring.monus(left, right) |
| gate_delta | semiring.delta(child) |
| gate_cmp | semiring.cmp(left, op, right) |
| gate_semimod | semiring.semimod(x, s) |
| gate_agg | semiring.agg(op, children) |
| gate_value | semiring.value(string) |
| gate_one | semiring.one() |
| gate_zero | semiring.zero() |
Definition in file GenericCircuit.hpp.