Index: tol_tests/tol/ARIMA/Stationarity/test_rand_stationary.tol
===================================================================
--- tol_tests/tol/ARIMA/Stationarity/test_rand_stationary.tol	(revision df3c708b1db8855924a563eb885ff5b86c470a6e)
+++ tol_tests/tol/ARIMA/Stationarity/test_rand_stationary.tol	(revision dcc060825ce6bf6d82ed4b85ee9a8139ee2067be)
@@ -2,4 +2,4 @@
 Matrix rs2 = Group("ConcatRows",For(1,1000,Matrix(Real n)
 {
-  -SubCol(Tra(PolMat(RandStationary(2),3,1)),[[2,3]])
+  SubCol(Tra(PolMat(RandStationary(2),3,1)),[[2,3]])
 }));
Index: tol_tests/tol/ARIMA/Stationarity/test_uniform_rand_stationary.tol
===================================================================
--- tol_tests/tol/ARIMA/Stationarity/test_uniform_rand_stationary.tol	(revision df3c708b1db8855924a563eb885ff5b86c470a6e)
+++ tol_tests/tol/ARIMA/Stationarity/test_uniform_rand_stationary.tol	(revision dcc060825ce6bf6d82ed4b85ee9a8139ee2067be)
@@ -1,138 +1,43 @@
 
-#Require MatQuery;
-
-
-//////////////////////////////////////////////////////////////////////////////
-Set getFaces(Matrix sample) 
-//////////////////////////////////////////////////////////////////////////////
+Real maxIterByTry = 20;
+Real deg = 3;
+Real size = 10000;
+Real total_success = 0;
+Real total_tries = 0;
+Real total_iter = 0;
+Matrix sample = Rand(0,deg,0,0);
+Set rng_col = Range(2,deg+1,1);
+While(total_success<size,
 {
-  Real c = Columns(sample);
-  SetConcat(For(1,c-1,Set(Real i)
+  Polyn a = RandStationary(deg);
+  Polyn b = RandStationary(deg);
+//Matrix v = Gaussian(1,deg,0,1);
+  Matrix v = SubCol(Tra(PolMat(a-b,deg+1,1)),rng_col);
+  Real norm = Sqrt(MatDat(MtMSqr(v),1,1));
+  Matrix u = v * (1/norm);
+  Polyn U = MatPol(u)*B;
+  Polyn p = Copy(a);
+  Real iter = 0;
+  Real ok = False;
+  Real total_tries := total_tries+1;
+  While(And(!ok,iter<maxIterByTry),
   {
-    For(i+1,c,Matrix(Real j)
-    {
-      Matrix face = SubCol(sample,[[i,j]]);
-      Eval("Face_"<<i+"_"<<j+"=face")
-    })
-  }))
-};
-
-Real maxIterByTry = 0;
-Real n = 3;
-Real size = 2000;
-Real distance.target = 0.001;
-Real neighbour.num = 10;
-
-Real candidate.factor = 1;
-
-//////////////////////////////////////////////////////////////////////////////
-Matrix draw.arbitrary(Real void)
-//////////////////////////////////////////////////////////////////////////////
-{
-  -SubCol(Tra(PolMat(RandStationary(n),n+1,1)),Range(2,n+1,1))
-};
-
-
-//////////////////////////////////////////////////////////////////////////////
-Real isInDomain(Matrix x)
-//////////////////////////////////////////////////////////////////////////////
-{
-  IsStationary(1-MatPol(x)*B)
-};
-
-Matrix candidates =
-{
-  Matrix sample = Group("ConcatRows",For(1,size,draw.arbitrary));
-  MatQuery::@ANN.KDTree ann = MatQuery::@ANN.KDTree::New(sample);
-  MatQuery::@KNN.Neighbourhood neighbour = ann::search(sample,2);
-  Real distance.average = MatAvr(Sqrt(SubCol(neighbour::_.distance2,[[2]])));
-  Real candidate.factor := Ceil(distance.average/distance.target);
-  Matrix If(candidate.factor>1,sample,
-    sample := sample << 
-    Group("ConcatRows",For(1,size*(candidate.factor-1),draw.arbitrary)));
-  sample << Group("ConcatRows",For(2,neighbour.num,Matrix(Real k)
-  {
-    sample + Rand(size,n,-distance.target,+distance.target)
-  }))
-};
-
-Real candidate.num = Rows(candidates);
-
-Matrix candidates.isInDomain = SetCol(For(1,candidate.num,Real(Real i)
-{
-  isInDomain(SubRow(candidates,[[i]]))
-}));
-
-Real candidates.isInDomain.ratio = MatAvr(candidates.isInDomain);
-
-Real numOutDomain = candidate.num-MatSum(candidates.isInDomain);
-
-
-Matrix candidates.sample = SubRow(candidates,
-  MatSet(Sub(RandPermutation(1,Rows(candidates)),1,1,1,size))[1]);
-
-Set candidates.showFaces = getFaces(candidates.sample);
-
-MatQuery::@ANN.KDTree ann = MatQuery::@ANN.KDTree::New(candidates);
-
-MatQuery::@KNN.Neighbourhood neighbour = ann::search(candidates,neighbour.num);
-
-Real distance.average = MatAvr(Sqrt(SubCol(neighbour::_.distance2,[[2]])));
-
-VMatrix NN = Group("ConcatRows", For(2,neighbour.num,VMatrix(Real j)
-{
-  Mat2VMat(SubCol(neighbour::_.neighbour,[[j]]))   
-}));
-
-
-VMatrix NNSC = MatQuery::SortAndCount(NN);
-
-Matrix candidates.dens = 
-{
-  VMatrix aux = RPow(SubCol(NNSC,[[2]]),-1) $* Mat2VMat(candidates.isInDomain);
-  Real sum.f = VMatSum(aux);
-  VMatrix w = (aux / sum.f);
-  VMat2Mat(SubCol(NNSC,[[1]]) | w )
-};
-
-Matrix candidates.dens.sort = 
-{
-  Matrix perm = Sort(candidates.dens,[[2]]);
-  SubRow(PivotByRows(candidates.dens,perm),
-         Range(numOutDomain+1,candidate.num,1))
-};
-
-Matrix candidates.dens.cum = 
-{
-  Matrix dens = SubCol(candidates.dens.sort,[[2]]);
-  Matrix cum = DifEq(1/(1-B),dens);
-  candidates.dens.sort | cum
-};
-
-Set workSpace =  { AlgLib.Interp.Vector.CreateWorkSpace(
-  Text interpMet = "LinearSpline",
-  Matrix x = Tra(SubCol(candidates.dens.cum,[[3]])),
-  Matrix F = Tra(DifEq(1/(1-B),Constant(Columns(x),1,1)))) };
-
-Code fun = AlgLib.Interp.Vector.LoadWorkSpace(workSpace);
-
-Set candidates.extract = For(1,size,Real(Real k)
-{
-  Real pos = 
-    Min(candidate.num-numOutDomain,
-    Max(1,Round(MatDat(fun(0,Rand(0,1)),1,1))));
-  MatDat(candidates.dens.sort,pos,1)
+    Real total_iter := total_iter+1;
+    Real iter := iter+1;
+    Real lambda = Rand(-3*deg,3*deg);
+    Polyn p := a+U*lambda;
+    ok := IsStationary(p)
+  });
+  Matrix If(ok,
+    sample := sample << SubCol(Tra(PolMat(p,deg+1,1)),rng_col));
+  Real total_success := total_success +ok
 });
 
-Matrix sample = SubRow(candidates, candidates.extract);
-
-Set sample.showFaces = getFaces(sample);
-
-Matrix sample.isInDomain = SetCol(For(1,size,Real(Real i)
+Set showFaces = SetConcat(For(1,deg-1,Set(Real i)
 {
-  isInDomain(SubRow(sample,[[i]]))
+  For(i+1,deg,Matrix(Real j)
+  {
+    Matrix face = SubCol(sample,[[i,j]]);
+    Eval("Face_"<<i+"_"<<j+"=face")
+  })
 }));
-
-Real sample.isInDomain.ratio = MatAvr(sample.isInDomain);
-
-/* */
Index: tol_tests/tol/ARIMA/mcmc/MTryMetropolis.tol
===================================================================
--- tol_tests/tol/ARIMA/mcmc/MTryMetropolis.tol	(revision df3c708b1db8855924a563eb885ff5b86c470a6e)
+++ tol_tests/tol/ARIMA/mcmc/MTryMetropolis.tol	(revision dcc060825ce6bf6d82ed4b85ee9a8139ee2067be)
@@ -3,8 +3,8 @@
 //////////////////////////////////////////////////////////////////////////////
 {
+  Real useOnlySingleTry = False;
   Real _.n = 0;
   Real _.k = 0;
   VMatrix _.x = Rand(0,0,0,0);
-  Real _.pi_logDens_x = ?;
   Real _.r = ?;
   Real _.s = 1;
@@ -18,11 +18,40 @@
   Real _.num_draw = 0;
   Real _.num_accept = 0;
-  Real _.num_Q_draw_pre = 0;
-  Real _.num_Q_draw = 0;
   Real _.num_logWeight = 0;
 
-  ////////////////////////////////////////////////////////////////////////////
-  Real pi_matchesDomain(VMatrix x);
-  ////////////////////////////////////////////////////////////////////////////
+  VMatrix _.nu = Rand(0,0,0,0);
+  VMatrix _.L = Rand(0,0,0,0);  // Cov = L*LŽ
+  VMatrix _.Li = Rand(0,0,0,0); // L*Li = I
+
+  ////////////////////////////////////////////////////////////////////////////
+  VMatrix Q_draw(VMatrix x)
+  ////////////////////////////////////////////////////////////////////////////
+  {
+    VMatrix e = Gaussian(_.n,1,0,1);
+     _.nu + _.L*e*_.s
+  };
+
+  ////////////////////////////////////////////////////////////////////////////
+  Real Q_logDens(VMatrix x, VMatrix y)
+  ////////////////////////////////////////////////////////////////////////////
+  {
+    VMatrix e = _.Li*(y-x);
+    -0.5*VMatDat(MtMSqr(e),1,1)
+  };
+
+  ////////////////////////////////////////////////////////////////////////////
+  Real pi_logDens_aprox(VMatrix x)
+  ////////////////////////////////////////////////////////////////////////////
+  {
+    VMatrix e = _.Li*(x-_.nu);
+    -0.5*VMatDat(MtMSqr(e),1,1)    
+  };
+
+  ////////////////////////////////////////////////////////////////////////////
+  Real pi_matchesDomain(VMatrix x)
+  ////////////////////////////////////////////////////////////////////////////
+  {
+    True
+  };
 
   ////////////////////////////////////////////////////////////////////////////
@@ -31,52 +60,16 @@
 
   ////////////////////////////////////////////////////////////////////////////
-  Real Q_logDens(VMatrix x, VMatrix y) { 1 };
-  ////////////////////////////////////////////////////////////////////////////
-
-  ////////////////////////////////////////////////////////////////////////////
-  VMatrix Q_draw_pre(VMatrix x);
-  ////////////////////////////////////////////////////////////////////////////
-
-  ////////////////////////////////////////////////////////////////////////////
-  VMatrix Q_draw(VMatrix x)
-  ////////////////////////////////////////////////////////////////////////////
-  {
-  //WriteLn("TRACE Q_draw 1 ");
-    Real _.num_Q_draw := _.num_Q_draw + 1;
-    Q_draw_pre(x)
-/*
-    VMatrix x_ = If(!_.constrainedDomain, 
-    {
-    //WriteLn("TRACE Q_draw 2.1 ");
-      Real _.num_Q_draw_pre := _.num_Q_draw_pre + 1;
-      Q_draw_pre(x)
-    },
-    {
-    //WriteLn("TRACE Q_draw 2.2 ");
-      VMatrix y = Rand(0,0,0,0);
-      Real ok = False;
-      Real iter = 1;
-      While(And(!ok, iter<=_.maxDomainSearchIter),
-      {
-        VMatrix y := Q_draw_pre(x);
-        Real ok := pi_matchesDomain(y);
-        Real _.num_Q_draw_pre := _.num_Q_draw_pre + 1;
-        Real iter := iter +1
-      });
-    //WriteLn("TRACE Q_draw 2.3 iter="<<iter+ " ok="<<ok);
-      If(ok,y,
-      {
-        WriteLn("Cannot find a valid draw after "<<iter+" iterations","W");
-        x
-      })
-    });
-  //WriteLn("TRACE Q_draw 3 x_=\n"<<Matrix Tra(VMat2Mat(x_)));
-    x_
-*/
-  };
-
-  ////////////////////////////////////////////////////////////////////////////
-  Real logWeight(VMatrix x, VMatrix y);
-  ////////////////////////////////////////////////////////////////////////////
+  Real logLambda(VMatrix x, VMatrix y)
+  ////////////////////////////////////////////////////////////////////////////
+  {
+    -Q_logDens(x,y)
+  };
+
+  ////////////////////////////////////////////////////////////////////////////
+  Real logWeight(VMatrix x, VMatrix y)
+  ////////////////////////////////////////////////////////////////////////////
+  {
+    pi_logDens(x)
+  }
 
   ////////////////////////////////////////////////////////////////////////////
@@ -96,5 +89,15 @@
     });
     Real _.acceptRatio := _.num_accept / _.num_draw; 
-    Real Case(
+    Real If(useOnlySingleTry, Case(
+    _.k>1, { False },
+    _.acceptRatio<_.acceptRatioTarget/1.01,
+    {
+      Real _.s := _.s/_.sFactor
+    },
+    _.acceptRatio>_.acceptRatioTarget*1.01,
+    {
+      Real _.s := _.s*_.sFactor
+    }),
+    Case(
     _.acceptRatio<0.50,
     {
@@ -106,23 +109,8 @@
       If(_.k>1,     Real _.k := _.k-1);
       If(_.s<1.E+3, Real _.s := _.s*_.sFactor)
-    });
-
-/*
-    Real Case(
-    _.k>1, { False },
-    _.acceptRatio<_.acceptRatioTarget/1.01,
-    {
-      Real _.s := _.s/_.sFactor
-    },
-    _.acceptRatio>_.acceptRatioTarget*1.01,
-    {
-      Real _.s := _.s*_.sFactor
-    });
-*/
-  //Real If(_.accept, { Real doAfterDraw(0) });
+    }));
     Real doAfterDraw(0);
     _.accept
   };
-
 
   ////////////////////////////////////////////////////////////////////////////
@@ -133,12 +121,12 @@
     VMatrix y = Q_draw(_.x);
     Real pi_logDens_y = pi_logDens(y);
-    Real _.pi_logDens_x := pi_logDens(_.x);
+    Real pi_logDens_x = pi_logDens(_.x);
     Real _.r := Min(1, If(_.simetricQ,
     {
-      Exp(pi_logDens_y-_.pi_logDens_x)
+      Exp(pi_logDens_y-pi_logDens_x)
     },
     {
-      Exp((  pi_logDens_y + Q_logDens(  y, _.x)) -
-          (_.pi_logDens_x + Q_logDens(_.x,   y)) )
+      Exp((pi_logDens_y + Q_logDens(  y, _.x)) -
+          (pi_logDens_x + Q_logDens(_.x,   y)) )
     }));
     Real accept_reject(y);
@@ -146,4 +134,10 @@
   };
 
+
+  ////////////////////////////////////////////////////////////////////////////
+  VMatrix draw_multiple_try(Real void)
+  ////////////////////////////////////////////////////////////////////////////
+  {
+    If(_.k==1, draw_single_try(void), {
     VMatrix lwYjx = Rand(0,0,0,0);
     VMatrix gYjx = Rand(0,0,0,0);
@@ -153,10 +147,4 @@
     Real lwXjy_max = ?;
     Real gXjy_sum = ?;
-
-  ////////////////////////////////////////////////////////////////////////////
-  VMatrix draw_multiple_try(Real void)
-  ////////////////////////////////////////////////////////////////////////////
-  {
-    If(_.k==1, draw_single_try(void), {
     Real _.num_draw := _.num_draw + 1;
     VMatrix J = DifEq(1/(1-B),Constant(_.k,1,1)); 
@@ -225,215 +213,11 @@
     _.x
   }) }
+
 };
 
+
+
 //////////////////////////////////////////////////////////////////////////////
-Class @MTryMetropolisGeneric : @MTryMetropolis
-//////////////////////////////////////////////////////////////////////////////
-{
-
-  ////////////////////////////////////////////////////////////////////////////
-  Real logLambda(VMatrix x, VMatrix y);
-  ////////////////////////////////////////////////////////////////////////////
-
-  ////////////////////////////////////////////////////////////////////////////
-  Real logWeight(VMatrix x, VMatrix y)
-  ////////////////////////////////////////////////////////////////////////////
-  {
-    pi_logDens(x)+Q_logDens(x,y)+logLambda(x,y)
-  }
-};
-
-//////////////////////////////////////////////////////////////////////////////
-Class @MTryMetropolisSymmetric : @MTryMetropolis
-//////////////////////////////////////////////////////////////////////////////
-{
-  Real _.simetricQ = True;
-  Real _.constrainedDomain = False;
-
-  ////////////////////////////////////////////////////////////////////////////
-  Real logWeight(VMatrix x, VMatrix y)
-  ////////////////////////////////////////////////////////////////////////////
-  {
-    pi_logDens(x)
-  }
-};
-
-//////////////////////////////////////////////////////////////////////////////
-Class @MTryMetropolisSymmetricNormal : @MTryMetropolisSymmetric
-//////////////////////////////////////////////////////////////////////////////
-{
-  VMatrix _.L;  // Cov = L*LŽ
-
-  ////////////////////////////////////////////////////////////////////////////
-  Real pi_matchesDomain(VMatrix x) { True };
-  ////////////////////////////////////////////////////////////////////////////
-
-  ////////////////////////////////////////////////////////////////////////////
-  VMatrix Q_draw_pre(VMatrix x)
-  ////////////////////////////////////////////////////////////////////////////
-  {
-    VMatrix e = Gaussian(_.n,1,0,1);
-    x + _.L*e*_.s
-  }
-};
-
-//////////////////////////////////////////////////////////////////////////////
-Class @MTryMetropolisTruncNormal : @MTryMetropolis
-//////////////////////////////////////////////////////////////////////////////
-{
-  Real _.simetricQ = False;
-  Real _.constrainedDomain = True;
-  VMatrix _.nu = Rand(0,0,0,0);
-  VMatrix _.L = Rand(0,0,0,0);  // Cov = L*LŽ
-  VMatrix _.Li = Rand(0,0,0,0); // L*Li = I
-  Real _.do_cum = False;
-  Real _.pi_logScale = ?;
-  Real _.iter_cum = 0;
-  Real _.pi_cum = 0;
-  VMatrix _.nu_cum = Rand(0,0,0,0);
-  VMatrix _.var_cum = Rand(0,0,0,0);
-
-  ////////////////////////////////////////////////////////////////////////////
-  VMatrix Q_draw_pre(VMatrix x)
-  ////////////////////////////////////////////////////////////////////////////
-  {
-    VMatrix e = Gaussian(_.n,1,0,1);
-     _.nu + _.L*e*_.s
-  };
-  ////////////////////////////////////////////////////////////////////////////
-  Real Q_logDens(VMatrix x, VMatrix y)
-  ////////////////////////////////////////////////////////////////////////////
-  {
-    VMatrix e = _.Li*(y-_.nu);
-    -0.5*VMatDat(MtMSqr(e),1,1)
-  };
-
-  ////////////////////////////////////////////////////////////////////////////
-  Real cumulate(VMatrix x, Real x_pi_logDens, Real forze)
-  ////////////////////////////////////////////////////////////////////////////
-  {
-    Real Case(
-    !_.do_cum, 
-    { 
-    //WriteLn("TRACE @MTryMetropolisTruncNormal::cumulate 2.1");
-      False  
-    },
-    VMatMax(Abs(_.x-_.nu))==0, 
-    { 
-    //WriteLn("TRACE @MTryMetropolisTruncNormal::cumulate 2.2");
-      False  
-    },
-    x_pi_logDens <= -TheMaxAbsValue, 
-    { 
-    //WriteLn("TRACE @MTryMetropolisTruncNormal::cumulate 2.3");
-      False  
-    },
-    IsUnknown(_.pi_logScale),
-    {
-    //WriteLn("TRACE @MTryMetropolisTruncNormal::cumulate 2.4");
-      Real _.iter_cum := _.iter_cum +1;
-      Real _.pi_logScale := x_pi_logDens;
-      Real _.pi_cum := 1;
-      VMatrix _.nu_cum := x;
-      VMatrix _.var_cum := (x-_.nu)^2;
-    //WriteLn("TRACE @MTryMetropolisTruncNormal::cumulate 2.4 _.var_cum=\n"<<Tra(VMat2Mat(_.var_cum)));
-      True
-    },
-    x_pi_logDens < _.pi_logScale,
-    {
-    //WriteLn("TRACE @MTryMetropolisTruncNormal::cumulate 2.5");
-      Real _.iter_cum := _.iter_cum +1;
-      Real x_pi = Exp(x_pi_logDens-_.pi_logScale);
-      Real _.pi_cum := _.pi_cum + x_pi;
-      VMatrix _.nu_cum := _.nu_cum + x*x_pi;
-      VMatrix _.var_cum := _.var_cum + ((x-_.nu)^2)*x_pi;
-    //WriteLn("TRACE @MTryMetropolisTruncNormal::cumulate 2.5 _.var_cum=\n"<<Tra(VMat2Mat(_.var_cum)));
-      True
-    },
-    x_pi_logDens > _.pi_logScale,
-    {
-    //WriteLn("TRACE @MTryMetropolisTruncNormal::cumulate 2.6");
-      Real _.iter_cum := _.iter_cum +1;
-      Real coef = Exp(_.pi_logScale-x_pi_logDens);
-      Real _.pi_logScale := x_pi_logDens;
-      Real _.pi_cum := _.pi_cum*coef + 1;
-      VMatrix _.nu_cum := _.nu_cum*coef + x;
-      VMatrix _.var_cum := _.var_cum*coef + ((x-_.nu)^2);
-    //WriteLn("TRACE @MTryMetropolisTruncNormal::cumulate 2.6 _.var_cum=\n"<<Tra(VMat2Mat(_.var_cum)));
-      True
-    },
-    1==1,
-    {
-    //WriteLn("TRACE @MTryMetropolisTruncNormal::cumulate 2.7");
-      False
-    })
-  };
-
-  ////////////////////////////////////////////////////////////////////////////
-  Real logWeight(VMatrix x, VMatrix y)
-  ////////////////////////////////////////////////////////////////////////////
-  {
-    Real y_Q_logDens = Q_logDens(x,y);
-    Real x_Q_logDens = Q_logDens(y,x);
-    Real x_pi_logDens = pi_logDens(x);
-    Real cumulate(x,x_pi_logDens,False);
-    x_pi_logDens + 0.5*(y_Q_logDens-x_Q_logDens)
-  };
-
-  ////////////////////////////////////////////////////////////////////////////
-  Real initialize_Q(Real void)
-  ////////////////////////////////////////////////////////////////////////////
-  {
-    Real _.pi_logDens_x := pi_logDens(_.x);
-    VMatrix _.nu := _.x;
-    VMatrix _.L  := Eye(_.n);
-    VMatrix _.Li := Eye(_.n);
-    True
-  };
-
-  ////////////////////////////////////////////////////////////////////////////
-  Real initialize_cum(Real void)
-  ////////////////////////////////////////////////////////////////////////////
-  {
-    Real _.do_cum := True;
-    Real _.pi_cum := 0;
-    VMatrix _.nu_cum := Rand(_.n,1,0,0);
-    VMatrix _.var_cum := Rand(_.n,1,0,0);
-    Real cumulate(_.x, pi_logDens(_.x), True);
-    True
-  };
-
-  ////////////////////////////////////////////////////////////////////////////
-  Real doAfterDraw_cum(Real void)
-  ////////////////////////////////////////////////////////////////////////////
-  {
-    Case(
-    Or(!_.do_cum, !_.iter_cum),
-    {
-      VMatrix _.nu := _.x;
-      False  
-    },
-    _.pi_logDens_x > _.pi_logScale,
-    {
-      VMatrix _.nu := _.x;
-      VMatrix var = _.var_cum /_.pi_cum;
-      VMatrix _.L  := Eye(_.n,_.n,0,RPow(var,+1/2));
-      VMatrix _.Li := Eye(_.n,_.n,0,RPow(var,-1/2));
-      True
-    },
-    1==1,
-    {
-      VMatrix _.nu := _.nu_cum /_.pi_cum;
-      VMatrix var = _.var_cum /_.pi_cum;
-      VMatrix _.L  := Eye(_.n,_.n,0,RPow(var,+1/2));
-      VMatrix _.Li := Eye(_.n,_.n,0,RPow(var,-1/2));
-      True
-    })
-  }
-};
-
-
-//////////////////////////////////////////////////////////////////////////////
-Class @MTryMetropolis_ARIMA : @MTryMetropolisTruncNormal
+Class @MTryMetropolis_ARIMA : @MTryMetropolis
 //////////////////////////////////////////////////////////////////////////////
 {
@@ -495,5 +279,5 @@
 
   ////////////////////////////////////////////////////////////////////////////
-  Real initialize(Set arima, Real doCum)
+  Real initialize(Set arima)
   ////////////////////////////////////////////////////////////////////////////
   {
@@ -509,6 +293,4 @@
     Real _.acceptRatioTarget := 0.234  + (0.5-0.234)*Exp(1-_.n);
     Real _.k := Ceil(Sqrt(_.n));
-    Real initialize_Q(0);
-    Real If(doCum, initialize_cum(0));
     ok
   };
@@ -519,6 +301,5 @@
      VMatrix z, 
      Real sigma, 
-     Set arima, 
-     Real doCum)
+     Set arima)
   ////////////////////////////////////////////////////////////////////////////
   {
@@ -528,5 +309,5 @@
       Real _.sigma = sigma
     ]];
-    Real new::initialize(arima, doCum);
+    Real new::initialize(arima);
     new
   };
@@ -538,5 +319,4 @@
     Set If(_.accept, _.arima := col2arima(_.x));
     Real setArima(void)
-//  Real doAfterDraw_cum(void)
   };
 
@@ -568,20 +348,4 @@
   };
 
-  Real _.simetricQ = True;
-  ////////////////////////////////////////////////////////////////////////////
-  VMatrix Q_draw(VMatrix x)
-  ////////////////////////////////////////////////////////////////////////////
-  {
-    VMatrix e = Gaussian(_.n,1,0,1);
-    y = x + _.L*e*_.s;
-  //WriteLn("TRACE Q_draw y=\n"<<Matrix Tra(VMat2Mat(y)));
-    y
-  };
-  ////////////////////////////////////////////////////////////////////////////
-  Real logWeight(VMatrix x, VMatrix y)
-  ////////////////////////////////////////////////////////////////////////////
-  {
-    pi_logDens(x)
-  };
 
   ////////////////////////////////////////////////////////////////////////////
Index: tol_tests/tol/ARIMA/mcmc/mtrymh.mcmc.tol
===================================================================
--- tol_tests/tol/ARIMA/mcmc/mtrymh.mcmc.tol	(revision df3c708b1db8855924a563eb885ff5b86c470a6e)
+++ tol_tests/tol/ARIMA/mcmc/mtrymh.mcmc.tol	(revision dcc060825ce6bf6d82ed4b85ee9a8139ee2067be)
@@ -12,4 +12,7 @@
 Real If(!ObjectExist("Matrix","modEst.0::Correlations::COV"),
 {
+  VMatrix mtm_arima::_.nu := mtm_arima::_.x;
+  VMatrix mtm_arima::_.L := Eye(mtm_arima::_.n);
+  VMatrix mtm_arima::_.Li :=  Eye(mtm_arima::_.n);
   Real mtm_arima::_.s := 0.001
 },
@@ -23,4 +26,5 @@
   };
   Matrix Li = LTInverse(L);
+  VMatrix mtm_arima::_.nu := mtm_arima::_.x;
   VMatrix mtm_arima::_.L := Mat2VMat(L);
   VMatrix mtm_arima::_.Li := Mat2VMat(Li);
