Changeset 1053 in Sophya for trunk/SophyaLib/HiStats/histos2.cc


Ignore:
Timestamp:
Jun 30, 2000, 3:21:53 PM (25 years ago)
Author:
ansari
Message:

les friend operator ne marche plus ? passage en inline cmv 30/06/00

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/HiStats/histos2.cc

    r958 r1053  
    390390///////////////////////////////////////////////////////////////////
    391391/*!
    392   Operateur H2 = H1 * b
    393 */
    394 Histo2D operator * (const Histo2D& a, double b)
    395 {
    396   Histo2D result(a);
    397   return (result *= b);
    398 }
    399 
    400 /*!
    401   Operateur H2 = b * H1
    402 */
    403 Histo2D operator * (double b, const Histo2D& a)
    404 {
    405   Histo2D result(a);
    406   return (result *= b);
    407 }
    408 
    409 /*!
    410   Operateur H2 = H1 / b
    411 */
    412 Histo2D operator / (const Histo2D& a, double b)
    413 {
    414   Histo2D result(a);
    415   return (result /= b);
    416 }
    417 
    418 /*!
    419   Operateur H2 = H1 + b
    420 */
    421 Histo2D operator + (const Histo2D& a, double b)
    422 {
    423   Histo2D result(a);
    424   return (result += b);
    425 }
    426 
    427 /*!
    428   Operateur H2 = b + H1
    429 */
    430 Histo2D operator + (double b, const Histo2D& a)
    431 {
    432   Histo2D result(a);
    433   return (result += b);
    434 }
    435 
    436 /*!
    437   Operateur H2 = H1 - b
    438 */
    439 Histo2D operator - (const Histo2D& a, double b)
    440 {
    441   Histo2D result(a);
    442   return (result -= b);
    443 }
    444 
    445 /*!
    446   Operateur H2 = b - H1
    447 */
    448 Histo2D operator - (double b, const Histo2D& a)
    449 {
    450   Histo2D result(a);
    451   result *= -1.;
    452   return (result += b);
    453 }
    454 
    455 ///////////////////////////////////////////////////////////////////
    456 /*!
    457392  Operateur H += H1
    458393*/
     
    555490
    556491return *this;
    557 }
    558 
    559 ///////////////////////////////////////////////////////////////////
    560 /*!
    561   Operateur H = H1 + H2
    562 */
    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 - H2
    573 */
    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 * H2
    583 */
    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 / H2
    593 */
    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);
    599492}
    600493
Note: See TracChangeset for help on using the changeset viewer.