Changeset 2f0a149 in tol


Ignore:
Timestamp:
Nov 30, 2009, 8:28:22 AM (17 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
9fbb134
Parents:
a389e2e
Message:

Catching non resolved symbols of joint submodules

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/stdlib/math/stat/models/bayesian/bysMcmc/bsr/modularSchema/_monophasic.tol

    ra389e2e r2f0a149  
    1111[[
    1212  //////////////////////////////////////////////////////////////////////////
    13   @BSR.ModelDef _childToJoint(Set module)
     13  @BSR.ModelDef childToJoint(Set module)
    1414  //////////////////////////////////////////////////////////////////////////
    1515  {
    … …  
    2323  {
    2424  //WriteLn("TRACE MasterToJoint module "+master->ModuleType+" "+Name(master));
    25     Set subModule = EvalSet(master->SubModule, _childToJoint);
     25    Set subModule = EvalSet(master->SubModule, childToJoint);
    2626    If(Card(subModule)==1, {
    2727      @BSR.ModelDef(
    … …  
    3737        subModule[1]->A)
    3838    }, {
     39  //WriteLn("TRACE MasterToJoint 1");
    3940    Set LinearBlock =
    4041    {
    … …  
    5152    }; 
    5253    Real n = Card(LinearBlock);
    53 
     54  //WriteLn("TRACE MasterToJoint 2");
    5455    Set col.index = EvalSet(subModule, Matrix(@BSR.ModelDef module)
    5556    {
    … …  
    5859        Text name = Name(v);
    5960        Real idx = FindIndexByName(LinearBlock, name);
     61        If(!idx, WriteLn("Cannot resolve symbol of external linear variable "
     62        "\n  "+v->Name+
     63        "\nused in module \n  "+module->DocInfo->Path,"E"));
    6064      //WriteLn("  Index("+name+")="<<idx);
    6165        idx
    … …  
    6367      SetCol(index)
    6468    });
    65 
     69  //WriteLn("TRACE MasterToJoint 3");
    6670    Real m = 0;
    6771    Set row.index = EvalSet(subModule, Set(@BSR.ModelDef module)
    … …  
    7478    Real missingOutputBlock.index = 0;
    7579
     80  //WriteLn("TRACE MasterToJoint 4");
    7681    Set reDim = Traspose(For(1,Card(subModule), Set(Real k)
    7782    {
    7883      @BSR.ModelDef module = subModule[k];
     84    //WriteLn("TRACE MasterToJoint 5.1 subModule "<<k);
    7985      Real mk = Card(row.index[k]);
    8086      Real m0 = row.index[k][1];
    8187
     88    //WriteLn("TRACE MasterToJoint 5.2");
    8289      Set prc.mis.in(@BSR.MissingBlock mis)
    8390      {@BSR.MissingBlock(
    … …  
    93100      )};
    94101     
     102    //WriteLn("TRACE MasterToJoint 5.3");
    95103      Set prc.mis.out(@BSR.MissingBlock mis)
    96104      {@BSR.MissingBlock(
    … …  
    106114      )};
    107115     
     116    //WriteLn("TRACE MasterToJoint 5.4");
    108117      Set MissingInputBlock = EvalSet(module->InputMissingBlock,prc.mis.in);
     118    //WriteLn("TRACE MasterToJoint 5.5");
    109119      Set MissingOutputBlock = EvalSet(module->OutputMissingBlock,prc.mis.out);
     120    //WriteLn("TRACE MasterToJoint 5.6");
    110121      Set NoiseDistrib = EvalSet(module->NoiseDistrib,Set(@BSR.NoiseDistrib seg)
    111122      {
    … …  
    128139        aux[1]
    129140      });
    130       [[
     141    //WriteLn("TRACE MasterToJoint 5.7");
     142      {[[
    131143        Set MissingInputBlock;
    132144        Set MissingOutputBlock;
    … …  
    138150        VMatrix A = If(!VRows(module->A),Rand(0,n,0,0),
    139151         Tra(MergeRows(n,[[ [[Tra(module->A), col.index[k] ]] ]])))
    140       ]]
     152      ]]}
    141153    }));
     154/*
     155  //WriteLn("TRACE MasterToJoint 6");
     156    Text ModuleType = "joint";
     157    Set MissingInputBlock = BinGroup("<<",reDim[1]);
     158    Set MissingOutputBlock = BinGroup("<<",reDim[2]);
     159    Set NoiseDistrib = BinGroup("<<",reDim[3]);
     160  //WriteLn("TRACE MasterToJoint 7.1");
     161    VMatrix Y = Convert(Group("ConcatRows",reDim[4]),"Blas.R.Dense");
     162  //WriteLn("TRACE MasterToJoint 7.2");
     163  //VMatrix X = Convert(Group("ConcatRows",reDim[5]),"Cholmod.R.Sparse");
     164    VMatrix X = Group("ConcatRows",reDim[5]);
     165  //WriteLn("TRACE MasterToJoint 7.3");
     166    VMatrix a = Convert(Group("ConcatRows",reDim[6]),"Cholmod.R.Sparse");
     167  //WriteLn("TRACE MasterToJoint 7.4");
     168    VMatrix A = Convert(Group("ConcatRows",reDim[7]),"Blas.R.Dense");
     169  //WriteLn("TRACE MasterToJoint 8");
    142170
    143171    @BSR.ModelDef(
    144       Text ModuleType = "joint";
     172      Text ModuleType;
    145173      Set master->DocInfo;
    146174      Set LinearBlock;
    147       Set MissingInputBlock = BinGroup("<<",reDim[1]);
    148       Set MissingOutputBlock = BinGroup("<<",reDim[2]);
    149       Set NoiseDistrib = BinGroup("<<",reDim[3]);
    150       VMatrix Y = Convert(Group("ConcatRows",reDim[4]),"Blas.R.Dense");
    151       VMatrix X = Convert(Group("ConcatRows",reDim[5]),"Cholmod.R.Sparse");
    152       VMatrix a = Convert(Group("ConcatRows",reDim[6]),"Cholmod.R.Sparse");
    153       VMatrix A = Convert(Group("ConcatRows",reDim[7]),"Blas.R.Dense"))
     175      Set MissingInputBlock;
     176      Set MissingOutputBlock;
     177      Set NoiseDistrib;
     178      VMatrix Y;
     179      VMatrix X;
     180      VMatrix a;
     181      VMatrix A)
     182*/
     183    reDim
     184
    154185  })}
     186 
    155187]];
Note: See TracChangeset for help on using the changeset viewer.