Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
b2ccb263
Commit
b2ccb263
authored
3 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
static function
(cherry picked from commit
c36bdfb6
)
parent
a9d87a67
No related branches found
No related tags found
1 merge request
!417
Resolve "Graph search"
Pipeline
#6638
passed
3 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/utils/graph_search.h
+14
-1
14 additions, 1 deletion
include/core/utils/graph_search.h
src/utils/graph_search.cpp
+4
-3
4 additions, 3 deletions
src/utils/graph_search.cpp
with
18 additions
and
4 deletions
include/core/utils/graph_search.h
+
14
−
1
View file @
b2ccb263
...
@@ -22,10 +22,23 @@ class GraphSearch
...
@@ -22,10 +22,23 @@ class GraphSearch
~
GraphSearch
();
~
GraphSearch
();
FactorBasePtrList
shortestPath
(
FrameBasePtr
frm1
,
FrameBasePtr
frm2
,
const
unsigned
int
max_graph_dist
=
0
);
FactorBasePtrList
computeShortestPath
(
FrameBasePtr
frm1
,
FrameBasePtr
frm2
,
const
unsigned
int
max_graph_dist
=
0
);
std
::
set
<
FrameBasePtr
>
getNeighborFrames
(
const
std
::
set
<
FrameBasePtr
>&
frms
);
std
::
set
<
FrameBasePtr
>
getNeighborFrames
(
const
std
::
set
<
FrameBasePtr
>&
frms
);
static
FactorBasePtrList
shortestPath
(
FrameBasePtr
frm1
,
FrameBasePtr
frm2
,
const
unsigned
int
max_graph_dist
=
0
)
{
GraphSearch
graph_search
;
return
graph_search
.
computeShortestPath
(
frm1
,
frm2
,
max_graph_dist
);
}
};
};
}
// namespace wolf
}
// namespace wolf
#endif
#endif
This diff is collapsed.
Click to expand it.
src/utils/graph_search.cpp
+
4
−
3
View file @
b2ccb263
...
@@ -13,9 +13,9 @@ GraphSearch::~GraphSearch()
...
@@ -13,9 +13,9 @@ GraphSearch::~GraphSearch()
}
}
FactorBasePtrList
GraphSearch
::
s
hortestPath
(
FrameBasePtr
frm1
,
FactorBasePtrList
GraphSearch
::
computeS
hortestPath
(
FrameBasePtr
frm1
,
FrameBasePtr
frm2
,
FrameBasePtr
frm2
,
const
unsigned
int
max_graph_dist
)
const
unsigned
int
max_graph_dist
)
{
{
std
::
set
<
FrameBasePtr
>
frm_neigs
({
frm1
});
std
::
set
<
FrameBasePtr
>
frm_neigs
({
frm1
});
unsigned
int
depth
=
0
;
unsigned
int
depth
=
0
;
...
@@ -95,3 +95,4 @@ std::set<FrameBasePtr> GraphSearch::getNeighborFrames(const std::set<FrameBasePt
...
@@ -95,3 +95,4 @@ std::set<FrameBasePtr> GraphSearch::getNeighborFrames(const std::set<FrameBasePt
return
frm_neigs
;
return
frm_neigs
;
}
}
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