eXpress “1.5”

src/lengthdistribution.h

00001 
00009 #ifndef LengthDistribution_H
00010 #define LengthDistribution_H
00011 
00012 #include <vector>
00013 #include <string>
00014 
00022 class LengthDistribution {
00026   std::vector<double> _kernel;
00030   std::vector<double> _hist;
00034   double _tot_mass;
00039   double _sum;
00043   size_t _min;
00047   size_t _bin_size;
00048   
00049 public:
00065   LengthDistribution(double alpha, size_t max_val, size_t prior_mu,
00066                      size_t prior_sigma, size_t kernel_n, double kernel_p,
00067                      size_t bin_size = 1);
00076   LengthDistribution(std::string param_file_name, std::string length_type);
00081   size_t max_val() const;
00086   size_t min_val() const;
00091   double mean() const;
00098   void add_val(size_t len, double mass);
00104   double pmf(size_t len) const;
00111   double cmf(size_t len) const;
00117   std::vector<double> cmf() const;
00122   double tot_mass() const;
00129   std::string to_string() const;
00137   void append_output(std::ofstream& outfile, std::string length_type) const;
00138 };
00139 
00140 #endif
 All Classes Functions Variables