37 #ifndef PROBLIB_CONVERSIONS_H_ 38 #define PROBLIB_CONVERSIONS_H_ 40 #include "problib/PDF.h" PDF * msgToPDF(const problib::PDF &msg)
Converts a PDF ROS message to a PDF object.
Gaussian * msgToGaussian(const problib::PDF &msg)
Converts a PDF ROS message to a Gaussian object if the message represents a Gaussian.
This class represents the weighted sum of a finite set of probability density functions.
void serialize_hybrid(const Hybrid &hybrid, problib::PDF &msg)
Gaussian * deserialize_gaussian(const problib::PDF &msg, int &i_data)
This class represents a multi-variate Gaussian (Normal) distribution.
const PMF * PDFtoPMF(const PDF &pdf)
Casts a PDF object to a PMF if the PDF represents a PMF.
std::string typeToName(PDF::PDFType type)
const Uniform * PDFtoUniform(const PDF &pdf)
Casts a PDF object to a Uniform distribution if the PDF represents a Uniform distribution.
PMF * deserialize_discrete(const problib::PDF &msg)
void serialize_mixture(const Mixture &mix, problib::PDF &msg)
void serialize(const PDF &gauss, problib::PDF &msg)
void serialize_discrete(const PMF &pmf, problib::PDF &msg)
void serialize_uniform(const Uniform &uniform, problib::PDF &msg)
Hybrid * deserialize_hybrid(const problib::PDF &msg, int &i_data)
void serialize_gaussian(const Gaussian &gauss, problib::PDF &msg)
PMF * msgToPMF(const problib::PDF &msg)
Converts a PDF ROS message to a PMF object if the message represents a PMF.
Uniform * deserialize_uniform(const problib::PDF &msg, int &i_data)
PDF * deserialize_exact(const problib::PDF &msg)
Mixture * msgToMixture(const problib::PDF &msg)
Converts a PDF ROS message to a Mixture object if the message represents a Mixture.
const Mixture * PDFtoMixture(const PDF &pdf)
Casts a PDF object to a Mixture if the PDF represents a Mixture.
Mixture * deserialize_mixture(const problib::PDF &msg, int &i_data)
PDF * deserialize(const problib::PDF &msg, int type, int &i_data)
This class represents a discrete probability distribution (or probability mass function). Currently, this PMF can only take strings as values.
const Gaussian * PDFtoGaussian(const PDF &pdf)
Casts a PDF object to a Gaussian if the PDF represents a Gaussian.
void PDFtoMsg(const PDF &pdf, problib::PDF &msg)
Converts a PDF object to a ROS message.