Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef BASE_UNARY_EDGE_H
00018 #define BASE_UNARY_EDGE_H
00019
00020 #include <iostream>
00021 #include <cassert>
00022 #include <limits>
00023
00024 #include "base_edge.h"
00025 #include "g2o/config.h"
00026
00027 namespace g2o {
00028
00029 using namespace Eigen;
00030
00031 template <int D, typename E, typename VertexXi>
00032 class BaseUnaryEdge : public BaseEdge<D,E>
00033 {
00034 public:
00035 static const int Dimension = BaseEdge<D, E>::Dimension;
00036 typedef typename BaseEdge<D,E>::Measurement Measurement;
00037 typedef VertexXi VertexXiType;
00038 typedef Matrix<double, D, VertexXiType::Dimension> JacobianXiOplusType;
00039 typedef typename BaseEdge<D,E>::ErrorVector ErrorVector;
00040 typedef typename BaseEdge<D,E>::InformationType InformationType;
00041
00042 BaseUnaryEdge() : BaseEdge<D,E>()
00043 {
00044 resize(1);
00045 }
00046
00051 virtual void linearizeOplus();
00052
00054 const JacobianXiOplusType& jacobianOplusXi() const { return _jacobianOplusXi;}
00055
00056 virtual void constructQuadraticForm();
00057
00058 virtual void initialEstimate(const OptimizableGraph::VertexSet& from, OptimizableGraph::Vertex* to);
00059
00060 virtual void mapHessianMemory(double*, int, int, bool) {assert(0 && "BaseUnaryEdge does not map memory of the Hessian");}
00061
00062 using BaseEdge<D,E>::resize;
00063 using BaseEdge<D,E>::computeError;
00064
00065 protected:
00066 using BaseEdge<D,E>::_measurement;
00067 using BaseEdge<D,E>::_inverseMeasurement;
00068 using BaseEdge<D,E>::_information;
00069 using BaseEdge<D,E>::_error;
00070 using BaseEdge<D,E>::_vertices;
00071 using BaseEdge<D,E>::_dimension;
00072
00073 JacobianXiOplusType _jacobianOplusXi;
00074
00075 public:
00076 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
00077 };
00078
00079 #include "base_unary_edge.hpp"
00080
00081 }
00082
00083 #endif