Changeset 359 for applications
- Timestamp:
- 06/08/09 15:38:41 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/pmsm/pmsmDS.h
r357 r359 256 256 //statistics 257 257 int dim=IM->dimension(); 258 258 259 vec mu0; 259 if (!UI::get( mu0, root, "mu0") ) 260 if(root.exists("mu0")) 261 UI::get( mu0, root, "mu0"); 262 else 260 263 mu0=zeros(dim); 264 261 265 mat P0; 262 vec dP0; 263 264 if (UI::get(dP0,root, "dP0") ) 266 if(root.exists( "dP0" )) 267 { 268 vec dP0; 269 UI::get(dP0,root, "dP0"); 265 270 P0=diag(dP0); 266 else if (!UI::get(P0,root, "P0") ) 271 } 272 else if (root.exists("P0")) 273 UI::get(P0,root, "P0"); 274 else 267 275 P0=eye(dim); 268 276 … … 327 335 int dim=IM->dimension(); 328 336 vec mu0; 329 vec dP0; 337 if( root.exists( "mu0")) 338 UI::get(mu0, root, "mu0"); 339 else 340 mu0=zeros(dim); 341 330 342 mat P0; 331 if (!UI::get(mu0, root, "mu0")) 332 mu0=zeros(dim); 333 if (!UI::get( P0, root, "P0" )) 334 if (UI::get(dP0, root, "dP0")) 335 P0=diag(dP0); 336 else 337 P0=eye(dim); 343 344 if(root.exists("dP0")) 345 { 346 vec dP0; 347 UI::get(dP0, root, "dP0"); 348 P0=diag(dP0); 349 } 350 else if(root.exists("P0")) 351 UI::get( P0, root, "P0" ); 352 else 353 P0=eye(dim); 338 354 339 355 set_statistics(mu0,P0);