Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
|
#include <G4INCLIFunction1D.hh>
Public Types | |
typedef G4double(*const | ManipulatorFunc) (const G4double) |
Typedef to simplify the syntax of inverseCDFTable. | |
Public Member Functions | |
IFunction1D () | |
IFunction1D (const G4double x0, const G4double x1) | |
virtual | ~IFunction1D () |
virtual G4double | getXMinimum () const |
Return the minimum allowed value of the independent variable. | |
virtual G4double | getXMaximum () const |
Return the maximum allowed value of the independent variable. | |
virtual G4double | operator() (const G4double x) const =0 |
Compute the value of the function. | |
virtual G4double | integrate (const G4double x0, const G4double x1, const G4double step=-1.) const |
Integrate the function between two values. | |
IFunction1D * | primitive () const |
Return a pointer to the (numerical) primitive to this function. | |
InterpolationTable * | inverseCDFTable (ManipulatorFunc fWrap=0, const G4int nNodes=60) const |
Return a pointer to the inverse of the CDF of this function. | |
Protected Attributes | |
G4double | xMin |
Minimum value of the independent variable. | |
G4double | xMax |
Maximum value of the independent variable. | |
1D function interface
Definition at line 58 of file G4INCLIFunction1D.hh.
Typedef to simplify the syntax of inverseCDFTable.
Definition at line 93 of file G4INCLIFunction1D.hh.
|
inline |
Definition at line 60 of file G4INCLIFunction1D.hh.
Definition at line 64 of file G4INCLIFunction1D.hh.
|
inlinevirtual |
Definition at line 69 of file G4INCLIFunction1D.hh.
|
inlinevirtual |
Return the maximum allowed value of the independent variable.
Definition at line 75 of file G4INCLIFunction1D.hh.
Referenced by inverseCDFTable(), G4INCL::InvFInterpolationTable::InvFInterpolationTable(), and primitive().
|
inlinevirtual |
Return the minimum allowed value of the independent variable.
Definition at line 72 of file G4INCLIFunction1D.hh.
Referenced by inverseCDFTable(), G4INCL::InvFInterpolationTable::InvFInterpolationTable(), and primitive().
|
virtual |
Integrate the function between two values.
x0 | lower integration bound |
x1 | upper integration bound |
step | largest integration step size; if <0, 45 steps will be used |
Definition at line 66 of file G4INCLIFunction1D.cc.
Referenced by primitive().
InterpolationTable * G4INCL::IFunction1D::inverseCDFTable | ( | IFunction1D::ManipulatorFunc | fWrap = 0 , |
const G4int | nNodes = 60 |
||
) | const |
Return a pointer to the inverse of the CDF of this function.
The function parameter fWrap is wrapped around the return value of operator(). If fWrap=NULL (default), fWrap=identity.
Definition at line 123 of file G4INCLIFunction1D.cc.
Referenced by G4INCL::NuclearDensityFactory::createPCDFTable(), G4INCL::NuclearDensityFactory::createRCDFTable(), and G4INCL::NuclearDensityFactory::createRPCorrelationTable().
Compute the value of the function.
Implemented in G4INCL::NuclearDensityFunctions::ParisP, G4INCL::NuclearDensityFunctions::GaussianRP, G4INCL::NuclearDensityFunctions::Gaussian, G4INCL::NuclearDensityFunctions::ModifiedHarmonicOscillatorRP, G4INCL::NuclearDensityFunctions::ModifiedHarmonicOscillator, G4INCL::NuclearDensityFunctions::ParisR, G4INCL::NuclearDensityFunctions::WoodsSaxonRP, G4INCL::NuclearDensityFunctions::WoodsSaxon, G4INCL::NuclearDensityFunctions::HardSphere, and G4INCL::InterpolationTable.
Referenced by integrate().
IFunction1D * G4INCL::IFunction1D::primitive | ( | ) | const |
Return a pointer to the (numerical) primitive to this function.
Definition at line 105 of file G4INCLIFunction1D.cc.
|
protected |
Maximum value of the independent variable.
Definition at line 106 of file G4INCLIFunction1D.hh.
Referenced by getXMaximum(), and integrate().
|
protected |
Minimum value of the independent variable.
Definition at line 104 of file G4INCLIFunction1D.hh.
Referenced by getXMinimum(), and integrate().