Changeset 6f124ed in tol
- Timestamp:
- Apr 2, 2009, 9:52:37 AM (18 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 584d9b3
- Parents:
- b4134311
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tol/stdlib/math/stat/models/bayesian/bysMcmc/bsr/gibbs/_stdLinearBlock.tol
rb4134311 r6f124ed 70 70 Real _.betaLogDens = -1/0; 71 71 //Stores the associated drawing method 72 Code drawer = UnknownCode; 72 Real noDraw(Real unused) { ? }; 73 Code drawer = noDraw; 73 74 74 75 //////////////////////////////////////////////////////////////////////////// … … 242 243 //////////////////////////////////////////////////////////////////////////// 243 244 { 245 //WriteLn("TRACE "+_MID+" draw.unconstrained 1"); 244 246 VMatrix z = Gaussian(_.N,1,0,1); 245 247 Real _.betaLogDens := -0.5*VMatDat(MtMSqr(z),1,1); … … 254 256 //////////////////////////////////////////////////////////////////////////// 255 257 { 256 //WriteLn("TRACE "+_MID+" draw.constrained 1 .1 Max(A*b0-a)="<<VMatMax(_.A*_.blockDef::_.store - a));258 //WriteLn("TRACE "+_MID+" draw.constrained 1"); 257 259 VMatrix d = _.a - _.A*nu; 260 //WriteLn("TRACE "+_MID+" draw.constrained 2"); 258 261 VMatrix If(changed.X, _.D := Tra(CholeskiSolve(_.L,_.At,"PtL"))); 262 //WriteLn("TRACE "+_MID+" draw.constrained 3"); 259 263 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"); 261 265 VMatrix z = TruncStdGaussian(_.D,d,z0,1, 262 266 _.blockDef::_.config::bsr.truncMNormal.gibbsNumIter); 267 //WriteLn("TRACE "+_MID+" draw.constrained 5"); 263 268 Real distBorder = VMatMax(_.D*z-d); 269 //WriteLn("TRACE "+_MID+" draw.constrained 6"); 264 270 Real If(distBorder<=0, 265 271 { 272 //WriteLn("TRACE "+_MID+" draw.constrained 7"); 266 273 VMatrix _.beta0 := _.blockDef::_.store; 267 274 1 … … 272 279 If(!VRows(_.beta0),0, 273 280 { 281 //WriteLn("TRACE "+_MID+" draw.constrained 8"); 274 282 VMatrix z0 := Tra(Tra(_.beta0-nu)*_.Ls); 283 //WriteLn("TRACE "+_MID+" draw.constrained 9"); 275 284 VMatrix z := TruncStdGaussian(_.D,d,z0,1, 276 285 _.blockDef::_.config::bsr.truncMNormal.gibbsNumIter); … … 279 288 1 280 289 }); 290 //WriteLn("TRACE "+_MID+" draw.constrained 10"); 281 291 Real _.betaLogDens := -0.5*VMatDat(MtMSqr(z),1,1); 292 //WriteLn("TRACE "+_MID+" draw.constrained 11"); 282 293 VMatrix (_.blockDef::_.store) := nu + CholeskiSolve(_.L,z,"LtP"); 294 //WriteLn("TRACE "+_MID+" draw.constrained 12"); 283 295 Copy(_.blockDef::_.store) 284 296 }; … … 290 302 //////////////////////////////////////////////////////////////////////////// 291 303 { 304 //WriteLn("TRACE "+_MID+" draw 1"); 292 305 If(_.blockDef::enabled, 293 306 { 307 //WriteLn("TRACE "+_MID+" draw 2"); 294 308 VMatrix aux = drawer(numSim, _.solution::nu); 295 //WriteLn("TRACE "+_MID+" draw ");309 //WriteLn("TRACE "+_MID+" draw 3"); 296 310 Real _.blockDef::checkNonFiniteValues(numSim); 297 311 aux
Note: See TracChangeset
for help on using the changeset viewer.
