37 : fFunction(pFunction),
45 : fFunction(pFunction),
46 fTolerance(pTolerance),
61 G4int iterationNumber )
66 for(
G4int i=1;i<iterationNumber;i++)
77 G4int iterationNumber )
82 for(
G4int i=1;i<iterationNumber;i++)
93 G4int iterationNumber )
96 static const G4double root = 1.0/std::sqrt(3.0) ;
97 G4double Step = (xFinal - xInitial)/(2.0*iterationNumber) ;
100 for(
G4int i=0;i<iterationNumber;i++)
111 G4int iterationNumber )
115 G4double xPlus = xInitial + 0.5*Step ;
118 for(
G4int i=1;i<iterationNumber;i++)
126 return mean*Step/3.0 ;
148 static const G4double root = 1.0/std::sqrt(3.0) ;
150 G4double xMean = (xInitial + xFinal)/2.0 ;
167 G4Exception(
"G4SimpleIntegration::AdaptGauss()",
"Error",
170 G4double xMean = (xInitial + xFinal)/2.0 ;
174 if(std::fabs(leftHalf+rightHalf-full) <
fTolerance)
G4double MidPoint(G4double xInitial, G4double xFinal, G4int iterationNumber)
G4SimpleIntegration(function pFunction)
G4double Gauss(G4double xInitial, G4double xFinal, G4int iterationNumber)
G4double AdaptGaussIntegration(G4double xInitial, G4double xFinal)
void AdaptGauss(G4double xInitial, G4double xFinal, G4double &sum, G4int &depth)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4double Simpson(G4double xInitial, G4double xFinal, G4int iterationNumber)
G4double Trapezoidal(G4double xInitial, G4double xFinal, G4int iterationNumber)