// -*- C++ -*- // --------------------------------------------------------------------------- // // This file is a part of the CLHEP - a Class Library for High Energy Physics. // #ifdef GNUPRAGMA #pragma implementation #endif #include #include #include "CLHEP/Matrix/defs.h" #include "CLHEP/Random/Random.h" #include "CLHEP/Matrix/DiagMatrix.h" #include "CLHEP/Matrix/Matrix.h" #include "CLHEP/Matrix/SymMatrix.h" #include "CLHEP/Matrix/Vector.h" #ifdef HEP_DEBUG_INLINE #include "CLHEP/Matrix/DiagMatrix.icc" #endif namespace CLHEP { // Simple operation for all elements #define SIMPLE_UOP(OPER) \ register HepMatrix::mIter a=m.begin(); \ register HepMatrix::mIter e=m.begin()+num_size(); \ for(;a num_row()) error("HepDiagMatrix::sub: Index out of range"); HepMatrix::mIter a = mret.m.begin(); HepMatrix::mcIter b = m.begin() + min_row - 1; HepMatrix::mIter e = mret.m.begin() + mret.num_row(); for(;a num_row()) error("HepDiagMatrix::sub: Index out of range"); HepMatrix::mIter a = mret.m.begin(); HepMatrix::mIter b = m.begin() + min_row - 1; HepMatrix::mIter e = mret.m.begin() + mret.num_row(); for(;a num_row() ) error("HepDiagMatrix::sub: Index out of range"); HepMatrix::mcIter a = m1.m.begin(); HepMatrix::mIter b = m.begin() + row - 1; HepMatrix::mcIter e = m1.m.begin() + m1.num_row(); for(;a