base_unary_edge.h
Go to the documentation of this file.
00001 // g2o - General Graph Optimization
00002 // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, H. Strasdat, W. Burgard
00003 // 
00004 // g2o is free software: you can redistribute it and/or modify
00005 // it under the terms of the GNU Lesser General Public License as published
00006 // by the Free Software Foundation, either version 3 of the License, or
00007 // (at your option) any later version.
00008 // 
00009 // g2o is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU Lesser General Public License for more details.
00013 // 
00014 // You should have received a copy of the GNU Lesser General Public License
00015 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
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 } // end namespace g2o
00082 
00083 #endif


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:30:47