Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpp-manipulation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Humanoid Path Planner
hpp-manipulation
Commits
ecfaff1b
Commit
ecfaff1b
authored
9 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Clear instead of clone histograms when clearing the roadmap
parent
ff59a07d
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/hpp/manipulation/graph/statistics.hh
+6
-0
6 additions, 0 deletions
include/hpp/manipulation/graph/statistics.hh
src/roadmap.cc
+3
-5
3 additions, 5 deletions
src/roadmap.cc
with
9 additions
and
5 deletions
include/hpp/manipulation/graph/statistics.hh
+
6
−
0
View file @
ecfaff1b
...
...
@@ -98,6 +98,8 @@ namespace hpp {
virtual
void
add
(
const
RoadmapNodePtr_t
&
node
)
=
0
;
virtual
HistogramPtr_t
clone
()
const
=
0
;
virtual
void
clear
()
=
0
;
};
class
HPP_MANIPULATION_DLLLOCAL
LeafHistogram
:
public
::
hpp
::
statistics
::
Statistics
<
LeafBin
>
...
...
@@ -124,6 +126,8 @@ namespace hpp {
statistics
::
DiscreteDistribution
<
RoadmapNodePtr_t
>
getDistrib
()
const
;
void
clear
()
{
Parent
::
clear
();
}
private
:
/// The constraint that creates the foliation.
ConstraintSetPtr_t
constraint_
;
...
...
@@ -151,6 +155,8 @@ namespace hpp {
virtual
HistogramPtr_t
clone
()
const
;
void
clear
()
{
Parent
::
clear
();
}
private
:
/// The constraint graph
graph
::
GraphPtr_t
graph_
;
...
...
This diff is collapsed.
Click to expand it.
src/roadmap.cc
+
3
−
5
View file @
ecfaff1b
...
...
@@ -38,12 +38,10 @@ namespace hpp {
void
Roadmap
::
clear
()
{
Parent
::
clear
();
Histograms
newHistograms
;
Histograms
::
iterator
it
;
for
(
it
=
histograms_
.
begin
();
it
!=
histograms_
.
end
();
++
it
)
{
newHistograms
.
push_back
((
*
it
)
->
clone
());
for
(
Histograms
::
iterator
it
=
histograms_
.
begin
();
it
!=
histograms_
.
end
();
++
it
)
{
(
*
it
)
->
clear
();
}
histograms_
=
newHistograms
;
}
void
Roadmap
::
push_node
(
const
core
::
NodePtr_t
&
n
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment