g2o
Public Member Functions | List of all members
InvChi2CostFunction Struct Reference
Inheritance diagram for InvChi2CostFunction:
Inheritance graph
[legend]
Collaboration diagram for InvChi2CostFunction:
Collaboration graph
[legend]

Public Member Functions

virtual double operator() (HyperGraph::Edge *edge, HyperGraph::Vertex *from, HyperGraph::Vertex *to)
 
- Public Member Functions inherited from g2o::HyperDijkstra::CostFunction
virtual ~CostFunction ()
 

Detailed Description

Definition at line 40 of file g2o-unfold.cpp.

Member Function Documentation

double InvChi2CostFunction::operator() ( HyperGraph::Edge edge,
HyperGraph::Vertex from,
HyperGraph::Vertex to 
)
virtual

Implements g2o::HyperDijkstra::CostFunction.

Definition at line 44 of file g2o-unfold.cpp.

References g2o::OptimizableGraph::Edge::chi2(), g2o::OptimizableGraph::Edge::computeError(), and g2o::OptimizableGraph::Edge::robustKernel().

46  {
47 
48  OptimizableGraph::Edge* e = dynamic_cast<OptimizableGraph::Edge*>(edge);
49 e->computeError();
50 if(e->robustKernel())
51  e->robustifyError();
52 return 1.0/(1e-6 + e->chi2());
53 }
virtual double chi2() const =0
computes the chi2 based on the cached error value, only valid after computeError has been called...
RobustKernel * robustKernel() const
if NOT NULL, error of this edge will be robustifed with the kernel
virtual void computeError()=0

The documentation for this struct was generated from the following file: