Changeset 77c3523 in tol


Ignore:
Timestamp:
Apr 13, 2009, 7:26:21 AM (18 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
75b716c
Parents:
a2a1c99
Message:

Simplifying behaviour of method draw

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@922 be4846ae-f051-483a-831f-b64e7d08527f

Location:
tol/stdlib/math/stat/models/bayesian/bysMcmc/bsr/gibbs
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • tol/stdlib/math/stat/models/bayesian/bysMcmc/bsr/gibbs/_arimaBlock.tol

    ra2a1c99 r77c3523  
    579579    Matrix values = SetCol(arma.draw.all);
    580580  //WriteLn("TRACE"+_MID+" draw 3 "<<Matrix Tra(values));
    581     Real Do setStore(values);
    582     Copy(_.store)
     581    Mat2VMat(values)
    583582  };
    584583
    … …  
    602601  ////////////////////////////////////////////////////////////////////////////
    603602  {
    604   //WriteLn("TRACE"+_MID+" draw 1 ");
    605     If(And(enabled, numSim%_skipIter==0),
    606     {
    607     //WriteLn("TRACE"+_MID+" draw 2 ");
    608       draw.scalar(numSim, _.ws::noise, _.ws::sigma.full)
    609     },
    610     {
    611       Copy(_.store)
    612     })
     603    draw.scalar(numSim, _.ws::noise, _.ws::sigma.full)
    613604  };
    614605
  • tol/stdlib/math/stat/models/bayesian/bysMcmc/bsr/gibbs/_nonLinBlock.tol

    ra2a1c99 r77c3523  
    230230  //WriteLn("TRACE"+_MID+"draw.scalar 3");
    231231  //Real show.arma(0);
    232     Real Do setStore(SetCol(draw.all));
    233     Copy(_.store)
     232    Mat2VMat(SetCol(draw.all))
    234233  };
    235234
    … …  
    249248  {
    250249  //WriteLn("TRACE"+_MID+"draw 1");
    251     If(enabled,
    252     {
    253       draw.scalar(numSim)
    254     },
    255     {
    256       Copy(_.store)
    257     })
     250    draw.scalar(numSim)
    258251  };
    259252
  • tol/stdlib/math/stat/models/bayesian/bysMcmc/bsr/gibbs/_sigmaBlock.tol

    ra2a1c99 r77c3523  
    153153      })
    154154    });
    155   //WriteLn("TRACE "+_MID+" draw.invRandChisq 3 ");
    156     Real Do setStore(SetCol(v));
    157   //WriteLn("TRACE "+_MID+" draw.invRandChisq 4 ");
    158     Copy(_.store)
     155    Mat2VMat(SetCol(v))
    159156  };
    160157
    … …  
    177174  ////////////////////////////////////////////////////////////////////////////
    178175  {
    179     If(enabled,
    180     {
    181       draw.invRandChisq(numSim, _.ws::residuals)
    182     },
    183     {
    184       Copy(_.store)
    185     })
     176    draw.invRandChisq(numSim, _.ws::residuals)
    186177  };
    187178
  • tol/stdlib/math/stat/models/bayesian/bysMcmc/bsr/gibbs/_stdLinearBlock.tol

    ra2a1c99 r77c3523  
    434434  {
    435435  //WriteLn("TRACE "+_MID+" draw 1");
    436     VMatrix b = If(Not(enabled), _.store,
    437     {
    438     //WriteLn("TRACE "+_MID+" draw 3");
    439       Real _.calculatedSimulation := _.calculatedSimulation+1;
    440     //WriteLn("TRACE "+_MID+" draw 4");
    441       If(And(_.calculatedSimulation >_.MH.useAfterIter,
    442              _.MH.consecutive <= _.MH.maxConsecutive),
    443         draw.mh   (numSim),
    444         draw.gibbs(numSim))
    445     });
    446     Real putStoreV(b);
    447     _.store
     436    Real _.calculatedSimulation := _.calculatedSimulation+1;
     437  //WriteLn("TRACE "+_MID+" draw 4");
     438    If(And(_.calculatedSimulation >_.MH.useAfterIter,
     439           _.MH.consecutive <= _.MH.maxConsecutive),
     440       draw.mh   (numSim),
     441       draw.gibbs(numSim))
    448442  }
    449443
Note: See TracChangeset for help on using the changeset viewer.