CLHEP 2.0.4.7 Reference Documentation
CLHEP Home Page CLHEP Documentation CLHEP Bug Reports |
00001 // -*- C++ -*- 00002 // --------------------------------------------------------------------------- 00003 // 00004 // This file is a part of the CLHEP - a Class Library for High Energy Physics. 00005 // 00006 // 00007 // Copyright Cornell University 1993, 1996, All Rights Reserved. 00008 // 00009 // This software written by Nobu Katayama and Mike Smyth, Cornell University. 00010 // 00011 // Redistribution and use in source and binary forms, with or without 00012 // modification, are permitted provided that the following conditions 00013 // are met: 00014 // 1. Redistributions of source code must retain the above copyright 00015 // notice and author attribution, this list of conditions and the 00016 // following disclaimer. 00017 // 2. Redistributions in binary form must reproduce the above copyright 00018 // notice and author attribution, this list of conditions and the 00019 // following disclaimer in the documentation and/or other materials 00020 // provided with the distribution. 00021 // 3. Neither the name of the University nor the names of its contributors 00022 // may be used to endorse or promote products derived from this software 00023 // without specific prior written permission. 00024 // 00025 // Creation of derivative forms of this software for commercial 00026 // utilization may be subject to restriction; written permission may be 00027 // obtained from Cornell University. 00028 // 00029 // CORNELL MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. By way 00030 // of example, but not limitation, CORNELL MAKES NO REPRESENTATIONS OR 00031 // WARRANTIES OF MERCANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT 00032 // THE USE OF THIS SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, 00033 // COPYRIGHTS, TRADEMARKS, OR OTHER RIGHTS. Cornell University shall not be 00034 // held liable for any liability with respect to any claim by the user or any 00035 // other party arising from use of the program. 00036 // 00037 00038 #ifdef GNUPRAGMA 00039 #pragma implementation 00040 #endif 00041 00042 #include "CLHEP/Matrix/defs.h" 00043 #include "CLHEP/Matrix/Matrix.h" 00044 #include "CLHEP/Vector/Rotation.h" 00045 00046 namespace CLHEP { 00047 00048 HepMatrix & HepMatrix::operator=(const HepRotation &m2) { 00049 if(9!=size) { 00050 //delete &m; 00051 size = 9; 00052 m.resize(size); 00053 } 00054 nrow = ncol = 3; 00055 mIter mm; 00056 mm = m.begin(); 00057 *mm++ = m2.xx(); 00058 *mm++ = m2.xy(); 00059 *mm++ = m2.xz(); 00060 *mm++ = m2.yx(); 00061 *mm++ = m2.yy(); 00062 *mm++ = m2.yz(); 00063 *mm++ = m2.zx(); 00064 *mm++ = m2.zy(); 00065 *mm = m2.zz(); 00066 return (*this); 00067 } 00068 00069 } // namespace CLHEP