Import Geant4 11.0.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2021-06-25 16:12:29 +02:00
parent c968e26a39
commit 6399a014b6
4200 changed files with 207479 additions and 237366 deletions
@@ -28,52 +28,41 @@
// GEANT 4 class inline implementation
// ------------------------------------------------------------
inline G4ErrorSymMatrix::G4ErrorSymMatrix()
: m(0)
, nrow(0)
, size(0)
{}
inline G4ErrorSymMatrix::G4ErrorSymMatrix()
: m(0), nrow(0), size(0)
inline G4int G4ErrorSymMatrix::num_row() const { return nrow; }
inline G4int G4ErrorSymMatrix::num_col() const { return nrow; }
inline G4int G4ErrorSymMatrix::num_size() const { return size; }
inline G4double& G4ErrorSymMatrix::fast(G4int row, G4int col)
{
return *(m.begin() + (row * (row - 1)) / 2 + (col - 1));
}
inline G4int G4ErrorSymMatrix::num_row() const
inline const G4double& G4ErrorSymMatrix::fast(G4int row, G4int col) const
{
return nrow;
return *(m.begin() + (row * (row - 1)) / 2 + (col - 1));
}
inline G4int G4ErrorSymMatrix::num_col() const
inline G4double& G4ErrorSymMatrix::operator()(G4int row, G4int col)
{
return nrow;
return (row >= col ? fast(row, col) : fast(col, row));
}
inline G4int G4ErrorSymMatrix::num_size() const
inline const G4double& G4ErrorSymMatrix::operator()(G4int row, G4int col) const
{
return size;
return (row >= col ? fast(row, col) : fast(col, row));
}
inline G4double & G4ErrorSymMatrix::fast(G4int row,G4int col)
inline void G4ErrorSymMatrix::assign(const G4ErrorSymMatrix& mat)
{
return *(m.begin()+(row*(row-1))/2+(col-1));
}
inline const G4double & G4ErrorSymMatrix::fast(G4int row,G4int col) const
{
return *(m.begin()+(row*(row-1))/2+(col-1));
}
inline G4double &
G4ErrorSymMatrix::operator()(G4int row, G4int col)
{
return (row>=col? fast(row,col) : fast(col,row));
}
inline const G4double &
G4ErrorSymMatrix::operator()(G4int row, G4int col) const
{
return (row>=col? fast(row,col) : fast(col,row));
}
inline void G4ErrorSymMatrix::assign(const G4ErrorSymMatrix &mat)
{
(*this)=mat;
(*this) = mat;
}
inline G4ErrorSymMatrix G4ErrorSymMatrix::T() const
@@ -81,57 +70,58 @@ inline G4ErrorSymMatrix G4ErrorSymMatrix::T() const
return G4ErrorSymMatrix(*this);
}
inline G4ErrorSymMatrix::G4ErrorSymMatrix_row
G4ErrorSymMatrix::operator[] (G4int r)
inline G4ErrorSymMatrix::G4ErrorSymMatrix_row G4ErrorSymMatrix::operator[](
G4int r)
{
G4ErrorSymMatrix_row b(*this,r);
G4ErrorSymMatrix_row b(*this, r);
return b;
}
inline G4ErrorSymMatrix::G4ErrorSymMatrix_row_const
G4ErrorSymMatrix::operator[] (G4int r) const
inline G4ErrorSymMatrix::G4ErrorSymMatrix_row_const G4ErrorSymMatrix::
operator[](G4int r) const
{
const G4ErrorSymMatrix_row_const b(*this,r);
const G4ErrorSymMatrix_row_const b(*this, r);
return b;
}
inline G4double &G4ErrorSymMatrix::G4ErrorSymMatrix_row::operator[](G4int c)
inline G4double& G4ErrorSymMatrix::G4ErrorSymMatrix_row::operator[](G4int c)
{
if (_r >= c )
{
return *(_a.m.begin() + (_r+1)*_r/2 + c);
}
else
{
return *(_a.m.begin() + (c+1)*c/2 + _r);
}
if(_r >= c)
{
return *(_a.m.begin() + (_r + 1) * _r / 2 + c);
}
else
{
return *(_a.m.begin() + (c + 1) * c / 2 + _r);
}
}
inline const G4double &
G4ErrorSymMatrix::G4ErrorSymMatrix_row_const::operator[](G4int c) const
inline const G4double& G4ErrorSymMatrix::G4ErrorSymMatrix_row_const::operator[](
G4int c) const
{
if (_r >= c )
{
return *(_a.m.begin() + (_r+1)*_r/2 + c);
}
else
{
return *(_a.m.begin() + (c+1)*c/2 + _r);
}
if(_r >= c)
{
return *(_a.m.begin() + (_r + 1) * _r / 2 + c);
}
else
{
return *(_a.m.begin() + (c + 1) * c / 2 + _r);
}
}
inline G4ErrorSymMatrix::
G4ErrorSymMatrix_row::G4ErrorSymMatrix_row(G4ErrorSymMatrix &a, G4int r)
: _a(a), _r(r)
inline G4ErrorSymMatrix::G4ErrorSymMatrix_row::G4ErrorSymMatrix_row(
G4ErrorSymMatrix& a, G4int r)
: _a(a)
, _r(r)
{}
inline G4ErrorSymMatrix::
G4ErrorSymMatrix_row_const::G4ErrorSymMatrix_row_const
(const G4ErrorSymMatrix&a,G4int r)
: _a(a), _r(r)
inline G4ErrorSymMatrix::G4ErrorSymMatrix_row_const::G4ErrorSymMatrix_row_const(
const G4ErrorSymMatrix& a, G4int r)
: _a(a)
, _r(r)
{}
inline G4ErrorSymMatrix G4ErrorSymMatrix::inverse(G4int &ifail) const
inline G4ErrorSymMatrix G4ErrorSymMatrix::inverse(G4int& ifail) const
{
G4ErrorSymMatrix mTmp(*this);
mTmp.invert(ifail);