g2o
Public Member Functions | Protected Attributes | List of all members
g2o::EstimatePropagatorCost Class Reference

cost for traversing along active edges in the optimizer More...

#include <estimate_propagator.h>

Inheritance diagram for g2o::EstimatePropagatorCost:
Inheritance graph
[legend]
Collaboration diagram for g2o::EstimatePropagatorCost:
Collaboration graph
[legend]

Public Member Functions

 EstimatePropagatorCost (SparseOptimizer *graph)
 
virtual double operator() (OptimizableGraph::Edge *edge, const OptimizableGraph::VertexSet &from, OptimizableGraph::Vertex *to_) const
 
virtual const char * name () const
 

Protected Attributes

SparseOptimizer_graph
 

Detailed Description

cost for traversing along active edges in the optimizer

You may derive an own one, if necessary. The default is to return initialEstimatePossible(from, to) for the edge.

Definition at line 47 of file estimate_propagator.h.

Constructor & Destructor Documentation

g2o::EstimatePropagatorCost::EstimatePropagatorCost ( SparseOptimizer graph)

Definition at line 237 of file estimate_propagator.cpp.

237  :
238  _graph(graph)
239  {
240  }
Protocol The SLAM executable accepts such as solving the and retrieving or vertices in the graph
Definition: protocol.txt:7

Member Function Documentation

virtual const char* g2o::EstimatePropagatorCost::name ( ) const
inlinevirtual

Reimplemented in g2o::EstimatePropagatorCostOdometry.

Definition at line 51 of file estimate_propagator.h.

Referenced by g2o::SparseOptimizer::computeInitialGuess().

51 { return "spanning tree";}
double g2o::EstimatePropagatorCost::operator() ( OptimizableGraph::Edge edge,
const OptimizableGraph::VertexSet from,
OptimizableGraph::Vertex to_ 
) const
virtual

Reimplemented in g2o::EstimatePropagatorCostOdometry.

Definition at line 242 of file estimate_propagator.cpp.

References _graph, g2o::SparseOptimizer::activeEdges(), g2o::SparseOptimizer::findActiveEdge(), and g2o::OptimizableGraph::Edge::initialEstimatePossible().

243  {
244  OptimizableGraph::Edge* e = dynamic_cast<OptimizableGraph::Edge*>(edge);
245  OptimizableGraph::Vertex* to = dynamic_cast<OptimizableGraph::Vertex*>(to_);
246  SparseOptimizer::EdgeContainer::const_iterator it = _graph->findActiveEdge(e);
247  if (it == _graph->activeEdges().end()) // it has to be an active edge
248  return std::numeric_limits<double>::max();
249  return e->initialEstimatePossible(from, to);
250  }
const EdgeContainer & activeEdges() const
the edges active in the current optimization
class G2O_CORE_API Vertex
class G2O_CORE_API Edge
EdgeContainer::const_iterator findActiveEdge(const OptimizableGraph::Edge *e) const

Member Data Documentation

SparseOptimizer* g2o::EstimatePropagatorCost::_graph
protected

The documentation for this class was generated from the following files: