Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes
G4VGaussianQuadrature Class Reference

#include <G4VGaussianQuadrature.hh>

Inheritance diagram for G4VGaussianQuadrature:
G4GaussChebyshevQ G4GaussHermiteQ G4GaussJacobiQ G4GaussLaguerreQ G4GaussLegendreQ

Public Member Functions

 G4VGaussianQuadrature (function pFunction)
 
virtual ~G4VGaussianQuadrature ()
 
G4double GetAbscissa (G4int index) const
 
G4double GetWeight (G4int index) const
 
G4int GetNumber () const
 

Protected Member Functions

G4double GammaLogarithm (G4double xx)
 

Protected Attributes

function fFunction
 
G4doublefAbscissa
 
G4doublefWeight
 
G4int fNumber
 

Detailed Description

Definition at line 66 of file G4VGaussianQuadrature.hh.

Constructor & Destructor Documentation

G4VGaussianQuadrature::G4VGaussianQuadrature ( function  pFunction)
explicit

Definition at line 36 of file G4VGaussianQuadrature.cc.

G4VGaussianQuadrature::~G4VGaussianQuadrature ( )
virtual

Definition at line 46 of file G4VGaussianQuadrature.cc.

References fAbscissa, and fWeight.

47 {
48  delete[] fAbscissa ;
49  delete[] fWeight ;
50 }

Member Function Documentation

G4double G4VGaussianQuadrature::GammaLogarithm ( G4double  xx)
protected

Definition at line 77 of file G4VGaussianQuadrature.cc.

References test::x.

Referenced by G4GaussJacobiQ::G4GaussJacobiQ(), and G4GaussLaguerreQ::G4GaussLaguerreQ().

78 {
79 
80 // Returns the value ln(Gamma(xx) for xx > 0. Full accuracy is obtained for
81 // xx > 1. For 0 < xx < 1. the reflection formula (6.1.4) can be used first.
82 // (Adapted from Numerical Recipes in C)
83 
84  static const G4double cof[6] = { 76.18009172947146, -86.50532032941677,
85  24.01409824083091, -1.231739572450155,
86  0.1208650973866179e-2, -0.5395239384953e-5 };
87  G4double x = xx - 1.0;
88  G4double tmp = x + 5.5;
89  tmp -= (x + 0.5) * std::log(tmp);
90  G4double ser = 1.000000000190015;
91 
92  for ( size_t j = 0; j <= 5; j++ )
93  {
94  x += 1.0;
95  ser += cof[j]/x;
96  }
97  return -tmp + std::log(2.5066282746310005*ser);
98 }
double G4double
Definition: G4Types.hh:76
G4double G4VGaussianQuadrature::GetAbscissa ( G4int  index) const

Definition at line 55 of file G4VGaussianQuadrature.cc.

References fAbscissa.

56 {
57  return fAbscissa[index] ;
58 }
G4int G4VGaussianQuadrature::GetNumber ( ) const

Definition at line 66 of file G4VGaussianQuadrature.cc.

References fNumber.

67 {
68  return fNumber ;
69 }
G4double G4VGaussianQuadrature::GetWeight ( G4int  index) const

Definition at line 61 of file G4VGaussianQuadrature.cc.

References fWeight.

62 {
63  return fWeight[index] ;
64 }

Field Documentation

G4double* G4VGaussianQuadrature::fAbscissa
protected
function G4VGaussianQuadrature::fFunction
protected
G4int G4VGaussianQuadrature::fNumber
protected
G4double* G4VGaussianQuadrature::fWeight
protected

The documentation for this class was generated from the following files: