g2o
|
#include <backbone_tree_action.h>
Public Member Functions | |
BackBoneTreeAction (SparseOptimizer *optimizer, std::string vertexTag, int level, int step) | |
void | init () |
initializes the visit and clears the internal structures More... | |
VertexStarMap & | vertexStarMap () |
map vertex->star. Contains the most recent vertex assignment More... | |
VertexStarMultimap & | vertexStarMultiMap () |
multimap vertex->star. Contains all the vertex assignments to all stars More... | |
HyperGraph::EdgeSet & | freeEdges () |
edges that are not yet assigned to any star More... | |
virtual double | perform (HyperGraph::Vertex *v, HyperGraph::Vertex *vParent, HyperGraph::Edge *e, double distance) |
Public Member Functions inherited from g2o::HyperDijkstra::TreeAction | |
virtual double | perform (HyperGraph::Vertex *v, HyperGraph::Vertex *vParent, HyperGraph::Edge *e) |
Protected Member Functions | |
void | addToMap (Star *s, HyperGraph::Vertex *v) |
Star * | getStar (HyperGraph::Vertex *v) |
bool | fillStar (Star *s, HyperGraph::Edge *e_) |
helper function that adds to a star an edge and all its vertices More... | |
Protected Attributes | |
SparseOptimizer * | _optimizer |
std::string | _vertexTag |
int | _level |
int | _step |
VertexStarMap | _vsMap |
VertexStarMultimap | _vsMmap |
HyperGraph::EdgeSet | _freeEdges |
Factory * | _factory |
Dijkstra traversal action that constructs a backbone skeleton on the graph. It assumes that the traversal contains only edges and vertices belonging to classes that can be used to construct a backbone. After a visit is invoked, it returns vector of stars to which the backbone nodes have been assigned
Definition at line 20 of file backbone_tree_action.h.
g2o::BackBoneTreeAction::BackBoneTreeAction | ( | SparseOptimizer * | optimizer, |
std::string | vertexTag, | ||
int | level, | ||
int | step | ||
) |
creates a tree action for constructing the backbone
optimizer | the optimizer on which the stars are constructed |
vertexTag | the tag of the vertices to use as backbone nodes |
level | the level of the lowLevelEdges of the stars in the backbone |
step | depth in tree after which a new star is initialized |
Definition at line 9 of file backbone_tree_action.cpp.
References _factory, init(), and g2o::Factory::instance().
|
protected |
helper function for adding a vertex to a star. If the vertex is already in _vertexToEdgeMap it replaces the associated star. _vertexStarMultimap is only augmented, thus it contains all associations
s | the star |
v | the vertex |
Definition at line 56 of file backbone_tree_action.cpp.
References g2o::Star::_lowLevelVertices, _vsMap, and _vsMmap.
Referenced by freeEdges(), and perform().
|
protected |
helper function that adds to a star an edge and all its vertices
Definition at line 75 of file backbone_tree_action.cpp.
References _freeEdges, g2o::Star::_lowLevelEdges, g2o::Star::_lowLevelVertices, and g2o::HyperGraph::Edge::vertices().
Referenced by freeEdges(), and perform().
|
inline |
edges that are not yet assigned to any star
Definition at line 38 of file backbone_tree_action.h.
References _freeEdges, addToMap(), fillStar(), getStar(), and perform().
|
protected |
helper function to retrieve the most recent star of a vertex.
v | the vertex |
Definition at line 67 of file backbone_tree_action.cpp.
References _vsMap.
Referenced by freeEdges(), and perform().
void g2o::BackBoneTreeAction::init | ( | ) |
initializes the visit and clears the internal structures
Definition at line 18 of file backbone_tree_action.cpp.
References _freeEdges, _level, _optimizer, _vsMap, _vsMmap, g2o::HyperGraph::edges(), and g2o::OptimizableGraph::Edge::level().
Referenced by BackBoneTreeAction().
|
virtual |
action to be performed during the descent of the dijkstra tree. it constructs stars according to the dijkstra tree A new star is created every time the depth increases of _step.
v | the vertex |
vParent | the parent vertex |
e | the edge between v and its parent |
distance | the depth in the tree |
Reimplemented from g2o::HyperDijkstra::TreeAction.
Definition at line 30 of file backbone_tree_action.cpp.
References _factory, g2o::Star::_gauge, _level, _optimizer, _step, _vertexTag, addToMap(), fillStar(), getStar(), and g2o::Factory::tag().
Referenced by freeEdges().
|
inline |
map vertex->star. Contains the most recent vertex assignment
Definition at line 34 of file backbone_tree_action.h.
References _vsMap.
|
inline |
multimap vertex->star. Contains all the vertex assignments to all stars
Definition at line 36 of file backbone_tree_action.h.
References _vsMmap.
|
protected |
Definition at line 78 of file backbone_tree_action.h.
Referenced by BackBoneTreeAction(), and perform().
|
protected |
Definition at line 77 of file backbone_tree_action.h.
Referenced by fillStar(), freeEdges(), and init().
|
protected |
Definition at line 72 of file backbone_tree_action.h.
|
protected |
Definition at line 70 of file backbone_tree_action.h.
|
protected |
Definition at line 73 of file backbone_tree_action.h.
Referenced by perform().
|
protected |
Definition at line 71 of file backbone_tree_action.h.
Referenced by perform().
|
protected |
Definition at line 75 of file backbone_tree_action.h.
Referenced by addToMap(), getStar(), init(), and vertexStarMap().
|
protected |
Definition at line 76 of file backbone_tree_action.h.
Referenced by addToMap(), init(), and vertexStarMultiMap().