Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef PF_aux_structs_H
00029 #define PF_aux_structs_H
00030
00031 #include <mrpt/utils/utils_defs.h>
00032 #include <vector>
00033 #include <iostream>
00034 #include <iterator>
00035
00036 namespace mrpt
00037 {
00038 namespace slam
00039 {
00040 namespace detail
00041 {
00042 using namespace mrpt;
00043 using namespace mrpt::math;
00044 using namespace std;
00045
00046
00047 struct MRPTDLLIMPEXP TPoseBin2D
00048 {
00049 TPoseBin2D() : x(0),y(0),phi(0) { }
00050
00051 int x,y,phi;
00052
00053
00054 struct MRPTDLLIMPEXP lt_operator
00055 {
00056 inline bool operator()(const TPoseBin2D& s1, const TPoseBin2D& s2) const
00057 {
00058 if (s1.x < s2.x) return true;
00059 if (s1.x > s2.x) return false;
00060 if (s1.y < s2.y) return true;
00061 if (s1.y > s2.y) return false;
00062 return s1.phi<s2.phi;
00063 }
00064 };
00065 };
00066
00067
00068 struct MRPTDLLIMPEXP TPathBin2D
00069 {
00070 std::vector<TPoseBin2D> bins;
00071
00072
00073 struct MRPTDLLIMPEXP lt_operator
00074 {
00075 bool operator()(const TPathBin2D& s1, const TPathBin2D& s2) const
00076 {
00077 ASSERT_(s1.bins.size()==s2.bins.size())
00078 for (size_t i=0;i<s1.bins.size();i++)
00079 {
00080 if (s1.bins[i].x < s2.bins[i].x) return true;
00081 if (s1.bins[i].x > s2.bins[i].x) return false;
00082 if (s1.bins[i].y < s2.bins[i].y) return true;
00083 if (s1.bins[i].y > s2.bins[i].y) return false;
00084 if (s1.bins[i].phi < s2.bins[i].phi) return true;
00085 if (s1.bins[i].phi > s2.bins[i].phi) return false;
00086
00087 }
00088 return false;
00089 }
00090 };
00091 };
00092
00093
00094 }
00095 }
00096 }
00097
00098 #endif