8000 expose convert function · Z80coder/datalog-cpp@85861be · GitHub
[go: up one dir, main page]

Skip to content

Commit 85861be

Browse files
author
8000 wright
committed
expose convert function
1 parent 9e892d3 commit 85861be

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/Datalog.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -495,15 +495,6 @@ struct State
495495
return it;
496496
}
497497

498-
template <typename RELATION_TYPE>
499-
static typename RELATION_TYPE::Set convert(const typename RELATION_TYPE::TrackedSet& trackedSet) {
500-
typename RELATION_TYPE::Set set;
501-
for (const auto& relation : trackedSet) {
502-
set.insert(relation.second);
503-
}
504-
return set;
505-
}
506-
507498
private:
508499
typedef tuple<RELATIONs...> RelationsType;
509500
typedef tuple<typename RELATIONs::Set...> TupleType;
@@ -538,6 +529,15 @@ struct State
538529

539530
};
540531

532+
template <typename RELATION_TYPE>
533+
static typename RELATION_TYPE::Set convert(const typename RELATION_TYPE::TrackedSet& trackedSet) {
534+
typename RELATION_TYPE::Set set;
535+
for (const auto& relation : trackedSet) {
536+
set.insert(relation.second);
537+
}
538+
return set;
539+
}
540+
541541
template <typename... RELATIONs>
542542
ostream & operator<<(ostream &out, const State<RELATIONs...>& state) {
543543
out << "[";
@@ -795,7 +795,7 @@ State<RELATIONs...> fixPoint(const RuleSet<RULE_TYPEs...> &ruleSet, const State<
795795
applyRuleSet(iteration, stateSizeDelta, ruleSet, newState);
796796
iteration++;
797797
} while (StateType::size(stateSizeDelta) > 0);
798-
cout << "fix point in " << iteration << " iterations" << endl;
798+
//cout << "fix point in " << iteration << " iterations" << endl;
799799
return newState;
800800
}
801801

0 commit comments

Comments
 (0)
0