Import Geant4 11.1.0 source tree
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
typedef G4double (*function)(G4double);
|
||||
using function = G4double (*)(G4double);
|
||||
|
||||
class G4ChebyshevApproximation
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ class G4GaussChebyshevQ : public G4VGaussianQuadrature
|
||||
G4GaussChebyshevQ(function pFunction, G4int nChebyshev);
|
||||
// Constructor for Gauss-Chebyshev quadrature method
|
||||
|
||||
~G4GaussChebyshevQ() = default;
|
||||
~G4GaussChebyshevQ() override = default;
|
||||
|
||||
G4GaussChebyshevQ(const G4GaussChebyshevQ&) = delete;
|
||||
G4GaussChebyshevQ& operator=(const G4GaussChebyshevQ&) = delete;
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#include "G4Types.hh"
|
||||
|
||||
typedef G4double (*function)(G4double);
|
||||
using function = G4double (*)(G4double);
|
||||
|
||||
class G4SimpleIntegration
|
||||
{
|
||||
|
||||
@@ -69,8 +69,7 @@ G4double G4SimplexDownhill<T>::GetMinimum()
|
||||
doDownhill();
|
||||
// G4cout << "End First Trials" << G4endl;
|
||||
|
||||
std::vector<G4double>::const_iterator it_minh =
|
||||
std::min_element(currentHeights.cbegin(), currentHeights.cend());
|
||||
auto it_minh = std::min_element(currentHeights.cbegin(), currentHeights.cend());
|
||||
G4int imin = 0;
|
||||
G4int i = 0;
|
||||
for(auto it = currentHeights.cbegin(); it != currentHeights.cend(); ++it)
|
||||
@@ -137,13 +136,13 @@ std::vector<G4double> G4SimplexDownhill<T>::calCentroid(G4int ih)
|
||||
std::vector<G4double> centroid(numberOfVariable, 0.0);
|
||||
|
||||
G4int i = 0;
|
||||
for(auto it = currentSimplex.cbegin(); it != currentSimplex.cend(); ++it)
|
||||
for(const auto & it : currentSimplex)
|
||||
{
|
||||
if(i != ih)
|
||||
{
|
||||
for(G4int j = 0; j < numberOfVariable; ++j)
|
||||
{
|
||||
centroid[j] += (*it)[j] / numberOfVariable;
|
||||
centroid[j] += it[j] / numberOfVariable;
|
||||
}
|
||||
}
|
||||
++i;
|
||||
@@ -235,10 +234,8 @@ void G4SimplexDownhill<T>::doDownhill()
|
||||
break;
|
||||
}
|
||||
|
||||
std::vector<G4double>::const_iterator it_maxh =
|
||||
std::max_element(currentHeights.cbegin(), currentHeights.cend());
|
||||
std::vector<G4double>::const_iterator it_minh =
|
||||
std::min_element(currentHeights.cbegin(), currentHeights.cend());
|
||||
auto it_maxh = std::max_element(currentHeights.cbegin(), currentHeights.cend());
|
||||
auto it_minh = std::min_element(currentHeights.cbegin(), currentHeights.cend());
|
||||
|
||||
G4double h_H = *it_maxh;
|
||||
G4double h_L = *it_minh;
|
||||
@@ -342,13 +339,12 @@ void G4SimplexDownhill<T>::doDownhill()
|
||||
template <class T>
|
||||
std::vector<G4double> G4SimplexDownhill<T>::GetMinimumPoint()
|
||||
{
|
||||
if(minimized != true)
|
||||
if(!minimized)
|
||||
{
|
||||
GetMinimum();
|
||||
}
|
||||
|
||||
std::vector<G4double>::const_iterator it_minh =
|
||||
std::min_element(currentHeights.cbegin(), currentHeights.cend());
|
||||
auto it_minh = std::min_element(currentHeights.cbegin(), currentHeights.cend());
|
||||
|
||||
G4int imin = 0;
|
||||
G4int i = 0;
|
||||
|
||||
@@ -251,7 +251,7 @@ void G4StatAnalysis::PrintInfo(std::ostream& os, const std::string& tab) const
|
||||
|
||||
std::stringstream ss;
|
||||
ss << tab //<< scientific
|
||||
<< setprecision(os.precision()) << right << _sum << left
|
||||
<< setprecision((G4int)os.precision()) << right << _sum << left
|
||||
<< " [sigma: " << right << _sigma << left << " | error: " << right
|
||||
<< _error << left << " | coeff: " << right << _coeff << left
|
||||
<< " | eff: " << right << _eff << left << " | fom: " << right << _fom
|
||||
|
||||
@@ -52,16 +52,7 @@ class G4StatDouble
|
||||
fill(rhs);
|
||||
return *this;
|
||||
}
|
||||
G4StatDouble& operator=(const G4StatDouble& rhs)
|
||||
{
|
||||
m_sum_wx = rhs.m_sum_wx;
|
||||
m_sum_wx2 = rhs.m_sum_wx2;
|
||||
m_n = rhs.m_n;
|
||||
m_sum_w = rhs.m_sum_w;
|
||||
m_sum_w2 = rhs.m_sum_w2;
|
||||
m_scale = rhs.m_scale;
|
||||
return *this;
|
||||
}
|
||||
G4StatDouble& operator=(const G4StatDouble& rhs) = default;
|
||||
G4StatDouble& operator+=(const G4double& rhs)
|
||||
{
|
||||
fill(rhs);
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
typedef G4double (*function)(G4double);
|
||||
using function = G4double (*)(G4double);
|
||||
|
||||
class G4VGaussianQuadrature
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user