eXpress “1.5”

src/markovmodel.h

00001 
00009 #ifndef express_markovmodel_h
00010 #define express_markovmodel_h
00011 
00012 #include <vector>
00013 #include <string>
00014 #include "frequencymatrix.h"
00015 
00016 class Sequence;
00017 
00028 class MarkovModel {
00032   int _order;
00036   int _window_size;
00040   int _num_pos;
00044   std::vector<FrequencyMatrix<double> > _params;
00049   size_t _bitclear;
00050 
00051  public:
00060   MarkovModel(size_t order, size_t window_size, size_t num_pos, double alpha);
00069   double transition_prob(size_t p, size_t cond, size_t curr) const;
00077   double seq_prob(const Sequence& seq, int left) const;
00085   void update(const Sequence& seq, int left, double mass);
00093   void update(size_t p, size_t i, size_t j, double mass);
00106   size_t get_indices(const Sequence& seq, int left, std::vector<char>& indices);
00116   std::vector<char> get_indices(const Sequence& seq);
00125   double marginal_prob(size_t w, size_t nuc) const;
00135   void fast_learn(const Sequence& seq, double mass,
00136                   const std::vector<double>& fl_cmf);
00141   void calc_marginals();
00142 };
00143 
00144 #endif
 All Classes Functions Variables