3 // ---------------------------------------------------------------------------
 
    5 // This file is a part of the CLHEP - a Class Library for High Energy Physics.
 
    7 // This contains the definitions of the inline member functions of the
 
    8 // Hep4RotationInterface and Hep3RotationInterface classes, and of the 
 
    9 // HepRep3x3 and HepRep4x4 structs.
 
   18 inline HepRep3x3::HepRep3x3() : 
 
   19      xx_(1.0), xy_(0.0), xz_(0.0)
 
   20    , yx_(0.0), yy_(1.0), yz_(0.0)
 
   21    , zx_(0.0), zy_(0.0), zz_(1.0)
 
   24 inline HepRep3x3::HepRep3x3(  double xx, double xy, double xz
 
   25                    , double yx, double yy, double yz
 
   26                    , double zx, double zy, double zz
 
   28      xx_(xx), xy_(xy), xz_(xz)
 
   29    , yx_(yx), yy_(yy), yz_(yz)
 
   30    , zx_(zx), zy_(zy), zz_(zz)
 
   33 inline HepRep3x3::HepRep3x3( const double * array ) {
 
   34   const double * a = array; 
 
   36   for ( int i = 0; i < 9; i++ ) { *r++ = *a++; }
 
   39 inline void HepRep3x3::setToIdentity() {
 
   40      xx_ = 1.0; xy_ = 0.0; xz_ = 0.0;
 
   41      yx_ = 0.0; yy_ = 1.0; yz_ = 0.0;
 
   42      zx_ = 0.0; zy_ = 0.0; zz_ = 1.0;
 
   45 inline void HepRep3x3::getArray( double * array ) const {
 
   47   const double * r = &xx_;
 
   48   for ( int i = 0; i < 9; i++ ) { *a++ = *r++; }
 
   56 inline HepRep4x4::HepRep4x4() :
 
   57      xx_(1.0), xy_(0.0), xz_(0.0), xt_(0.0)
 
   58    , yx_(0.0), yy_(1.0), yz_(0.0), yt_(0.0)
 
   59    , zx_(0.0), zy_(0.0), zz_(1.0), zt_(0.0)
 
   60    , tx_(0.0), ty_(0.0), tz_(0.0), tt_(1.0)
 
   63 inline HepRep4x4::HepRep4x4(  
 
   64                 double xx, double xy, double xz, double xt
 
   65                    , double yx, double yy, double yz, double yt
 
   66                    , double zx, double zy, double zz, double zt
 
   67                    , double tx, double ty, double tz, double tt
 
   69      xx_(xx), xy_(xy), xz_(xz), xt_(xt)
 
   70    , yx_(yx), yy_(yy), yz_(yz), yt_(yt)
 
   71    , zx_(zx), zy_(zy), zz_(zz), zt_(zt)
 
   72    , tx_(tx), ty_(ty), tz_(tz), tt_(tt)
 
   75 inline HepRep4x4::HepRep4x4( const HepRep4x4Symmetric & rep ) :
 
   76      xx_(rep.xx_), xy_(rep.xy_), xz_(rep.xz_), xt_(rep.xt_)
 
   77    , yx_(rep.xy_), yy_(rep.yy_), yz_(rep.yz_), yt_(rep.yt_)
 
   78    , zx_(rep.xz_), zy_(rep.yz_), zz_(rep.zz_), zt_(rep.zt_)
 
   79    , tx_(rep.xt_), ty_(rep.yt_), tz_(rep.zt_), tt_(rep.tt_)
 
   82 inline HepRep4x4::HepRep4x4( const double * array ) {
 
   83   const double * a = array; 
 
   85   for ( int i = 0; i < 16; i++ ) { *r++ = *a++; }
 
   88 inline void HepRep4x4::setToIdentity() {
 
   89      xx_ = 1.0; xy_ = 0.0; xz_ = 0.0; xt_ = 0.0;
 
   90      yx_ = 0.0; yy_ = 1.0; yz_ = 0.0; yt_ = 0.0;
 
   91      zx_ = 0.0; zy_ = 0.0; zz_ = 1.0; zt_ = 0.0;
 
   92      tx_ = 0.0; ty_ = 0.0; tz_ = 0.0; tt_ = 1.0;
 
   95 inline void HepRep4x4::getArray( double * array ) const {
 
   97   const double * r = &xx_;
 
   98   for ( int i = 0; i < 16; i++ ) { *a++ = *r++; }
 
  101 inline bool HepRep4x4::operator == (const HepRep4x4 & r) const {
 
  102   return( xx_ == r.xx_ && xy_ == r.xy_ && xz_ == r.xz_ && xt_ == r.xt_ &&
 
  103           yx_ == r.yx_ && yy_ == r.yy_ && yz_ == r.yz_ && yt_ == r.yt_ &&
 
  104           zx_ == r.zx_ && zy_ == r.zy_ && zz_ == r.zz_ && zt_ == r.zt_ &&
 
  105           tx_ == r.tx_ && ty_ == r.ty_ && tz_ == r.tz_ && tt_ == r.tt_ );
 
  108 inline bool HepRep4x4::operator != (const HepRep4x4 & r) const {
 
  109   return !(operator== (r));
 
  112 //-******************
 
  113 // HepRep4x4Symmetric
 
  114 //-******************
 
  116 inline HepRep4x4Symmetric::HepRep4x4Symmetric() :
 
  117      xx_(1.0), xy_(0.0), xz_(0.0), xt_(0.0)
 
  118    ,           yy_(1.0), yz_(0.0), yt_(0.0)
 
  123 inline HepRep4x4Symmetric::HepRep4x4Symmetric 
 
  124         ( double xx, double xy, double xz, double xt
 
  125                       , double yy, double yz, double yt
 
  126                                     , double zz, double zt
 
  128      xx_(xx), xy_(xy), xz_(xz), xt_(xt)
 
  129             , yy_(yy), yz_(yz), yt_(yt)
 
  134 inline HepRep4x4Symmetric::HepRep4x4Symmetric( const double * array ) {
 
  135   const double * a = array; 
 
  137   for ( int i = 0; i < 10; i++ ) { *r++ = *a++; }
 
  140 inline void HepRep4x4Symmetric::setToIdentity() {
 
  141      xx_ = 1.0; xy_ = 0.0; xz_ = 0.0; xt_ = 0.0;
 
  142                 yy_ = 1.0; yz_ = 0.0; yt_ = 0.0;
 
  143                            zz_ = 1.0; zt_ = 0.0;
 
  147 inline void HepRep4x4Symmetric::getArray( double * array ) const {
 
  149   const double * r = &xx_;
 
  150   for ( int i = 0; i < 10; i++ ) { *a++ = *r++; }