G4ErrorMatrix.hh File Reference

#include <vector>
#include "G4ErrorMatrix.icc"

Go to the source code of this file.

Data Structures

class  G4ErrorMatrix
class  G4ErrorMatrix::G4ErrorMatrix_row
class  G4ErrorMatrix::G4ErrorMatrix_row_const

Typedefs

typedef std::vector< G4double
>::iterator 
G4ErrorMatrixIter
typedef std::vector< G4double
>::const_iterator 
G4ErrorMatrixConstIter

Functions

G4ErrorMatrix operator * (const G4ErrorMatrix &m1, const G4ErrorMatrix &m2)
G4ErrorMatrix operator * (G4double t, const G4ErrorMatrix &m1)
G4ErrorMatrix operator * (const G4ErrorMatrix &m1, G4double t)
G4ErrorMatrix operator/ (const G4ErrorMatrix &m1, G4double t)
G4ErrorMatrix operator+ (const G4ErrorMatrix &m1, const G4ErrorMatrix &m2)
G4ErrorMatrix operator- (const G4ErrorMatrix &m1, const G4ErrorMatrix &m2)
G4ErrorMatrix dsum (const G4ErrorMatrix &, const G4ErrorMatrix &)
std::ostream & operator<< (std::ostream &s, const G4ErrorMatrix &q)
G4ErrorMatrix qr_solve (const G4ErrorMatrix &A, const G4ErrorMatrix &b)
G4ErrorMatrix qr_solve (G4ErrorMatrix *A, const G4ErrorMatrix &b)
G4ErrorMatrix qr_inverse (const G4ErrorMatrix &A)
G4ErrorMatrix qr_inverse (G4ErrorMatrix *A)
void qr_decomp (G4ErrorMatrix *A, G4ErrorMatrix *hsm)
G4ErrorMatrix qr_decomp (G4ErrorMatrix *A)
void back_solve (const G4ErrorMatrix &R, G4ErrorMatrix *b)
void col_house (G4ErrorMatrix *a, const G4ErrorMatrix &v, G4double vnormsq, G4int row, G4int col, G4int row_start, G4int col_start)
void col_house (G4ErrorMatrix *a, const G4ErrorMatrix &v, G4int row, G4int col, G4int row_start, G4int col_start)
void col_givens (G4ErrorMatrix *A, G4double c, G4double s, G4int k1, G4int k2, G4int row_min=1, G4int row_max=0)
void row_givens (G4ErrorMatrix *A, G4double c, G4double s, G4int k1, G4int k2, G4int col_min=1, G4int col_max=0)
void givens (G4double a, G4double b, G4double *c, G4double *s)
void house_with_update (G4ErrorMatrix *a, G4int row=1, G4int col=1)
void house_with_update (G4ErrorMatrix *a, G4ErrorMatrix *v, G4int row=1, G4int col=1)
void row_house (G4ErrorMatrix *a, const G4ErrorMatrix &v, G4double vnormsq, G4int row, G4int col, G4int row_start, G4int col_start)
void row_house (G4ErrorMatrix *a, const G4ErrorMatrix &v, G4int row, G4int col, G4int row_start, G4int col_start)


Typedef Documentation

typedef std::vector<G4double >::const_iterator G4ErrorMatrixConstIter

Definition at line 44 of file G4ErrorMatrix.hh.

typedef std::vector<G4double >::iterator G4ErrorMatrixIter

Definition at line 41 of file G4ErrorMatrix.hh.


Function Documentation

void back_solve ( const G4ErrorMatrix R,
G4ErrorMatrix b 
)

void col_givens ( G4ErrorMatrix A,
G4double  c,
G4double  s,
G4int  k1,
G4int  k2,
G4int  row_min = 1,
G4int  row_max = 0 
)

void col_house ( G4ErrorMatrix a,
const G4ErrorMatrix v,
G4int  row,
G4int  col,
G4int  row_start,
G4int  col_start 
)

void col_house ( G4ErrorMatrix a,
const G4ErrorMatrix v,
G4double  vnormsq,
G4int  row,
G4int  col,
G4int  row_start,
G4int  col_start 
)

G4ErrorMatrix dsum ( const G4ErrorMatrix ,
const G4ErrorMatrix  
)

Definition at line 201 of file G4ErrorMatrix.cc.

00202 {
00203   G4ErrorMatrix mret(mat1.num_row() + mat2.num_row(),
00204                      mat1.num_col() + mat2.num_col(), 0);
00205   mret.sub(1,1,mat1);
00206   mret.sub(mat1.num_row()+1,mat1.num_col()+1,mat2);
00207   return mret;
00208 }

void givens ( G4double  a,
G4double  b,
G4double c,
G4double s 
)

void house_with_update ( G4ErrorMatrix a,
G4ErrorMatrix v,
G4int  row = 1,
G4int  col = 1 
)

void house_with_update ( G4ErrorMatrix a,
G4int  row = 1,
G4int  col = 1 
)

G4ErrorMatrix operator * ( const G4ErrorMatrix m1,
G4double  t 
)

Definition at line 258 of file G4ErrorMatrix.cc.

00259 {
00260   G4ErrorMatrix mret(mat1);
00261   mret *= t;
00262   return mret;
00263 }

G4ErrorMatrix operator * ( G4double  t,
const G4ErrorMatrix m1 
)

Definition at line 265 of file G4ErrorMatrix.cc.

00266 {
00267   G4ErrorMatrix mret(mat1);
00268   mret *= t;
00269   return mret;
00270 }

G4ErrorMatrix operator * ( const G4ErrorMatrix m1,
const G4ErrorMatrix m2 
)

Definition at line 272 of file G4ErrorMatrix.cc.

00273 {
00274   // initialize matrix to 0.0
00275   G4ErrorMatrix mret(mat1.nrow,mat2.ncol,0);
00276   CHK_DIM_1(mat1.ncol,mat2.nrow,*);
00277 
00278   G4int m1cols = mat1.ncol;
00279   G4int m2cols = mat2.ncol;
00280 
00281   for (G4int i=0; i<mat1.nrow; i++)
00282   {
00283      for (G4int j=0; j<m1cols; j++) 
00284      {
00285          G4double temp = mat1.m[i*m1cols+j];
00286          G4ErrorMatrixIter pt = mret.m.begin() + i*m2cols;
00287 
00288         // Loop over k (the column index in matrix mat2)
00289         G4ErrorMatrixConstIter pb = mat2.m.begin() + m2cols*j;
00290         const G4ErrorMatrixConstIter pblast = pb + m2cols;
00291         while (pb < pblast)
00292         {
00293            (*pt) += temp * (*pb);
00294            pb++;
00295            pt++;
00296         }
00297      }
00298   }
00299   return mret;
00300 }

G4ErrorMatrix operator+ ( const G4ErrorMatrix m1,
const G4ErrorMatrix m2 
)

Definition at line 225 of file G4ErrorMatrix.cc.

00226 {
00227   G4ErrorMatrix mret(mat1.nrow, mat1.ncol);
00228   CHK_DIM_2(mat1.num_row(),mat2.num_row(), mat1.num_col(),mat2.num_col(),+);
00229   SIMPLE_TOP(+)
00230   return mret;
00231 }

G4ErrorMatrix operator- ( const G4ErrorMatrix m1,
const G4ErrorMatrix m2 
)

Definition at line 237 of file G4ErrorMatrix.cc.

00238 {
00239   G4ErrorMatrix mret(mat1.num_row(), mat1.num_col());
00240   CHK_DIM_2(mat1.num_row(),mat2.num_row(),
00241                          mat1.num_col(),mat2.num_col(),-);
00242   SIMPLE_TOP(-)
00243   return mret;
00244 }

G4ErrorMatrix operator/ ( const G4ErrorMatrix m1,
G4double  t 
)

Definition at line 251 of file G4ErrorMatrix.cc.

00252 {
00253   G4ErrorMatrix mret(mat1);
00254   mret /= t;
00255   return mret;
00256 }

std::ostream& operator<< ( std::ostream &  s,
const G4ErrorMatrix q 
)

Definition at line 350 of file G4ErrorMatrix.cc.

00351 {
00352   os << "\n";
00353 
00354   // Fixed format needs 3 extra characters for field,
00355   // while scientific needs 7
00356 
00357   G4int width;
00358   if(os.flags() & std::ios::fixed)
00359     { width = os.precision()+3; }
00360   else
00361     { width = os.precision()+7; }
00362   for(G4int irow = 1; irow<= q.num_row(); irow++)
00363     {
00364       for(G4int icol = 1; icol <= q.num_col(); icol++)
00365         {
00366           os.width(width);
00367           os << q(irow,icol) << " ";
00368         }
00369       os << G4endl;
00370     }
00371   return os;
00372 }

G4ErrorMatrix qr_decomp ( G4ErrorMatrix A  ) 

void qr_decomp ( G4ErrorMatrix A,
G4ErrorMatrix hsm 
)

G4ErrorMatrix qr_inverse ( G4ErrorMatrix A  ) 

G4ErrorMatrix qr_inverse ( const G4ErrorMatrix A  ) 

G4ErrorMatrix qr_solve ( G4ErrorMatrix A,
const G4ErrorMatrix b 
)

G4ErrorMatrix qr_solve ( const G4ErrorMatrix A,
const G4ErrorMatrix b 
)

void row_givens ( G4ErrorMatrix A,
G4double  c,
G4double  s,
G4int  k1,
G4int  k2,
G4int  col_min = 1,
G4int  col_max = 0 
)

void row_house ( G4ErrorMatrix a,
const G4ErrorMatrix v,
G4int  row,
G4int  col,
G4int  row_start,
G4int  col_start 
)

void row_house ( G4ErrorMatrix a,
const G4ErrorMatrix v,
G4double  vnormsq,
G4int  row,
G4int  col,
G4int  row_start,
G4int  col_start 
)


Generated on Mon May 27 17:50:43 2013 for Geant4 by  doxygen 1.4.7