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
c6fb6381
Commit
c6fb6381
authored
9 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Edge can have negative weights in which case they are hidden
parent
3c0cf959
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/hpp/manipulation/graph/node.hh
+10
-0
10 additions, 0 deletions
include/hpp/manipulation/graph/node.hh
src/graph/node.cc
+9
-0
9 additions, 0 deletions
src/graph/node.cc
with
19 additions
and
0 deletions
include/hpp/manipulation/graph/node.hh
+
10
−
0
View file @
c6fb6381
...
@@ -55,9 +55,18 @@ namespace hpp {
...
@@ -55,9 +55,18 @@ namespace hpp {
static
NodePtr_t
create
(
const
std
::
string
&
name
);
static
NodePtr_t
create
(
const
std
::
string
&
name
);
/// Create a link from this node to the given node.
/// Create a link from this node to the given node.
/// \deprecated Use Edge->node(NodePtr_t) to give the node.
EdgePtr_t
linkTo
(
const
std
::
string
&
name
,
const
NodePtr_t
&
to
,
EdgePtr_t
linkTo
(
const
std
::
string
&
name
,
const
NodePtr_t
&
to
,
const
Weight_t
&
w
=
1
,
const
Weight_t
&
w
=
1
,
const
bool
&
isInNodeFrom
=
false
,
const
bool
&
isInNodeFrom
=
false
,
EdgeFactory
create
=
Edge
::
create
)
HPP_MANIPULATION_DEPRECATED
;
/// Create a link from this node to the given node.
/// \param w if strictly negative, the edge is not included in the neighbor
/// list. Otherwise, it is included with Weight_t w
EdgePtr_t
linkTo
(
const
std
::
string
&
name
,
const
NodePtr_t
&
to
,
const
size_type
&
w
=
1
,
EdgeFactory
create
=
Edge
::
create
);
EdgeFactory
create
=
Edge
::
create
);
/// Check whether the configuration is in this state.
/// Check whether the configuration is in this state.
...
@@ -156,6 +165,7 @@ namespace hpp {
...
@@ -156,6 +165,7 @@ namespace hpp {
/// List of possible motions from this state (i.e. the outgoing
/// List of possible motions from this state (i.e. the outgoing
/// vertices).
/// vertices).
Neighbors_t
neighbors_
;
Neighbors_t
neighbors_
;
std
::
vector
<
EdgePtr_t
>
hiddenNeighbors_
;
/// Set of constraints to be statisfied.
/// Set of constraints to be statisfied.
typedef
Cache
<
ConstraintSetPtr_t
>
Constraint_t
;
typedef
Cache
<
ConstraintSetPtr_t
>
Constraint_t
;
...
...
This diff is collapsed.
Click to expand it.
src/graph/node.cc
+
9
−
0
View file @
c6fb6381
...
@@ -60,6 +60,15 @@ namespace hpp {
...
@@ -60,6 +60,15 @@ namespace hpp {
return
newEdge
;
return
newEdge
;
}
}
EdgePtr_t
Node
::
linkTo
(
const
std
::
string
&
name
,
const
NodePtr_t
&
to
,
const
size_type
&
w
,
EdgeFactory
create
)
{
EdgePtr_t
newEdge
=
create
(
name
,
graph_
,
wkPtr_
,
to
);
if
(
w
>=
0
)
neighbors_
.
insert
(
newEdge
,
(
Weight_t
)
w
);
else
hiddenNeighbors_
.
push_back
(
newEdge
);
return
newEdge
;
}
bool
Node
::
contains
(
ConfigurationIn_t
config
)
const
bool
Node
::
contains
(
ConfigurationIn_t
config
)
const
{
{
return
configConstraint
()
->
isSatisfied
(
config
);
return
configConstraint
()
->
isSatisfied
(
config
);
...
...
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