g2o
backbone_tree_action.h
Go to the documentation of this file.
1 #ifndef G2O_BACKBONE_TREE_ACTION_
2 #define G2O_BACKBONE_TREE_ACTION_
3 
4 #include <string>
5 #include <map>
8 #include "g2o/core/factory.h"
9 #include "star.h"
10 
11 namespace g2o {
12 
28  BackBoneTreeAction(SparseOptimizer* optimizer, std::string vertexTag, int level, int step);
29 
31  void init();
32 
34  inline VertexStarMap& vertexStarMap() {return _vsMap;}
39 
49  virtual double perform(HyperGraph::Vertex* v,
50  HyperGraph::Vertex* vParent,
52  double distance);
53 
54  protected:
62  void addToMap(Star* s, HyperGraph::Vertex* v);
66 
68  bool fillStar(Star* s, HyperGraph::Edge* e_);
69 
71  std::string _vertexTag;
72  int _level;
73  int _step;
74 
79  };
80 
81 }
82 #endif
virtual double perform(HyperGraph::Vertex *v, HyperGraph::Vertex *vParent, HyperGraph::Edge *e, double distance)
VertexStarMultimap & vertexStarMultiMap()
multimap vertex->star. Contains all the vertex assignments to all stars
VertexStarMultimap _vsMmap
HyperGraph::EdgeSet & freeEdges()
edges that are not yet assigned to any star
VertexStarMap & vertexStarMap()
map vertex->star. Contains the most recent vertex assignment
std::multimap< OptimizableGraph::Vertex *, Star * > VertexStarMultimap
Definition: star.h:69
SparseOptimizer * _optimizer
void init()
initializes the visit and clears the internal structures
std::set< Edge * > EdgeSet
Definition: hyper_graph.h:135
Definition: star.h:26
create vertices and edges based on TAGs in, for example, a file
Definition: factory.h:49
Star * getStar(HyperGraph::Vertex *v)
abstract Vertex, your types must derive from that one
Definition: hyper_graph.h:142
HyperGraph::EdgeSet _freeEdges
BackBoneTreeAction(SparseOptimizer *optimizer, std::string vertexTag, int level, int step)
void addToMap(Star *s, HyperGraph::Vertex *v)
std::map< OptimizableGraph::Vertex *, Star * > VertexStarMap
Definition: star.h:70
bool fillStar(Star *s, HyperGraph::Edge *e_)
helper function that adds to a star an edge and all its vertices
yylloc step()