Exemple #1
0
   void TPM::notify()const{
     for(ObsSet::iterator it = observers.begin();
 	it!=observers.end(); ++it){
       Ptr<VectorParams> vp= *it;
       vp->set( get_stat_dist(value()));
     }
   }
Exemple #2
0
  void MarkovModel::mle(){
    Mat Q(this->Q());
    for(uint i=0; i< Q.nrow(); ++i){
      Vec tmp(suf()->trans().row(i));
      Q.set_row(i, tmp/tmp.sum());}
    set_Q(Q);

    if(pi0_status==Free){
      const Vec &tmp(suf()->init());
      set_pi0(tmp/sum(tmp));
    }else if(pi0_status==Stationary){
      set_pi0(get_stat_dist(Q));
    }
  }
Exemple #3
0
 Vec MarkovModel::stat_dist()const{
   return get_stat_dist(Q()); }
Exemple #4
0
 void SDO::operator()(const Mat &m){
   Vec x = get_stat_dist(m);
   stat->set(x);
 }
Exemple #5
0
 void TPM::notify() const {
   for (const auto &el : observers) {
     el->set(get_stat_dist(value()));
   }
 }