G4ErrorMatrix.icc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 // $Id: G4ErrorMatrix.icc 69766 2013-05-14 14:33:55Z gcosmo $
00027 //
00028 // ------------------------------------------------------------
00029 //      GEANT 4 class inline implementation
00030 // ------------------------------------------------------------
00031 
00032 inline G4ErrorMatrix::G4ErrorMatrix()
00033   : m(0), nrow(0), ncol(0), size(0)
00034 {
00035 }
00036 
00037 inline G4int G4ErrorMatrix::num_row() const
00038 {
00039   return nrow;
00040 }
00041 
00042 inline G4int G4ErrorMatrix::num_col() const
00043 {
00044   return ncol;
00045 }
00046 
00047 inline G4int G4ErrorMatrix::num_size() const
00048 {
00049   return size;
00050 }
00051 
00052 inline G4double & G4ErrorMatrix::operator()(G4int row, G4int col)
00053 {
00054   return *(m.begin()+(row-1)*ncol+col-1);
00055 }
00056 
00057 inline const G4double & G4ErrorMatrix::operator()(G4int row, G4int col) const 
00058 {
00059   return *(m.begin()+(row-1)*ncol+col-1);
00060 }
00061 
00062 inline G4ErrorMatrix::G4ErrorMatrix_row G4ErrorMatrix::operator[] (G4int r)
00063 {
00064   G4ErrorMatrix_row b(*this,r);
00065   return b;
00066 }
00067 
00068 inline const G4ErrorMatrix::G4ErrorMatrix_row_const
00069 G4ErrorMatrix::operator[] (G4int r) const
00070 {
00071   G4ErrorMatrix_row_const b(*this,r);
00072   return b;
00073 }
00074 
00075 inline G4double &G4ErrorMatrix::G4ErrorMatrix_row::operator[](G4int c)
00076 {
00077   return *(_a.m.begin()+_r*_a.ncol+c);
00078 }
00079 
00080 inline const G4double &
00081 G4ErrorMatrix::G4ErrorMatrix_row_const::operator[](G4int c) const
00082 {
00083   return *(_a.m.begin()+_r*_a.ncol+c);
00084 }
00085 
00086 inline G4ErrorMatrix::
00087 G4ErrorMatrix_row::G4ErrorMatrix_row(G4ErrorMatrix&a, G4int r)
00088    : _a(a)
00089 {
00090   _r = r;
00091 }
00092 
00093 inline G4ErrorMatrix::G4ErrorMatrix_row_const::G4ErrorMatrix_row_const 
00094 (const G4ErrorMatrix&a, G4int r) 
00095    : _a(a) 
00096 {
00097   _r = r;
00098 }
00099 
00100 inline G4ErrorMatrix G4ErrorMatrix::inverse(G4int &ierr) const
00101 {
00102   G4ErrorMatrix mTmp(*this);
00103   mTmp.invert(ierr);
00104   return mTmp;
00105 }

Generated on Mon May 27 17:48:11 2013 for Geant4 by  doxygen 1.4.7