Commit 6a1adbc9 authored by Alejandro Suarez Hernandez's avatar Alejandro Suarez Hernandez
Browse files

method for isolating world objects

parent 335fa53c
......@@ -283,6 +283,19 @@ PlanState::PlanState() {}
PlanState::PlanState(const std::set<Predicate>& predicates) :
predicates_(predicates) {}
std::set<TermWrapper> PlanState::symbols() const
{
std::set<TermWrapper> sym;
for (const Predicate& pred : predicates_)
{
for (const TermWrapper& arg : pred.get_arguments())
{
if (arg.get_literal_term()) sym.insert(arg);
}
}
return sym;
}
std::string PlanState::to_str() const
{
std::ostringstream oss;
......
......@@ -318,6 +318,8 @@ class PlanState : public Stringifiable,
PlanState(const std::set<Predicate>& predicates);
std::set<TermWrapper> symbols() const;
virtual std::string to_str() const override;
virtual std::size_t hash() const override;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment