Changeset 40b58f9 in tol for tol/stdlib/math/stat/models/bayesian/bysMcmc/_partialSampler.tol
- Timestamp:
- Sep 3, 2009, 10:42:50 PM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- e7e91d9
- Parents:
- f16fdcd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tol/stdlib/math/stat/models/bayesian/bysMcmc/_partialSampler.tol
rf16fdcd r40b58f9 169 169 //////////////////////////////////////////////////////////////////////////// 170 170 { 171 //WriteLn("TRACE BlockPartialSampler::build 1"); 171 172 Real _.N := Card(blockParam); 172 173 BysMcmc::McmcPartialHandler _.mcmcPartialHandler := mcmcPartialHandler; 173 174 Set fixedParamIdx = Copy(Empty); 174 175 Set reloadParamIdx = Copy(Empty); 176 Real _.fixedParamNum := 0; 177 Real _.reloadParamNum := 0; 178 Real _.freeParamNum := 0; 179 Matrix _.fixedParamIdx := Rand(0,1,0,0); 180 Matrix _.reloadParamIdx := Rand(0,1,0,0); 181 Matrix _.freeParamIdx := Rand(0,1,0,0); 182 Set _.fixedParam := Copy(Empty); 183 Set _.reloadParam := Copy(Empty); 184 Set _.freeParam := Copy(Empty); 185 Set _.reloadParamIdxOrig := Copy(Empty); 175 186 If(!_.N, 176 187 { 177 Matrix _.fixedParamIdx := Rand(0,1,0,0);178 Matrix _.reloadParamIdx := Rand(0,1,0,0);179 Matrix _.freeParamIdx := Rand(0,1,0,0);180 Set _.fixedParam := Copy(Empty);181 Set _.reloadParam := Copy(Empty);182 Set _.freeParam := Copy(Empty);183 Real _.fixedParamNum := 0;184 Real _.reloadParamNum := 0;185 Real _.freeParamNum := 0;186 188 1 187 189 }, … … 191 193 Set fixedParamAll = _.mcmcPartialHandler::_.fixedParam; 192 194 Set fixedParamAux = SelectIndexByName(blockParam, fixedParamAll); 193 Set _.fixedParam := ExtractByIndex(fixedParamAll, fixedParamAux); 194 Real SetIndexByName(_.fixedParam); 195 Set fixedParamIdx := SelectIndexByName(_.fixedParam, blockParam); 196 Matrix _.fixedParamIdx := SetCol(fixedParamIdx); 197 1 195 Real If(!Card(fixedParamAux), 196 { 197 Set _.fixedParam := ExtractByIndex(fixedParamAll, fixedParamAux); 198 Real SetIndexByName(_.fixedParam); 199 Set fixedParamIdx := SelectIndexByName(_.fixedParam, blockParam); 200 Matrix _.fixedParamIdx := SetCol(fixedParamIdx); 201 1 202 }) 198 203 }); 199 204 Real If(Card(_.mcmcPartialHandler::_.reloadParam), … … 201 206 Set reloadParamAll = _.mcmcPartialHandler::_.reloadParam; 202 207 Set reloadParamAux = SelectIndexByName(blockParam, reloadParamAll); 203 Set _.reloadParam := ExtractByIndex(reloadParamAll, reloadParamAux); 204 Real SetIndexByName(_.reloadParam); 205 Set reloadParamIdx := SelectIndexByName(_.reloadParam, blockParam); 206 Matrix _.reloadParamIdx := SetCol(reloadParamIdx); 207 Set _.reloadParamIdxOrig := 208 _.mcmcPartialHandler::_.reloader::selectIndexes(_.reloadParam); 209 1 208 Real If(Card(reloadParamAux), 209 { 210 Set _.reloadParam := ExtractByIndex(reloadParamAll, reloadParamAux); 211 Real SetIndexByName(_.reloadParam); 212 Set reloadParamIdx := SelectIndexByName(_.reloadParam, blockParam); 213 Matrix _.reloadParamIdx := SetCol(reloadParamIdx); 214 Set _.reloadParamIdxOrig := 215 _.mcmcPartialHandler::_.reloader::selectIndexes(_.reloadParam); 216 1 217 }) 210 218 }); 211 219 Set freeParamIdx = Range(1,_.N,1)-(fixedParamIdx << reloadParamIdx);
Note: See TracChangeset
for help on using the changeset viewer.
