Go to the documentation of this file.00001 #ifndef GRAPHMAP_H
00002 #define GRAPHMAP_H
00003 #include <list>
00004 #include <utils/point.h>
00005 #include <utils/graph.h>
00006 #include <grid/map.h>
00007
00008 namespace GMapping {
00009
00010 class RasterMap;
00011
00012 struct GraphMapPatch{
00013 typedef typename std::list<IntPoint> PointList;
00015
00017
00019
00020
00021 OrientedPoint center;
00022 PointList m_points;
00023 };
00024
00025 struct Covariance3{
00026 double sxx, sxy, sxt, syy, syt ,stt;
00027 };
00028
00029 struct GraphMapEdge{
00030 Covariance3 covariance;
00031 GraphMapPatch* first, *second;
00032 inline operator double() const{
00033 return sqrt((first->center-second->center)*(first->center-second->center));
00034 }
00035 };
00036
00037
00038 struct GraphPatchGraph: public Graph<GraphMapPatch, Covariance3>{
00039 void addEdge(Vertex* v1, Vertex* v2, const Covariance3& covariance);
00040 };
00041
00042 void GraphPatchGraph::addEdge(GraphPatchGraph::Vertex* v1, GraphPatchGraph::VertexVertex* v2,
00043 const Covariance3& cov){
00044 GraphMapEdge gme;
00045 gme.covariance=cov;
00046 gme.first=v1;
00047 gme.second=v2;
00048 return Graph<GraphMapPatch, Covariance3>::addEdge(v1,v2,gme);
00049 }
00050
00051 struct GraphPatchDirectoryCell: public std::set<GraphMapPatch::Vertex*> {
00052 GraphPatchDirectoryCell(double);
00053 };
00054
00055 typedef Map<GraphPatchDirectoryCell>, Array2D::set<GraphPatchDirectoryCell> >
00056
00057 };
00058
00059 #endif