$search
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-electric-tue/doc_stacks/2013-03-05_12-23-27.283047/wire/problib/msg/PDF.msg */ 00002 #ifndef PROBLIB_MESSAGE_PDF_H 00003 #define PROBLIB_MESSAGE_PDF_H 00004 #include <string> 00005 #include <vector> 00006 #include <map> 00007 #include <ostream> 00008 #include "ros/serialization.h" 00009 #include "ros/builtin_message_traits.h" 00010 #include "ros/message_operations.h" 00011 #include "ros/time.h" 00012 00013 #include "ros/macros.h" 00014 00015 #include "ros/assert.h" 00016 00017 00018 namespace problib 00019 { 00020 template <class ContainerAllocator> 00021 struct PDF_ { 00022 typedef PDF_<ContainerAllocator> Type; 00023 00024 PDF_() 00025 : type(0) 00026 , dimensions(0) 00027 , data() 00028 , domain_size(0) 00029 , values() 00030 , probabilities() 00031 , exact_value_str() 00032 , exact_value_vec() 00033 { 00034 } 00035 00036 PDF_(const ContainerAllocator& _alloc) 00037 : type(0) 00038 , dimensions(0) 00039 , data(_alloc) 00040 , domain_size(0) 00041 , values(_alloc) 00042 , probabilities(_alloc) 00043 , exact_value_str(_alloc) 00044 , exact_value_vec(_alloc) 00045 { 00046 } 00047 00048 typedef uint8_t _type_type; 00049 uint8_t type; 00050 00051 typedef uint32_t _dimensions_type; 00052 uint32_t dimensions; 00053 00054 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _data_type; 00055 std::vector<double, typename ContainerAllocator::template rebind<double>::other > data; 00056 00057 typedef int32_t _domain_size_type; 00058 int32_t domain_size; 00059 00060 typedef std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > _values_type; 00061 std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > values; 00062 00063 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _probabilities_type; 00064 std::vector<double, typename ContainerAllocator::template rebind<double>::other > probabilities; 00065 00066 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _exact_value_str_type; 00067 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > exact_value_str; 00068 00069 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _exact_value_vec_type; 00070 std::vector<double, typename ContainerAllocator::template rebind<double>::other > exact_value_vec; 00071 00072 enum { EXACT = 0 }; 00073 enum { GAUSSIAN = 1 }; 00074 enum { UNIFORM = 2 }; 00075 enum { PARTICLES = 3 }; 00076 enum { MIXTURE = 4 }; 00077 enum { DISCRETE = 5 }; 00078 enum { HYBRID = 6 }; 00079 00080 ROS_DEPRECATED uint32_t get_data_size() const { return (uint32_t)data.size(); } 00081 ROS_DEPRECATED void set_data_size(uint32_t size) { data.resize((size_t)size); } 00082 ROS_DEPRECATED void get_data_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->data; } 00083 ROS_DEPRECATED void set_data_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->data = vec; } 00084 ROS_DEPRECATED uint32_t get_values_size() const { return (uint32_t)values.size(); } 00085 ROS_DEPRECATED void set_values_size(uint32_t size) { values.resize((size_t)size); } 00086 ROS_DEPRECATED void get_values_vec(std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > & vec) const { vec = this->values; } 00087 ROS_DEPRECATED void set_values_vec(const std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > & vec) { this->values = vec; } 00088 ROS_DEPRECATED uint32_t get_probabilities_size() const { return (uint32_t)probabilities.size(); } 00089 ROS_DEPRECATED void set_probabilities_size(uint32_t size) { probabilities.resize((size_t)size); } 00090 ROS_DEPRECATED void get_probabilities_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->probabilities; } 00091 ROS_DEPRECATED void set_probabilities_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->probabilities = vec; } 00092 ROS_DEPRECATED uint32_t get_exact_value_vec_size() const { return (uint32_t)exact_value_vec.size(); } 00093 ROS_DEPRECATED void set_exact_value_vec_size(uint32_t size) { exact_value_vec.resize((size_t)size); } 00094 ROS_DEPRECATED void get_exact_value_vec_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->exact_value_vec; } 00095 ROS_DEPRECATED void set_exact_value_vec_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->exact_value_vec = vec; } 00096 private: 00097 static const char* __s_getDataType_() { return "problib/PDF"; } 00098 public: 00099 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00100 00101 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00102 00103 private: 00104 static const char* __s_getMD5Sum_() { return "75a0d678d0983733e909d6d13b746309"; } 00105 public: 00106 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00107 00108 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00109 00110 private: 00111 static const char* __s_getMessageDefinition_() { return "uint8 EXACT=0 # Is here for easier msg creation, but is actually a specialized case:\n\ 00112 # - continuous: is a Gaussian with zero covariance\n\ 00113 # - discrete: is a Discrete pdf with one entry with P=1 \n\ 00114 uint8 GAUSSIAN=1\n\ 00115 uint8 UNIFORM=2\n\ 00116 uint8 PARTICLES=3\n\ 00117 uint8 MIXTURE=4\n\ 00118 uint8 DISCRETE=5\n\ 00119 uint8 HYBRID=6\n\ 00120 \n\ 00121 uint8 type\n\ 00122 uint32 dimensions\n\ 00123 \n\ 00124 # For continuous pdf's\n\ 00125 float64[] data\n\ 00126 \n\ 00127 # For discrete pdf's (pmf)\n\ 00128 int32 domain_size\n\ 00129 string[] values\n\ 00130 float64[] probabilities\n\ 00131 \n\ 00132 # For exact values, either a string or a vector\n\ 00133 string exact_value_str\n\ 00134 float64[] exact_value_vec\n\ 00135 \n\ 00136 "; } 00137 public: 00138 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00139 00140 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00141 00142 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00143 { 00144 ros::serialization::OStream stream(write_ptr, 1000000000); 00145 ros::serialization::serialize(stream, type); 00146 ros::serialization::serialize(stream, dimensions); 00147 ros::serialization::serialize(stream, data); 00148 ros::serialization::serialize(stream, domain_size); 00149 ros::serialization::serialize(stream, values); 00150 ros::serialization::serialize(stream, probabilities); 00151 ros::serialization::serialize(stream, exact_value_str); 00152 ros::serialization::serialize(stream, exact_value_vec); 00153 return stream.getData(); 00154 } 00155 00156 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00157 { 00158 ros::serialization::IStream stream(read_ptr, 1000000000); 00159 ros::serialization::deserialize(stream, type); 00160 ros::serialization::deserialize(stream, dimensions); 00161 ros::serialization::deserialize(stream, data); 00162 ros::serialization::deserialize(stream, domain_size); 00163 ros::serialization::deserialize(stream, values); 00164 ros::serialization::deserialize(stream, probabilities); 00165 ros::serialization::deserialize(stream, exact_value_str); 00166 ros::serialization::deserialize(stream, exact_value_vec); 00167 return stream.getData(); 00168 } 00169 00170 ROS_DEPRECATED virtual uint32_t serializationLength() const 00171 { 00172 uint32_t size = 0; 00173 size += ros::serialization::serializationLength(type); 00174 size += ros::serialization::serializationLength(dimensions); 00175 size += ros::serialization::serializationLength(data); 00176 size += ros::serialization::serializationLength(domain_size); 00177 size += ros::serialization::serializationLength(values); 00178 size += ros::serialization::serializationLength(probabilities); 00179 size += ros::serialization::serializationLength(exact_value_str); 00180 size += ros::serialization::serializationLength(exact_value_vec); 00181 return size; 00182 } 00183 00184 typedef boost::shared_ptr< ::problib::PDF_<ContainerAllocator> > Ptr; 00185 typedef boost::shared_ptr< ::problib::PDF_<ContainerAllocator> const> ConstPtr; 00186 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00187 }; // struct PDF 00188 typedef ::problib::PDF_<std::allocator<void> > PDF; 00189 00190 typedef boost::shared_ptr< ::problib::PDF> PDFPtr; 00191 typedef boost::shared_ptr< ::problib::PDF const> PDFConstPtr; 00192 00193 00194 template<typename ContainerAllocator> 00195 std::ostream& operator<<(std::ostream& s, const ::problib::PDF_<ContainerAllocator> & v) 00196 { 00197 ros::message_operations::Printer< ::problib::PDF_<ContainerAllocator> >::stream(s, "", v); 00198 return s;} 00199 00200 } // namespace problib 00201 00202 namespace ros 00203 { 00204 namespace message_traits 00205 { 00206 template<class ContainerAllocator> struct IsMessage< ::problib::PDF_<ContainerAllocator> > : public TrueType {}; 00207 template<class ContainerAllocator> struct IsMessage< ::problib::PDF_<ContainerAllocator> const> : public TrueType {}; 00208 template<class ContainerAllocator> 00209 struct MD5Sum< ::problib::PDF_<ContainerAllocator> > { 00210 static const char* value() 00211 { 00212 return "75a0d678d0983733e909d6d13b746309"; 00213 } 00214 00215 static const char* value(const ::problib::PDF_<ContainerAllocator> &) { return value(); } 00216 static const uint64_t static_value1 = 0x75a0d678d0983733ULL; 00217 static const uint64_t static_value2 = 0xe909d6d13b746309ULL; 00218 }; 00219 00220 template<class ContainerAllocator> 00221 struct DataType< ::problib::PDF_<ContainerAllocator> > { 00222 static const char* value() 00223 { 00224 return "problib/PDF"; 00225 } 00226 00227 static const char* value(const ::problib::PDF_<ContainerAllocator> &) { return value(); } 00228 }; 00229 00230 template<class ContainerAllocator> 00231 struct Definition< ::problib::PDF_<ContainerAllocator> > { 00232 static const char* value() 00233 { 00234 return "uint8 EXACT=0 # Is here for easier msg creation, but is actually a specialized case:\n\ 00235 # - continuous: is a Gaussian with zero covariance\n\ 00236 # - discrete: is a Discrete pdf with one entry with P=1 \n\ 00237 uint8 GAUSSIAN=1\n\ 00238 uint8 UNIFORM=2\n\ 00239 uint8 PARTICLES=3\n\ 00240 uint8 MIXTURE=4\n\ 00241 uint8 DISCRETE=5\n\ 00242 uint8 HYBRID=6\n\ 00243 \n\ 00244 uint8 type\n\ 00245 uint32 dimensions\n\ 00246 \n\ 00247 # For continuous pdf's\n\ 00248 float64[] data\n\ 00249 \n\ 00250 # For discrete pdf's (pmf)\n\ 00251 int32 domain_size\n\ 00252 string[] values\n\ 00253 float64[] probabilities\n\ 00254 \n\ 00255 # For exact values, either a string or a vector\n\ 00256 string exact_value_str\n\ 00257 float64[] exact_value_vec\n\ 00258 \n\ 00259 "; 00260 } 00261 00262 static const char* value(const ::problib::PDF_<ContainerAllocator> &) { return value(); } 00263 }; 00264 00265 } // namespace message_traits 00266 } // namespace ros 00267 00268 namespace ros 00269 { 00270 namespace serialization 00271 { 00272 00273 template<class ContainerAllocator> struct Serializer< ::problib::PDF_<ContainerAllocator> > 00274 { 00275 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00276 { 00277 stream.next(m.type); 00278 stream.next(m.dimensions); 00279 stream.next(m.data); 00280 stream.next(m.domain_size); 00281 stream.next(m.values); 00282 stream.next(m.probabilities); 00283 stream.next(m.exact_value_str); 00284 stream.next(m.exact_value_vec); 00285 } 00286 00287 ROS_DECLARE_ALLINONE_SERIALIZER; 00288 }; // struct PDF_ 00289 } // namespace serialization 00290 } // namespace ros 00291 00292 namespace ros 00293 { 00294 namespace message_operations 00295 { 00296 00297 template<class ContainerAllocator> 00298 struct Printer< ::problib::PDF_<ContainerAllocator> > 00299 { 00300 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::problib::PDF_<ContainerAllocator> & v) 00301 { 00302 s << indent << "type: "; 00303 Printer<uint8_t>::stream(s, indent + " ", v.type); 00304 s << indent << "dimensions: "; 00305 Printer<uint32_t>::stream(s, indent + " ", v.dimensions); 00306 s << indent << "data[]" << std::endl; 00307 for (size_t i = 0; i < v.data.size(); ++i) 00308 { 00309 s << indent << " data[" << i << "]: "; 00310 Printer<double>::stream(s, indent + " ", v.data[i]); 00311 } 00312 s << indent << "domain_size: "; 00313 Printer<int32_t>::stream(s, indent + " ", v.domain_size); 00314 s << indent << "values[]" << std::endl; 00315 for (size_t i = 0; i < v.values.size(); ++i) 00316 { 00317 s << indent << " values[" << i << "]: "; 00318 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.values[i]); 00319 } 00320 s << indent << "probabilities[]" << std::endl; 00321 for (size_t i = 0; i < v.probabilities.size(); ++i) 00322 { 00323 s << indent << " probabilities[" << i << "]: "; 00324 Printer<double>::stream(s, indent + " ", v.probabilities[i]); 00325 } 00326 s << indent << "exact_value_str: "; 00327 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.exact_value_str); 00328 s << indent << "exact_value_vec[]" << std::endl; 00329 for (size_t i = 0; i < v.exact_value_vec.size(); ++i) 00330 { 00331 s << indent << " exact_value_vec[" << i << "]: "; 00332 Printer<double>::stream(s, indent + " ", v.exact_value_vec[i]); 00333 } 00334 } 00335 }; 00336 00337 00338 } // namespace message_operations 00339 } // namespace ros 00340 00341 #endif // PROBLIB_MESSAGE_PDF_H 00342