33#include "../Aggregation.h"
59virtual char const *
what() const noexcept {
AggregationOperator
SQL aggregation functions tracked by ProvSQL.
ComparisonOperator
SQL comparison operators used in gate_cmp circuit gates.
Exception thrown when a semiring operation is not supported.
std::string message
Human-readable description of the error.
virtual char const * what() const noexcept
Return the error message as a C-string.
SemiringException(const std::string &m)
Construct with a descriptive error message.
Abstract base class for (m-)semirings.
V value_type
The carrier type of this semiring.
virtual value_type semimod(value_type x, value_type s) const
Apply a semimodule scalar multiplication.
virtual value_type plus(const std::vector< value_type > &v) const =0
Apply the additive operation to a list of values.
virtual bool absorptive() const
Return true if this semiring is absorptive ( ).
virtual ~Semiring()=default
virtual value_type zero() const =0
Return the additive identity .
virtual value_type cmp(value_type s1, ComparisonOperator op, value_type s2) const
Evaluate a comparison gate.
virtual value_type agg(AggregationOperator op, const std::vector< value_type > &s)
Evaluate an aggregation gate.
virtual value_type one() const =0
Return the multiplicative identity .
virtual value_type monus(value_type x, value_type y) const =0
Apply the monus (m-semiring difference) operation.
virtual value_type delta(value_type x) const =0
Apply the operator.
virtual value_type times(const std::vector< value_type > &v) const =0
Apply the multiplicative operation to a list of values.
virtual value_type value(const std::string &s) const
Interpret a literal string as a semiring value.