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 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 #ifndef PROBLIB_CONVERSIONS_H_
00038 #define PROBLIB_CONVERSIONS_H_
00039 
00040 #include "problib/PDF.h"
00041 
00042 #include "problib/pdfs/Gaussian.h"
00043 #include "problib/pdfs/Mixture.h"
00044 #include "problib/pdfs/Hybrid.h"
00045 #include "problib/pdfs/PMF.h"
00046 
00047 #include "problib/datatypes.h"
00048 
00049 namespace pbl {
00050 
00051 
00052 
00058 void PDFtoMsg(const PDF& pdf, problib::PDF& msg);
00059 
00065 problib::PDF PDFtoMsg(const PDF& pdf);
00066 
00072 PDF* msgToPDF(const problib::PDF& msg);
00073 
00080 Gaussian* msgToGaussian(const problib::PDF& msg);
00081 
00088 Mixture* msgToMixture(const problib::PDF& msg);
00089 
00096 PMF* msgToPMF(const problib::PDF& msg);
00097 
00103 const Gaussian* PDFtoGaussian(const PDF& pdf);
00104 
00110 const Mixture* PDFtoMixture(const PDF& pdf);
00111 
00117 const Uniform* PDFtoUniform(const PDF& pdf);
00118 
00119 
00125 const PMF* PDFtoPMF(const PDF& pdf);
00126 
00127 
00128 
00129 std::string typeToName(PDF::PDFType type);
00130 
00131 
00132 
00133 void serialize(const PDF& gauss, problib::PDF& msg);
00134 
00135 PDF* deserialize(const problib::PDF& msg, int type, int& i_data);
00136 
00137 void serialize_gaussian(const Gaussian& gauss, problib::PDF& msg);
00138 
00139 Gaussian* deserialize_gaussian(const problib::PDF& msg, int& i_data);
00140 
00141 void serialize_mixture(const Mixture& mix, problib::PDF& msg);
00142 
00143 Mixture* deserialize_mixture(const problib::PDF& msg, int& i_data);
00144 
00145 void serialize_uniform(const Uniform& uniform, problib::PDF& msg);
00146 
00147 Uniform* deserialize_uniform(const problib::PDF& msg, int& i_data);
00148 
00149 void serialize_hybrid(const Hybrid& hybrid, problib::PDF& msg);
00150 
00151 Hybrid *deserialize_hybrid(const problib::PDF& msg, int& i_data);
00152 
00153 void serialize_discrete(const PMF& pmf, problib::PDF& msg);
00154 
00155 PMF* deserialize_discrete(const problib::PDF& msg);
00156 
00157 PDF* deserialize_exact(const problib::PDF& msg);
00158 
00159 }
00160 
00161 #endif