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_MULTI_EDGE_H
00018 #define BASE_MULTI_EDGE_H
00019
00020 #include <iostream>
00021 #include <iomanip>
00022 #include <limits>
00023
00024 #include "base_edge.h"
00025 #include "g2o/config.h"
00026
00027 namespace g2o {
00028
00029 using namespace Eigen;
00030
00037 template <int D, typename E>
00038 class BaseMultiEdge : public BaseEdge<D,E>
00039 {
00040 public:
00045 struct HessianHelper
00046 {
00047 Map<MatrixXd> matrix;
00048 bool transposed;
00049 HessianHelper() : matrix(0, 0, 0), transposed(false) {}
00050 };
00051
00052 public:
00053 static const int Dimension = BaseEdge<D,E>::Dimension;
00054 typedef typename BaseEdge<D,E>::Measurement Measurement;
00055 typedef MatrixXd JacobianType;
00056 typedef typename BaseEdge<D,E>::ErrorVector ErrorVector;
00057 typedef typename BaseEdge<D,E>::InformationType InformationType;
00058 typedef Map<MatrixXd, MatrixXd::Flags & AlignedBit ? Aligned : Unaligned >
00059 HessianBlockType;
00060
00061 BaseMultiEdge() : BaseEdge<D,E>() {}
00062
00067 virtual void linearizeOplus();
00068
00069 virtual void resize(size_t size);
00070
00071 virtual void constructQuadraticForm() ;
00072
00073 virtual void mapHessianMemory(double* d, int i, int j, bool rowMajor);
00074
00075 using BaseEdge<D,E>::computeError;
00076
00077 protected:
00078 using BaseEdge<D,E>::_measurement;
00079 using BaseEdge<D,E>::_inverseMeasurement;
00080 using BaseEdge<D,E>::_information;
00081 using BaseEdge<D,E>::_error;
00082 using BaseEdge<D,E>::_vertices;
00083 using BaseEdge<D,E>::_dimension;
00084
00085 std::vector<HessianHelper> _hessian;
00087 std::vector<JacobianType> _jacobianOplus;
00088
00089 public:
00090 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
00091 };
00092
00093 #include "base_multi_edge.hpp"
00094
00095 }
00096
00097 #endif