$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/PDFImpl.msg */ 00002 #ifndef PROBLIB_MESSAGE_PDFIMPL_H 00003 #define PROBLIB_MESSAGE_PDFIMPL_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 #include "problib/DimensionDescription.h" 00018 00019 namespace problib 00020 { 00021 template <class ContainerAllocator> 00022 struct PDFImpl_ { 00023 typedef PDFImpl_<ContainerAllocator> Type; 00024 00025 PDFImpl_() 00026 : type(0) 00027 , num_dimensions(0) 00028 , dimensions() 00029 , mean() 00030 , covariance() 00031 , density(0.0) 00032 , probabilities() 00033 , sub_pdf_ptrs() 00034 , domain_size(0) 00035 , values_float() 00036 , values_string() 00037 { 00038 } 00039 00040 PDFImpl_(const ContainerAllocator& _alloc) 00041 : type(0) 00042 , num_dimensions(0) 00043 , dimensions(_alloc) 00044 , mean(_alloc) 00045 , covariance(_alloc) 00046 , density(0.0) 00047 , probabilities(_alloc) 00048 , sub_pdf_ptrs(_alloc) 00049 , domain_size(0) 00050 , values_float(_alloc) 00051 , values_string(_alloc) 00052 { 00053 } 00054 00055 typedef uint8_t _type_type; 00056 uint8_t type; 00057 00058 typedef uint32_t _num_dimensions_type; 00059 uint32_t num_dimensions; 00060 00061 typedef std::vector< ::problib::DimensionDescription_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::problib::DimensionDescription_<ContainerAllocator> >::other > _dimensions_type; 00062 std::vector< ::problib::DimensionDescription_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::problib::DimensionDescription_<ContainerAllocator> >::other > dimensions; 00063 00064 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _mean_type; 00065 std::vector<double, typename ContainerAllocator::template rebind<double>::other > mean; 00066 00067 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _covariance_type; 00068 std::vector<double, typename ContainerAllocator::template rebind<double>::other > covariance; 00069 00070 typedef double _density_type; 00071 double density; 00072 00073 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _probabilities_type; 00074 std::vector<double, typename ContainerAllocator::template rebind<double>::other > probabilities; 00075 00076 typedef std::vector<uint32_t, typename ContainerAllocator::template rebind<uint32_t>::other > _sub_pdf_ptrs_type; 00077 std::vector<uint32_t, typename ContainerAllocator::template rebind<uint32_t>::other > sub_pdf_ptrs; 00078 00079 typedef int32_t _domain_size_type; 00080 int32_t domain_size; 00081 00082 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _values_float_type; 00083 std::vector<double, typename ContainerAllocator::template rebind<double>::other > values_float; 00084 00085 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_string_type; 00086 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_string; 00087 00088 enum { GAUSSIAN = 1 }; 00089 enum { UNIFORM = 2 }; 00090 enum { DISJUNCTION_STRING = 3 }; 00091 enum { DISJUNCTION_FLOAT = 4 }; 00092 enum { DISJUNCTION_PDF = 5 }; 00093 enum { CONJUNCTION = 6 }; 00094 00095 ROS_DEPRECATED uint32_t get_dimensions_size() const { return (uint32_t)dimensions.size(); } 00096 ROS_DEPRECATED void set_dimensions_size(uint32_t size) { dimensions.resize((size_t)size); } 00097 ROS_DEPRECATED void get_dimensions_vec(std::vector< ::problib::DimensionDescription_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::problib::DimensionDescription_<ContainerAllocator> >::other > & vec) const { vec = this->dimensions; } 00098 ROS_DEPRECATED void set_dimensions_vec(const std::vector< ::problib::DimensionDescription_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::problib::DimensionDescription_<ContainerAllocator> >::other > & vec) { this->dimensions = vec; } 00099 ROS_DEPRECATED uint32_t get_mean_size() const { return (uint32_t)mean.size(); } 00100 ROS_DEPRECATED void set_mean_size(uint32_t size) { mean.resize((size_t)size); } 00101 ROS_DEPRECATED void get_mean_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->mean; } 00102 ROS_DEPRECATED void set_mean_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->mean = vec; } 00103 ROS_DEPRECATED uint32_t get_covariance_size() const { return (uint32_t)covariance.size(); } 00104 ROS_DEPRECATED void set_covariance_size(uint32_t size) { covariance.resize((size_t)size); } 00105 ROS_DEPRECATED void get_covariance_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->covariance; } 00106 ROS_DEPRECATED void set_covariance_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->covariance = vec; } 00107 ROS_DEPRECATED uint32_t get_probabilities_size() const { return (uint32_t)probabilities.size(); } 00108 ROS_DEPRECATED void set_probabilities_size(uint32_t size) { probabilities.resize((size_t)size); } 00109 ROS_DEPRECATED void get_probabilities_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->probabilities; } 00110 ROS_DEPRECATED void set_probabilities_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->probabilities = vec; } 00111 ROS_DEPRECATED uint32_t get_sub_pdf_ptrs_size() const { return (uint32_t)sub_pdf_ptrs.size(); } 00112 ROS_DEPRECATED void set_sub_pdf_ptrs_size(uint32_t size) { sub_pdf_ptrs.resize((size_t)size); } 00113 ROS_DEPRECATED void get_sub_pdf_ptrs_vec(std::vector<uint32_t, typename ContainerAllocator::template rebind<uint32_t>::other > & vec) const { vec = this->sub_pdf_ptrs; } 00114 ROS_DEPRECATED void set_sub_pdf_ptrs_vec(const std::vector<uint32_t, typename ContainerAllocator::template rebind<uint32_t>::other > & vec) { this->sub_pdf_ptrs = vec; } 00115 ROS_DEPRECATED uint32_t get_values_float_size() const { return (uint32_t)values_float.size(); } 00116 ROS_DEPRECATED void set_values_float_size(uint32_t size) { values_float.resize((size_t)size); } 00117 ROS_DEPRECATED void get_values_float_vec(std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) const { vec = this->values_float; } 00118 ROS_DEPRECATED void set_values_float_vec(const std::vector<double, typename ContainerAllocator::template rebind<double>::other > & vec) { this->values_float = vec; } 00119 ROS_DEPRECATED uint32_t get_values_string_size() const { return (uint32_t)values_string.size(); } 00120 ROS_DEPRECATED void set_values_string_size(uint32_t size) { values_string.resize((size_t)size); } 00121 ROS_DEPRECATED void get_values_string_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_string; } 00122 ROS_DEPRECATED void set_values_string_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_string = vec; } 00123 private: 00124 static const char* __s_getDataType_() { return "problib/PDFImpl"; } 00125 public: 00126 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00127 00128 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00129 00130 private: 00131 static const char* __s_getMD5Sum_() { return "fb6528e73eebd5785d5111d28934c039"; } 00132 public: 00133 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00134 00135 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00136 00137 private: 00138 static const char* __s_getMessageDefinition_() { return "uint8 GAUSSIAN=1\n\ 00139 uint8 UNIFORM=2\n\ 00140 uint8 DISJUNCTION_STRING = 3 # PMF\n\ 00141 uint8 DISJUNCTION_FLOAT = 4 # PMF\n\ 00142 uint8 DISJUNCTION_PDF = 5 # Mixture\n\ 00143 uint8 CONJUNCTION = 6\n\ 00144 \n\ 00145 uint8 type\n\ 00146 uint32 num_dimensions\n\ 00147 DimensionDescription[] dimensions\n\ 00148 \n\ 00149 # Gaussian\n\ 00150 float64[] mean\n\ 00151 float64[] covariance\n\ 00152 \n\ 00153 # Uniform\n\ 00154 float64 density\n\ 00155 \n\ 00156 # For both mixture and discrete \n\ 00157 float64[] probabilities\n\ 00158 \n\ 00159 # mixture of PFDs (conjunction or disjunction)\n\ 00160 uint32[] sub_pdf_ptrs\n\ 00161 \n\ 00162 # discrete\n\ 00163 int32 domain_size\n\ 00164 float64[] values_float\n\ 00165 string[] values_string\n\ 00166 \n\ 00167 \n\ 00168 ================================================================================\n\ 00169 MSG: problib/DimensionDescription\n\ 00170 # example: object1.pos_x = [\"object1\", \"pos_x\"]\n\ 00171 string[] fields\n\ 00172 \n\ 00173 "; } 00174 public: 00175 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00176 00177 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00178 00179 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00180 { 00181 ros::serialization::OStream stream(write_ptr, 1000000000); 00182 ros::serialization::serialize(stream, type); 00183 ros::serialization::serialize(stream, num_dimensions); 00184 ros::serialization::serialize(stream, dimensions); 00185 ros::serialization::serialize(stream, mean); 00186 ros::serialization::serialize(stream, covariance); 00187 ros::serialization::serialize(stream, density); 00188 ros::serialization::serialize(stream, probabilities); 00189 ros::serialization::serialize(stream, sub_pdf_ptrs); 00190 ros::serialization::serialize(stream, domain_size); 00191 ros::serialization::serialize(stream, values_float); 00192 ros::serialization::serialize(stream, values_string); 00193 return stream.getData(); 00194 } 00195 00196 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00197 { 00198 ros::serialization::IStream stream(read_ptr, 1000000000); 00199 ros::serialization::deserialize(stream, type); 00200 ros::serialization::deserialize(stream, num_dimensions); 00201 ros::serialization::deserialize(stream, dimensions); 00202 ros::serialization::deserialize(stream, mean); 00203 ros::serialization::deserialize(stream, covariance); 00204 ros::serialization::deserialize(stream, density); 00205 ros::serialization::deserialize(stream, probabilities); 00206 ros::serialization::deserialize(stream, sub_pdf_ptrs); 00207 ros::serialization::deserialize(stream, domain_size); 00208 ros::serialization::deserialize(stream, values_float); 00209 ros::serialization::deserialize(stream, values_string); 00210 return stream.getData(); 00211 } 00212 00213 ROS_DEPRECATED virtual uint32_t serializationLength() const 00214 { 00215 uint32_t size = 0; 00216 size += ros::serialization::serializationLength(type); 00217 size += ros::serialization::serializationLength(num_dimensions); 00218 size += ros::serialization::serializationLength(dimensions); 00219 size += ros::serialization::serializationLength(mean); 00220 size += ros::serialization::serializationLength(covariance); 00221 size += ros::serialization::serializationLength(density); 00222 size += ros::serialization::serializationLength(probabilities); 00223 size += ros::serialization::serializationLength(sub_pdf_ptrs); 00224 size += ros::serialization::serializationLength(domain_size); 00225 size += ros::serialization::serializationLength(values_float); 00226 size += ros::serialization::serializationLength(values_string); 00227 return size; 00228 } 00229 00230 typedef boost::shared_ptr< ::problib::PDFImpl_<ContainerAllocator> > Ptr; 00231 typedef boost::shared_ptr< ::problib::PDFImpl_<ContainerAllocator> const> ConstPtr; 00232 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00233 }; // struct PDFImpl 00234 typedef ::problib::PDFImpl_<std::allocator<void> > PDFImpl; 00235 00236 typedef boost::shared_ptr< ::problib::PDFImpl> PDFImplPtr; 00237 typedef boost::shared_ptr< ::problib::PDFImpl const> PDFImplConstPtr; 00238 00239 00240 template<typename ContainerAllocator> 00241 std::ostream& operator<<(std::ostream& s, const ::problib::PDFImpl_<ContainerAllocator> & v) 00242 { 00243 ros::message_operations::Printer< ::problib::PDFImpl_<ContainerAllocator> >::stream(s, "", v); 00244 return s;} 00245 00246 } // namespace problib 00247 00248 namespace ros 00249 { 00250 namespace message_traits 00251 { 00252 template<class ContainerAllocator> struct IsMessage< ::problib::PDFImpl_<ContainerAllocator> > : public TrueType {}; 00253 template<class ContainerAllocator> struct IsMessage< ::problib::PDFImpl_<ContainerAllocator> const> : public TrueType {}; 00254 template<class ContainerAllocator> 00255 struct MD5Sum< ::problib::PDFImpl_<ContainerAllocator> > { 00256 static const char* value() 00257 { 00258 return "fb6528e73eebd5785d5111d28934c039"; 00259 } 00260 00261 static const char* value(const ::problib::PDFImpl_<ContainerAllocator> &) { return value(); } 00262 static const uint64_t static_value1 = 0xfb6528e73eebd578ULL; 00263 static const uint64_t static_value2 = 0x5d5111d28934c039ULL; 00264 }; 00265 00266 template<class ContainerAllocator> 00267 struct DataType< ::problib::PDFImpl_<ContainerAllocator> > { 00268 static const char* value() 00269 { 00270 return "problib/PDFImpl"; 00271 } 00272 00273 static const char* value(const ::problib::PDFImpl_<ContainerAllocator> &) { return value(); } 00274 }; 00275 00276 template<class ContainerAllocator> 00277 struct Definition< ::problib::PDFImpl_<ContainerAllocator> > { 00278 static const char* value() 00279 { 00280 return "uint8 GAUSSIAN=1\n\ 00281 uint8 UNIFORM=2\n\ 00282 uint8 DISJUNCTION_STRING = 3 # PMF\n\ 00283 uint8 DISJUNCTION_FLOAT = 4 # PMF\n\ 00284 uint8 DISJUNCTION_PDF = 5 # Mixture\n\ 00285 uint8 CONJUNCTION = 6\n\ 00286 \n\ 00287 uint8 type\n\ 00288 uint32 num_dimensions\n\ 00289 DimensionDescription[] dimensions\n\ 00290 \n\ 00291 # Gaussian\n\ 00292 float64[] mean\n\ 00293 float64[] covariance\n\ 00294 \n\ 00295 # Uniform\n\ 00296 float64 density\n\ 00297 \n\ 00298 # For both mixture and discrete \n\ 00299 float64[] probabilities\n\ 00300 \n\ 00301 # mixture of PFDs (conjunction or disjunction)\n\ 00302 uint32[] sub_pdf_ptrs\n\ 00303 \n\ 00304 # discrete\n\ 00305 int32 domain_size\n\ 00306 float64[] values_float\n\ 00307 string[] values_string\n\ 00308 \n\ 00309 \n\ 00310 ================================================================================\n\ 00311 MSG: problib/DimensionDescription\n\ 00312 # example: object1.pos_x = [\"object1\", \"pos_x\"]\n\ 00313 string[] fields\n\ 00314 \n\ 00315 "; 00316 } 00317 00318 static const char* value(const ::problib::PDFImpl_<ContainerAllocator> &) { return value(); } 00319 }; 00320 00321 } // namespace message_traits 00322 } // namespace ros 00323 00324 namespace ros 00325 { 00326 namespace serialization 00327 { 00328 00329 template<class ContainerAllocator> struct Serializer< ::problib::PDFImpl_<ContainerAllocator> > 00330 { 00331 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00332 { 00333 stream.next(m.type); 00334 stream.next(m.num_dimensions); 00335 stream.next(m.dimensions); 00336 stream.next(m.mean); 00337 stream.next(m.covariance); 00338 stream.next(m.density); 00339 stream.next(m.probabilities); 00340 stream.next(m.sub_pdf_ptrs); 00341 stream.next(m.domain_size); 00342 stream.next(m.values_float); 00343 stream.next(m.values_string); 00344 } 00345 00346 ROS_DECLARE_ALLINONE_SERIALIZER; 00347 }; // struct PDFImpl_ 00348 } // namespace serialization 00349 } // namespace ros 00350 00351 namespace ros 00352 { 00353 namespace message_operations 00354 { 00355 00356 template<class ContainerAllocator> 00357 struct Printer< ::problib::PDFImpl_<ContainerAllocator> > 00358 { 00359 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::problib::PDFImpl_<ContainerAllocator> & v) 00360 { 00361 s << indent << "type: "; 00362 Printer<uint8_t>::stream(s, indent + " ", v.type); 00363 s << indent << "num_dimensions: "; 00364 Printer<uint32_t>::stream(s, indent + " ", v.num_dimensions); 00365 s << indent << "dimensions[]" << std::endl; 00366 for (size_t i = 0; i < v.dimensions.size(); ++i) 00367 { 00368 s << indent << " dimensions[" << i << "]: "; 00369 s << std::endl; 00370 s << indent; 00371 Printer< ::problib::DimensionDescription_<ContainerAllocator> >::stream(s, indent + " ", v.dimensions[i]); 00372 } 00373 s << indent << "mean[]" << std::endl; 00374 for (size_t i = 0; i < v.mean.size(); ++i) 00375 { 00376 s << indent << " mean[" << i << "]: "; 00377 Printer<double>::stream(s, indent + " ", v.mean[i]); 00378 } 00379 s << indent << "covariance[]" << std::endl; 00380 for (size_t i = 0; i < v.covariance.size(); ++i) 00381 { 00382 s << indent << " covariance[" << i << "]: "; 00383 Printer<double>::stream(s, indent + " ", v.covariance[i]); 00384 } 00385 s << indent << "density: "; 00386 Printer<double>::stream(s, indent + " ", v.density); 00387 s << indent << "probabilities[]" << std::endl; 00388 for (size_t i = 0; i < v.probabilities.size(); ++i) 00389 { 00390 s << indent << " probabilities[" << i << "]: "; 00391 Printer<double>::stream(s, indent + " ", v.probabilities[i]); 00392 } 00393 s << indent << "sub_pdf_ptrs[]" << std::endl; 00394 for (size_t i = 0; i < v.sub_pdf_ptrs.size(); ++i) 00395 { 00396 s << indent << " sub_pdf_ptrs[" << i << "]: "; 00397 Printer<uint32_t>::stream(s, indent + " ", v.sub_pdf_ptrs[i]); 00398 } 00399 s << indent << "domain_size: "; 00400 Printer<int32_t>::stream(s, indent + " ", v.domain_size); 00401 s << indent << "values_float[]" << std::endl; 00402 for (size_t i = 0; i < v.values_float.size(); ++i) 00403 { 00404 s << indent << " values_float[" << i << "]: "; 00405 Printer<double>::stream(s, indent + " ", v.values_float[i]); 00406 } 00407 s << indent << "values_string[]" << std::endl; 00408 for (size_t i = 0; i < v.values_string.size(); ++i) 00409 { 00410 s << indent << " values_string[" << i << "]: "; 00411 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.values_string[i]); 00412 } 00413 } 00414 }; 00415 00416 00417 } // namespace message_operations 00418 } // namespace ros 00419 00420 #endif // PROBLIB_MESSAGE_PDFIMPL_H 00421