Changeset 1053 in Sophya for trunk/SophyaLib/HiStats/histos2.cc
- Timestamp:
- Jun 30, 2000, 3:21:53 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/HiStats/histos2.cc
r958 r1053 390 390 /////////////////////////////////////////////////////////////////// 391 391 /*! 392 Operateur H2 = H1 * b393 */394 Histo2D operator * (const Histo2D& a, double b)395 {396 Histo2D result(a);397 return (result *= b);398 }399 400 /*!401 Operateur H2 = b * H1402 */403 Histo2D operator * (double b, const Histo2D& a)404 {405 Histo2D result(a);406 return (result *= b);407 }408 409 /*!410 Operateur H2 = H1 / b411 */412 Histo2D operator / (const Histo2D& a, double b)413 {414 Histo2D result(a);415 return (result /= b);416 }417 418 /*!419 Operateur H2 = H1 + b420 */421 Histo2D operator + (const Histo2D& a, double b)422 {423 Histo2D result(a);424 return (result += b);425 }426 427 /*!428 Operateur H2 = b + H1429 */430 Histo2D operator + (double b, const Histo2D& a)431 {432 Histo2D result(a);433 return (result += b);434 }435 436 /*!437 Operateur H2 = H1 - b438 */439 Histo2D operator - (const Histo2D& a, double b)440 {441 Histo2D result(a);442 return (result -= b);443 }444 445 /*!446 Operateur H2 = b - H1447 */448 Histo2D operator - (double b, const Histo2D& a)449 {450 Histo2D result(a);451 result *= -1.;452 return (result += b);453 }454 455 ///////////////////////////////////////////////////////////////////456 /*!457 392 Operateur H += H1 458 393 */ … … 555 490 556 491 return *this; 557 }558 559 ///////////////////////////////////////////////////////////////////560 /*!561 Operateur H = H1 + H2562 */563 564 Histo2D operator + (const Histo2D& a, const Histo2D& b)565 {566 if (b.NBinX()!=a.NBinX() || b.NBinY()!=a.NBinY()) THROW(sizeMismatchErr);567 Histo2D c(a);568 return (c += b);569 }570 571 /*!572 Operateur H = H1 - H2573 */574 Histo2D operator - (const Histo2D& a, const Histo2D& b)575 {576 if (b.NBinX()!=a.NBinX() || b.NBinY()!=a.NBinY()) THROW(sizeMismatchErr);577 Histo2D c(a);578 return (c -= b);579 }580 581 /*!582 Operateur H = H1 * H2583 */584 Histo2D operator * (const Histo2D& a, const Histo2D& b)585 {586 if (b.NBinX()!=a.NBinX() || b.NBinY()!=a.NBinY()) THROW(sizeMismatchErr);587 Histo2D c(a);588 return (c *= b);589 }590 591 /*!592 Operateur H = H1 / H2593 */594 Histo2D operator / (const Histo2D& a, const Histo2D& b)595 {596 if (b.NBinX()!=a.NBinX() || b.NBinY()!=a.NBinY()) THROW(sizeMismatchErr);597 Histo2D c(a);598 return (c /= b);599 492 } 600 493
Note:
See TracChangeset
for help on using the changeset viewer.