Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
perception
imagine-planner
Commits
6a1adbc9
Commit
6a1adbc9
authored
Oct 13, 2017
by
Alejandro Suarez Hernandez
Browse files
method for isolating world objects
parent
335fa53c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/types.cpp
View file @
6a1adbc9
...
...
@@ -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
;
...
...
src/types.h
View file @
6a1adbc9
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment