11 #include "g2o/types/slam2d/types_three_dof.h" 22 double comparisonConditioner){
24 (void) comparisonConditioner;
25 typedef std::queue<HyperGraph::Edge*> EdgeDeque;
32 while (! frontier.empty()){
42 double edgecost=(*cost)(e, e->
vertices()[0], e->vertices()[1]);
43 if (edgecost != std::numeric_limits< double >::max()) {
45 if (edgecost > maxEdgeCost) {
48 else if (edgecost <= maxEdgeCost) {
51 for (HyperGraph::EdgeSet::iterator it=e->vertices()[0]->edges().begin();
52 it!=e->vertices()[0]->edges().end(); ++it) {
53 if (selected.find(*it)==selected.end())
54 frontier.
push(dynamic_cast<HyperGraph::Edge*>(*it));
56 for (HyperGraph::EdgeSet::iterator it=e->vertices()[1]->edges().begin();
57 it!=e->vertices()[1]->edges().end(); ++it) {
58 if (selected.find(*it)==selected.end())
59 frontier.push(dynamic_cast<HyperGraph::Edge*>(*it));
63 cerr <<
"? nan ?" << endl;
66 cerr <<
"? max ?" << endl;
virtual void push()
backup the position of the vertex to a stack
2D pose Vertex, (x,y,theta)
std::set< Edge * > EdgeSet
const VertexContainer & vertices() const
void findConnectedEdgesWithCostLimit(HyperGraph::EdgeSet &selected, HyperGraph::EdgeSet &border, HyperGraph::Edge *start, HyperDijkstra::CostFunction *cost, double maxEdgeCost, double comparisonConditioner)