Changeset 2d00fbd in tol
- Timestamp:
- Apr 13, 2009, 7:21:33 AM (18 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 291a836
- Parents:
- a0bfdeb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tol/stdlib/math/stat/models/bayesian/bysMcmc/_blockSampler.tol
ra0bfdeb r2d00fbd 32 32 //Flag that enables/disables the block 33 33 Real enabled = True; 34 Real refreshFrequency = 1; 34 35 //Work space stores all data needed to draw samples that are variant for 35 36 //each simulation … … 48 49 VMatrix draw(Real numSim); 49 50 51 //Method of sample generation 52 VMatrix get.draw(Real numSim, Real force) 53 { 54 Real refresh = Case( 55 force, 1, 56 !enabled, 0, 57 1==1, Rand(0,1)<=refreshFrequency); 58 If(!refresh, Copy(_.store), 59 { 60 VMatrix b = draw(numSim); 61 Real setStore(VMat2Mat(b)); 62 b 63 }) 64 }; 65 50 66 //This method will be called for MCMC initialzation 51 67 //Default behaviour does nothing … … 55 71 //Default behaviour does nothing 56 72 VMatrix filter(VMatrix Z) { Z }; 57 58 73 59 74 ////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.
