#include <DistributionInverter.h>
Public Member Functions | |
| DistributionInverter () | |
| Creates a new uninitialized instance of this class. | |
| void | operator= (const DistributionInverter &rhs) |
| Copy the rhs oject into this current object. | |
| void | initialize (Array1D< double > &x_input, Array1D< double > &y_input) |
| Initialize the object with function values for the distribution random numbers are to be generated with respect to. | |
| double | random () |
| Generate a random number which is distributed with respect to the distribution this object was initialized with. | |
Private Member Functions | |
| void | make_F_and_F_inverse (Array1D< double > &x_input, Array1D< double > &y_input) |
| f is incoming distribution. | |
Private Attributes | |
| LinearSpline | F_inverse |
Definition at line 32 of file DistributionInverter.h.
| DistributionInverter::DistributionInverter | ( | ) | [inline] |
Creates a new uninitialized instance of this class.
Definition at line 38 of file DistributionInverter.h.
| void DistributionInverter::operator= | ( | const DistributionInverter & | rhs | ) |
Copy the rhs oject into this current object.
| rhs | object to set this equal to. |
Definition at line 15 of file DistributionInverter.cpp.
References F_inverse.
Initialize the object with function values for the distribution random numbers are to be generated with respect to.
Definition at line 21 of file DistributionInverter.cpp.
References make_F_and_F_inverse(), and Array1D< T >::size().
Referenced by AtomicOrbitalInverter::initialize().
| double DistributionInverter::random | ( | ) |
Generate a random number which is distributed with respect to the distribution this object was initialized with.
| iseed | seed for generating the random number. |
Definition at line 103 of file DistributionInverter.cpp.
References LinearSpline::evaluate(), F_inverse, LinearSpline::getFunctionValue(), ran, and Random::unidev().
Referenced by AtomicOrbitalInverter::get_xyz().
| void DistributionInverter::make_F_and_F_inverse | ( | Array1D< double > & | x_input, | |
| Array1D< double > & | y_input | |||
| ) | [private] |
f is incoming distribution.
F=integral(f); F_inverse=inverse(F);
| x_input | is the incoming domain values | |
| y_input | is the incoming function(x_input) values |
Definition at line 44 of file DistributionInverter.cpp.
References Array1D< T >::allocate(), Array1D< T >::dim1(), F_inverse, LinearSpline::initializeWithFunctionValues(), and TINY.
Referenced by initialize().
LinearSpline DistributionInverter::F_inverse [private] |
Definition at line 65 of file DistributionInverter.h.
Referenced by make_F_and_F_inverse(), operator=(), and random().
1.5.6