DistributionInverter Class Reference

Very crude 1-d distribution inverter. More...

#include <DistributionInverter.h>

List of all members.

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


Detailed Description

Very crude 1-d distribution inverter.

Definition at line 32 of file DistributionInverter.h.


Constructor & Destructor Documentation

DistributionInverter::DistributionInverter (  )  [inline]

Creates a new uninitialized instance of this class.

Definition at line 38 of file DistributionInverter.h.


Member Function Documentation

void DistributionInverter::operator= ( const DistributionInverter rhs  ) 

Copy the rhs oject into this current object.

Parameters:
rhs object to set this equal to.

Definition at line 15 of file DistributionInverter.cpp.

References F_inverse.

void DistributionInverter::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.

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.

Parameters:
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);

Parameters:
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().


Member Data Documentation

Definition at line 65 of file DistributionInverter.h.

Referenced by make_F_and_F_inverse(), operator=(), and random().


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

Generated on Sat Jul 5 16:14:01 2008 for QMcBeaver by  doxygen 1.5.6