Changeset e2ecdcf in tol


Ignore:
Timestamp:
Oct 23, 2008, 8:41:03 AM (18 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
5c3d5b2
Parents:
df1ac43
Message:

Replacing _.signNoise by flag _.isInputFilter

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

File:
1 edited

Legend:

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

    rdf1ac43 re2ecdcf  
    7171  Set _.colNames = _.filterEval::get.colNames(0);
    7272  //For input filters is +1, for output ones -1
    73   Real _.signNoise = If(!FunctionExist("Set","_.filterEval::get.linBlkNames"),
    74   {
    75     -1
     73  Real _.isInputFilter = If(FunctionExist("Set","_.filterEval::get.linBlkNames"),
     74  {
     75    If(Card(_.filterEval::get.linBlkNames(0)),1,0)
    7676  },
    7777  {
    78     If(Card(_.filterEval::get.linBlkNames(0)),1,-1)
     78    0
    7979  });
    8080  //Names of affected parameters in linear block
    8181  //(just for input filters)
    82   Set _.linBlkNames = If(Eq(_.signNoise,-1), Copy(Empty),
     82  Set _.linBlkNames = If(!_.isInputFilter, Copy(Empty),
    8383  {
    8484    _.filterEval::get.linBlkNames(0)
    … …  
    8686  //Positions of columns of affected parameters in linear block
    8787  //(just for input filters)
    88   Set _.filterColIdx = If(Eq(_.signNoise,-1), Copy(Empty),
     88  Set _.filterColIdx = If(!_.isInputFilter, Copy(Empty),
    8989  {
    9090    _.bsr::_.lin.blk::_.blockDef::getStoreColIndexes(_.linBlkNames)
    … …  
    130130    NameBlock sigBlk    = _.bsr::_.sig.blk;
    131131    Matrix u = VMat2Mat(_.blockDef::_.store);
    132   //WriteLn("TRACE"+_MID+"draw.scalar 1.1 _.signNoise = "<<_.signNoise);
    133     Matrix omega= If(Eq(_.signNoise,-1), Col(1),
     132  //WriteLn("TRACE"+_MID+"draw.scalar 1.1 _.isInputFilter = "<<_.isInputFilter);
     133    Matrix omega= If(!_.isInputFilter, Col(1),
    134134      SubRow(VMat2Mat(_.bsr::_.lin.blk::_.blockDef::_.store),
    135135                         _.filterColIdx));
    … …  
    138138    Matrix _.W := VMat2Mat(SubRow(fullNoise,_.segment->EquIdx));
    139139  //WriteLn("TRACE"+_MID+"draw.scalar 1.4 _.W("<<Rows(_.W)+"x"<<Columns(_.W));
    140     Matrix _.Z := _.W *_.signNoise + _.Fi * omega;
     140    Matrix _.Z := _.W + _.Fi * omega;
    141141  //WriteLn("TRACE"+_MID+"draw.scalar 1.5 _.Z("<<Rows(_.Z)+"x"<<Columns(_.Z));
    142142    Set aux = _.segment->ArimaAuxInfo;
    … …  
    318318      Matrix _.Fi := _.filterEval::eval(VMat2Mat(_.blockDef::_.store));
    319319    //WriteLn("TRACE "+_MID+"::setStore 4");
    320       If( _.signNoise == -1, 0,
     320      If(!_.isInputFilter, 0,
    321321      {
    322322        SetMin(For(1,_.filterColNum,Real(Real column)
Note: See TracChangeset for help on using the changeset viewer.