Changeset 0bdc6a7 in tol


Ignore:
Timestamp:
Dec 2, 2008, 11:05:28 AM (18 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
8c8cb65
Parents:
3e1e359
Message:

Fixed bug in resuming

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/stdlib/math/stat/models/bayesian/bysMcmc/_build.tol

    r3e1e359 r0bdc6a7  
    119119          Real m_ = Case(
    120120            resume_>0, Min(m,resume_),
    121             resume_<0,  Max(0,m+resume_) );
     121            resume_<0, Max(0,m+resume_) );
    122122          If(m_==0,
    123123          {
    … …  
    128128          {
    129129            Real WriteLn(_MID+"resuming "<<m_+" old simulations");
    130             Real If(m_==m,0,
     130            Matrix resumed = If(m_==m,
     131            {
     132              MatReadFile(_.path)
     133            },
    131134            {
    132135              Real WriteLn(_MID+"Removing last "<<Real(m-m_)+" old simulations");
    133               Matrix resumed = Sub(old.mcmc,1,1,m_,_.n);
    134               Matrix MatWriteFile(_.path, resumed);
    135               1
     136              Matrix aux = MatReadRows(_.path,1,m_,1);
     137              Matrix MatWriteFile(_.path, aux);
     138              aux
    136139            });
    137             Matrix lastRow = Sub(old.mcmc,m_,1,1,_.n);
     140            Matrix lastRow = Sub(resumed,m_,1,1,_.n);
    138141          //WriteLn("TRACE "+_MID+"lastRow="<<lastRow);
    139142            Real _.sampler::setStore(lastRow);
Note: See TracChangeset for help on using the changeset viewer.