hep-mc
0.8
|
The estimation of a Monte Carlo integration. Every Monte Carlo integrator returns one or more instances of this class. The PLAIN Monte Carlo integrator, for example, calculates the parameters as follows:
\begin{align} E &= \frac{1}{N} \sum_{i=1}^N f ( \vec{x}_i ) \\ S^2 &= \frac{1}{N-1} \left[ \frac{1}{N} \sum_{i=1}^N f^2 ( \vec{x}_i ) - E^2 \right] \end{align}
Public Types | |
using | numeric_type = T |
Public Member Functions | |
mc_result (std::size_t calls, std::size_t non_zero_calls, std::size_t finite_calls, T sum, T sum_of_squares) | |
mc_result (std::istream &in) | |
mc_result (mc_result< T > const &)=default | |
mc_result (mc_result< T > &&) noexcept=default | |
mc_result & | operator= (mc_result< T > const &)=default |
mc_result & | operator= (mc_result< T > &&) noexcept=default |
virtual | ~mc_result ()=default |
std::size_t | calls () const |
T | value () const |
T | variance () const |
T | error () const |
std::size_t | finite_calls () const |
std::size_t | non_zero_calls () const |
T | sum () const |
T | sum_of_squares () const |
virtual void | serialize (std::ostream &out) const |
using hep::mc_result< T >::numeric_type = T |
The numeric type used for member variables.
|
inline |
Constructor.
|
inlineexplicit |
Deserialization constructor.
|
default |
Copy constructor.
|
defaultnoexcept |
Move constructor.
|
virtualdefault |
Destructor.
|
inline |
The number of function evaluations \( N \) performed to obtain this result.
|
inline |
Standard deviation \( S \) of the expectation value.
|
inline |
Returns the number integrand evaluations that were finite.
|
inline |
Returns the number of integrand evaluations that were not zero. This includes the both finite and non-finite numbers.
|
default |
Assignment operator.
|
defaultnoexcept |
Move assignment operator.
|
inlinevirtual |
Serializes this object.
Reimplemented in hep::multi_channel_result< T >, hep::vegas_result< T >, and hep::plain_result< T >.
|
inline |
Returns the sum, i.e. \( \sum_{i=1}^N f ( \vec{x}_i ) \).
|
inline |
Returns the sum of squares, i.e. \( \sum_{i=1}^N f^2 ( \vec{x}_i ) \).
|
inline |
Expectation value \( E \) of this result.
|
inline |
Variance \( S^2 \) of the expectation value.