Changeset 6f124ed in tol


Ignore:
Timestamp:
Apr 2, 2009, 9:52:37 AM (18 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
584d9b3
Parents:
b4134311
Message:

Cannot assign a system Code to a member as drawer that will be modified

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

File:
1 edited

Legend:

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

    rb4134311 r6f124ed  
    7070  Real _.betaLogDens = -1/0;
    7171  //Stores the associated drawing method
    72   Code drawer = UnknownCode;
     72  Real noDraw(Real unused) { ? };
     73  Code drawer = noDraw;
    7374
    7475  ////////////////////////////////////////////////////////////////////////////
    … …  
    242243  ////////////////////////////////////////////////////////////////////////////
    243244  {
     245  //WriteLn("TRACE "+_MID+" draw.unconstrained 1");
    244246    VMatrix z = Gaussian(_.N,1,0,1);
    245247    Real _.betaLogDens := -0.5*VMatDat(MtMSqr(z),1,1);
    … …  
    254256  ////////////////////////////////////////////////////////////////////////////
    255257  {
    256   //WriteLn("TRACE "+_MID+" draw.constrained 1.1 Max(A*b0-a)="<<VMatMax(_.A*_.blockDef::_.store - a));
     258  //WriteLn("TRACE "+_MID+" draw.constrained 1");
    257259    VMatrix d   = _.a - _.A*nu;
     260  //WriteLn("TRACE "+_MID+" draw.constrained 2");
    258261    VMatrix If(changed.X, _.D  := Tra(CholeskiSolve(_.L,_.At,"PtL")));
     262  //WriteLn("TRACE "+_MID+" draw.constrained 3");
    259263    VMatrix z0  = Tra(Tra(_.blockDef::_.store-nu)*_.Ls);
    260   //WriteLn("TRACE "+_MID+" draw.constrained 1.2 Max(D*z0-d)="<<VMatMax(_.D*z0 - d));
     264  //WriteLn("TRACE "+_MID+" draw.constrained 4");
    261265    VMatrix z = TruncStdGaussian(_.D,d,z0,1,
    262266                 _.blockDef::_.config::bsr.truncMNormal.gibbsNumIter);
     267  //WriteLn("TRACE "+_MID+" draw.constrained 5");
    263268    Real distBorder = VMatMax(_.D*z-d);
     269  //WriteLn("TRACE "+_MID+" draw.constrained 6");
    264270    Real If(distBorder<=0,
    265271    {
     272    //WriteLn("TRACE "+_MID+" draw.constrained 7");
    266273      VMatrix _.beta0 := _.blockDef::_.store;
    267274      1
    … …  
    272279      If(!VRows(_.beta0),0,
    273280      {
     281      //WriteLn("TRACE "+_MID+" draw.constrained 8");
    274282        VMatrix z0 := Tra(Tra(_.beta0-nu)*_.Ls);
     283      //WriteLn("TRACE "+_MID+" draw.constrained 9");
    275284        VMatrix z  := TruncStdGaussian(_.D,d,z0,1,
    276285                     _.blockDef::_.config::bsr.truncMNormal.gibbsNumIter);
    … …  
    279288      1
    280289    });
     290  //WriteLn("TRACE "+_MID+" draw.constrained 10");
    281291    Real _.betaLogDens := -0.5*VMatDat(MtMSqr(z),1,1);
     292  //WriteLn("TRACE "+_MID+" draw.constrained 11");
    282293    VMatrix  (_.blockDef::_.store) := nu + CholeskiSolve(_.L,z,"LtP");
     294  //WriteLn("TRACE "+_MID+" draw.constrained 12");
    283295    Copy(_.blockDef::_.store)
    284296  };
    … …  
    290302  ////////////////////////////////////////////////////////////////////////////
    291303  {
     304  //WriteLn("TRACE "+_MID+" draw 1");
    292305    If(_.blockDef::enabled,
    293306    {
     307    //WriteLn("TRACE "+_MID+" draw 2");
    294308      VMatrix aux = drawer(numSim, _.solution::nu);
    295     //WriteLn("TRACE "+_MID+" draw");
     309    //WriteLn("TRACE "+_MID+" draw 3");
    296310      Real _.blockDef::checkNonFiniteValues(numSim);
    297311      aux
Note: See TracChangeset for help on using the changeset viewer.