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 #ifndef __DISCRETE_CONDITIONAL_PDF__
00021 #define __DISCRETE_CONDITIONAL_PDF__
00022
00023 #include "conditionalpdf.h"
00024
00025 namespace BFL
00026 {
00027
00029
00053 class DiscreteConditionalPdf : public ConditionalPdf<int, int>
00054 {
00055 protected:
00057 unsigned int _num_states;
00058
00060
00063 double * _probability_p;
00065 int * _cond_arg_dims_p;
00066
00068 int _total_dimension;
00069
00071 int IndexGet(const int& input, const std::vector<int>& condargs) const;
00072
00073
00074
00075 mutable std::vector<double> _probs;
00076 mutable std::vector<double> _valuelist;
00077
00078 public:
00080
00090 DiscreteConditionalPdf(int num_states=1,
00091 int num_conditional_arguments=1,
00092 int cond_arg_dimensions[] = NULL);
00094 DiscreteConditionalPdf(const DiscreteConditionalPdf & pdf);
00096 virtual ~DiscreteConditionalPdf();
00097
00099 virtual DiscreteConditionalPdf* Clone() const;
00100
00102 unsigned int NumStatesGet()const;
00103
00104
00105 Probability ProbabilityGet(const int& input) const;
00106 virtual bool SampleFrom (Sample<int>& one_sample, int method, void * args) const;
00107 virtual bool SampleFrom (vector<Sample<int> >& list_samples, int num_samples, int method, void * args) const;
00108
00110 void ProbabilitySet(const double& prob, const int& input, const std::vector<int>& condargs) const;
00111
00112
00113 };
00114
00115 }
00116
00117 #endif // __DISCRETE_CONDITIONAL_PDF__
bfl
Author(s): Klaas Gadeyne, Wim Meeussen, Tinne Delaet and many others. See web page for a full contributor list. ROS package maintained by Wim Meeussen.
autogenerated on Thu Feb 11 2016 22:31:56