![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
The Boolean semiring over bool.
More...
#include "Boolean.h"


Public Member Functions | |
| virtual value_type | zero () const override |
| Return the additive identity \(\mathbb{0}\). | |
| virtual value_type | one () const override |
| Return the multiplicative identity \(\mathbb{1}\). | |
| virtual value_type | plus (const std::vector< value_type > &v) const override |
| Apply the additive operation to a list of values. | |
| virtual value_type | times (const std::vector< value_type > &v) const override |
| Apply the multiplicative operation to a list of values. | |
| virtual value_type | monus (value_type x, value_type y) const override |
| Apply the monus (m-semiring difference) operation. | |
| virtual value_type | delta (value_type x) const override |
| Apply the \(\delta\) operator. | |
| virtual bool | absorptive () const override |
Return true if this semiring is absorptive ( \(a \oplus a = a\)). | |
Public Member Functions inherited from semiring::Semiring< bool > | |
| virtual value_type | cmp (value_type s1, ComparisonOperator op, value_type s2) const |
| Evaluate a comparison gate. | |
| virtual value_type | semimod (value_type x, value_type s) const |
| Apply a semimodule scalar multiplication. | |
| virtual value_type | agg (AggregationOperator op, const std::vector< value_type > &s) |
| Evaluate an aggregation gate. | |
| virtual value_type | value (const std::string &s) const |
| Interpret a literal string as a semiring value. | |
| virtual | ~Semiring ()=default |
Additional Inherited Members | |
Public Types inherited from semiring::Semiring< bool > | |
| typedef bool | value_type |
| The carrier type of this semiring. | |
The Boolean semiring over bool.
Provides the standard Boolean interpretation of provenance circuits.
|
inlineoverridevirtual |
Return true if this semiring is absorptive ( \(a \oplus a = a\)).
When true, the circuit evaluator may deduplicate the children of plus gates, which can improve performance significantly for semirings such as Boolean and Why-provenance.
false by default; override to return true. Reimplemented from semiring::Semiring< bool >.
|
inlineoverridevirtual |
Apply the \(\delta\) operator.
| x | Input value. |
Implements semiring::Semiring< bool >.
|
inlineoverridevirtual |
Apply the monus (m-semiring difference) operation.
| x | Minuend. |
| y | Subtrahend. |
Implements semiring::Semiring< bool >.
|
inlineoverridevirtual |
Return the multiplicative identity \(\mathbb{1}\).
Implements semiring::Semiring< bool >.
|
inlineoverridevirtual |
Apply the additive operation to a list of values.
| v | Ordered list of operands (empty list should return zero()). |
Implements semiring::Semiring< bool >.
|
inlineoverridevirtual |
Apply the multiplicative operation to a list of values.
| v | Ordered list of operands (empty list should return one()). |
Implements semiring::Semiring< bool >.
|
inlineoverridevirtual |
Return the additive identity \(\mathbb{0}\).
Implements semiring::Semiring< bool >.