Changeset b2c33bb in tol
- Timestamp:
- Jan 19, 2009, 8:50:02 AM (18 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 567228f
- Parents:
- 095d51c
- File:
-
- 1 edited
-
tol/btol/vmatrix_type/vmat_bsr.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/vmatrix_type/vmat_bsr.cpp
r095d51c rb2c33bb 101 101 "Text:Session.Description," 102 102 "Text:Session.Authors," 103 " Text:Session.Creation,"103 "Date:Session.Creation," 104 104 "Text:Path"); 105 105 } … … 137 137 "Real:Row," 138 138 "Real:Col," 139 " Real:Prior,"139 "Text:Prior," 140 140 "Real:Nu," 141 141 "Real:Sigma2," … … 403 403 template<> symbol_handler<sigma_info>* add_symbol<sigma_info> ::sh_ = NULL; 404 404 template<> symbol_handler<noise_info>* add_symbol<noise_info> ::sh_ = NULL; 405 406 407 /////////////////////////////////////////////////////////////////////////////// 408 struct assign_missing_min 409 /////////////////////////////////////////////////////////////////////////////// 410 { 411 static symbol_handler<missing_info>* mis_; 412 413 static void action(const double d) 414 { 415 mis_->info.minBound = d; 416 } 417 static void action(const std::string& str) 418 { 419 if(str=="?") 420 { 421 action(BDat::NegInf()); 422 } 423 else 424 { 425 action(atof(str.c_str())); 426 } 427 } 428 void operator()(const double d) const 429 { 430 action(d); 431 } 432 void operator()(const std::string& str) const 433 { 434 action(str); 435 } 436 void operator()(const char* str) const 437 { 438 action(str); 439 } 440 template<typename IteratorT> 441 void operator()(IteratorT first, IteratorT last) const 442 { 443 std::string str; 444 str.assign(first, last); 445 action(str); 446 } 447 }; 448 symbol_handler<missing_info>* assign_missing_min::mis_ = NULL; 449 450 /////////////////////////////////////////////////////////////////////////////// 451 struct assign_missing_max 452 /////////////////////////////////////////////////////////////////////////////// 453 { 454 static symbol_handler<missing_info>* mis_; 455 456 static void action(const double d) 457 { 458 mis_->info.maxBound = d; 459 } 460 static void action(const std::string& str) 461 { 462 if(str=="?") 463 { 464 action(BDat::PosInf()); 465 } 466 else 467 { 468 action(atof(str.c_str())); 469 } 470 } 471 void operator()(const double d) const 472 { 473 action(d); 474 } 475 void operator()(const char* str) const 476 { 477 action(str); 478 } 479 void operator()(const std::string& str) const 480 { 481 action(str); 482 } 483 template<typename IteratorT> 484 void operator()(IteratorT first, IteratorT last) const 485 { 486 std::string str; 487 str.assign(first, last); 488 action(str); 489 } 490 }; 491 symbol_handler<missing_info>* assign_missing_max::mis_ = NULL; 405 492 406 493 … … 1187 1274 add_symbol<noise_info>::sh_ = &s.noise; 1188 1275 add_symbol<noise_info> add_res; 1276 1277 assign_missing_min::mis_ = &s.mis; 1278 assign_missing_min assign_missing_min_; 1279 assign_missing_max::mis_ = &s.mis; 1280 assign_missing_max assign_missing_max_; 1189 1281 1190 1282 assign_noise_size::noise_info_ = &s.noise.info; … … 1605 1697 (real_p[assign_a(s.mis.info.sigma2)] | error_badNumber)>> 1606 1698 argumentSeparator >> 1607 ( real_p[assign_a(s.mis.info.minBound)] | error_badNumber)>>1699 ((str_p("?")|real_p)[assign_missing_min_] | error_badNumber) >> 1608 1700 argumentSeparator >> 1609 ( real_p[assign_a(s.mis.info.maxBound)] | error_badNumber) >>1701 ((str_p("?")|real_p)[assign_missing_max_] | error_badNumber) >> 1610 1702 closeParenthesys 1611 1703 )
Note: See TracChangeset
for help on using the changeset viewer.
