Skip to content

Commit

Permalink
fix2 estimateZ
Browse files Browse the repository at this point in the history
  • Loading branch information
chung@molgen.mpg.de committed Jan 20, 2016
1 parent de3d4bb commit 03626e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rmn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ void estimateZ(
double& lnL
){
arma::uword L = z.size();
std::vector<double> F(L + 1);
std::vector<double> B(L + 1);
std::vector<double> F(L + 2);
std::vector<double> B(L + 2);
std::vector<double>::iterator F_it = F.begin();
std::vector<double>::reverse_iterator B_it = B.rbegin();
std::vector<double>::const_iterator forlnEmPN_it = lnEmPN.begin();
Expand Down Expand Up @@ -73,7 +73,7 @@ void estimateZ(

// calculate posterior;
forlnEmPN_it = lnEmPN.begin();
for (i = 0; i < L; i++){
for (i = 1; i <= L; i++){
empty(i - 1) = exp(F[i - 1] + B[i + 1] - lnL);

if (i >= w){
Expand Down

0 comments on commit 03626e8

Please sign in to comment.