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
Guilhem Saurel
hpp-manipulation
Commits
c10d5096
Commit
c10d5096
authored
10 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update class NodeBin
parent
bdec6d3a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/hpp/manipulation/graph/statistics.hh
+21
-7
21 additions, 7 deletions
include/hpp/manipulation/graph/statistics.hh
with
21 additions
and
7 deletions
include/hpp/manipulation/graph/statistics.hh
+
21
−
7
View file @
c10d5096
...
...
@@ -85,32 +85,46 @@ namespace hpp {
class
HPP_MANIPULATION_DLLLOCAL
NodeBin
:
public
::
hpp
::
statistics
::
Bin
{
public
:
NodeBin
(
const
ConstraintSetPtr
_t
&
c
)
:
constraint_
(
c
),
configs_
()
{}
NodeBin
(
const
Nodes
_t
&
ns
)
:
nodes_
(
ns
),
configs_
()
{}
void
push_back
(
const
Configuration_t
&
cfg
)
{
configs_
.
push_back
(
cfg
);
}
bool
operator
<
(
const
NodeBin
&
rhs
)
const
{
return
constraint_
.
get
()
<
rhs
.
constraint
().
get
();
Nodes_t
::
const_iterator
it1
,
it2
=
rhs
.
nodes
().
begin
();
for
(
it1
=
nodes_
.
begin
();
it1
!=
nodes_
.
end
();
it1
++
)
{
if
((
*
it1
)
->
id
()
<
(
*
it2
)
->
id
())
return
true
;
if
((
*
it1
)
->
id
()
>
(
*
it2
)
->
id
())
return
false
;
it2
++
;
}
return
false
;
}
bool
operator
==
(
const
NodeBin
&
rhs
)
const
{
return
constraint_
==
rhs
.
constraint
();
return
nodes_
==
rhs
.
nodes
();
}
const
ConstraintSetPtr_t
&
constraint
()
const
{
return
constraint_
;
const
Nodes_t
&
nodes
()
const
{
return
nodes_
;
}
private
:
ConstraintSetPtr_t
constraint
_
;
Nodes_t
nodes
_
;
std
::
list
<
Configuration_t
>
configs_
;
std
::
ostream
&
printValue
(
std
::
ostream
&
os
)
const
{
return
os
<<
"NodeBin ("
<<
constraint_
->
name
()
<<
")"
;
os
<<
"NodeBin ("
;
Nodes_t
::
const_iterator
it1
;
for
(
it1
=
nodes_
.
begin
();
it1
!=
nodes_
.
end
();
it1
++
)
os
<<
(
*
it1
)
->
name
()
<<
" / "
;
return
os
<<
")"
;
}
};
...
...
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