souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
34 std::function<Own<Node>(Own<Node>)> filterRewriter = [&](Own<Node> node) -> Own<Node> {
38 bool eliminatedDuplicate =
false;
39 for (std::size_t
i = 0;
i < conds.size();
i++) {
40 for (std::size_t
j =
i + 1;
j < conds.size();
j++) {
41 if (*conds[
i] == *conds[
j]) {
42 conds.erase(conds.begin() +
j);
44 eliminatedDuplicate =
true;
49 if (eliminatedDuplicate) {
A relational algebra query.
Own< Condition > toCondition(const VecOwn< Condition > &conds)
Convert list of conditions to a conjunction.
VecOwn< Condition > toConjunctionList(const Condition *condition)
Convert terms of a conjunction to a list.
Abstract class for conditions and boolean values in RAM.
Checks whether a given condition holds.
auto clone(const std::vector< A * > &xs)
std::vector< A > filter(std::vector< A > xs, F &&f)
Filter a vector to include certain elements.
void visitDepthFirst(const Node &root, Visitor< R, Ps... > &visitor, Args &... args)
A utility function visiting all nodes within the RAM fragments rooted by the given node recursively i...
std::vector< Own< A > > VecOwn
LambdaNodeMapper< Lambda > makeLambdaRamMapper(const Lambda &lambda)
Creates a node mapper based on a corresponding lambda expression.