souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
49 class Aggregate :
public RelationOperation,
public AbstractAggregate {
59 res.insert(res.end(), children.begin(), children.end());
75 void print(std::ostream& os,
int tabpos)
const override {
76 os <<
times(
" ", tabpos);
87 bool equal(
const Node& node)
const override {
88 const auto& other =
static_cast<const Aggregate&
>(node);
bool equal(const Node &node) const
std::vector< const Node * > getChildNodes() const override
Obtain list of all embedded child nodes.
const Condition & getCondition() const
Get condition.
void apply(const NodeMapper &map) override
Apply the mapper to all child nodes.
AggregateOp
Types of aggregation functions.
Operation & getOperation() const
Get nested operation.
auto map(const std::vector< A > &xs, F &&f)
Applies a function to each element of a vector and returns the results.
Aggregate(Own< Operation > nested, AggregateOp fun, std::string rel, Own< Expression > expression, Own< Condition > condition, int ident)
bool equal(const Node &node) const override
Equality check for two RAM nodes.
const std::string & getRelation() const
Get search relation.
Aggregate * clone() const override
Create a clone (i.e.
void print(std::ostream &os, int) const
const std::string relation
Search relation.
Abstract class for aggregation.
auto clone(const std::vector< A * > &xs)
An abstract class for manipulating RAM Nodes by substitution.
detail::multiplying_printer< T > times(const T &value, unsigned num)
A utility printing a given value multiple times.
Own< Expression > expression
Aggregation expression.
Aggregation function applied on some relation.
void apply(const NodeMapper &map) override
Apply the mapper to all child nodes.
bool equal(const Node &node) const override
Equality check for two RAM nodes.
Abstract class for operations on relations.
int getTupleId() const
Get identifier.
std::vector< const Node * > getChildNodes() const override
Obtain list of all embedded child nodes.
bool isTrue(const Condition *cond)
Determines if a condition represents true.
void print(std::ostream &os, int tabpos) const override
Pretty print with indentation.
std::vector< const Node * > getChildNodes() const
void rel(size_t limit, bool showLimit=true)
void print(std::ostream &os, int tabpos) const override
Pretty print with indentation.
Own< Condition > condition
Aggregation tuple condition.