hep-mc  0.8
Public Member Functions | List of all members
hep::vegas_chkpt< T > Class Template Reference

Detailed Description

template<typename T>
class hep::vegas_chkpt< T >

Checkpoints created by the VEGAS Integrator.

Examples:
vegas_stop_after_precision.cpp.
Inheritance diagram for hep::vegas_chkpt< T >:
hep::chkpt< vegas_result< T > >

Public Member Functions

 vegas_chkpt (std::size_t bins, T alpha)
 
 vegas_chkpt (vegas_pdf< T > const &pdf, T alpha)
 
 vegas_chkpt (std::istream &in)
 
alpha () const
 
void dimensions (std::size_t dimensions)
 
vegas_pdf< T > pdf () const
 
void serialize (std::ostream &out) const override
 
- Public Member Functions inherited from hep::chkpt< vegas_result< T > >
 chkpt ()=default
 
 chkpt (std::istream &in)
 
 chkpt (chkpt< vegas_result< T > > const &)=default
 
 chkpt (chkpt< vegas_result< T > > &&) noexcept=default
 
chkptoperator= (chkpt< vegas_result< T > > const &)=default
 
chkptoperator= (chkpt< vegas_result< T > > &&) noexcept=default
 
std::vector< vegas_result< T > > const & results () const
 
virtual ~chkpt ()=default
 

Additional Inherited Members

- Public Types inherited from hep::chkpt< vegas_result< T > >
using result_type = vegas_result< T >
 
- Protected Attributes inherited from hep::chkpt< vegas_result< T > >
std::vector< vegas_result< T > > results_
 

Constructor & Destructor Documentation

◆ vegas_chkpt() [1/3]

template<typename T >
hep::vegas_chkpt< T >::vegas_chkpt ( std::size_t  bins,
alpha 
)
inline

Constructor. Creates an empty checkpoint with a uniform vegas_pdf with the specified number of bins. The argument alpha will be used to adapt the grids after each iteration.

◆ vegas_chkpt() [2/3]

template<typename T >
hep::vegas_chkpt< T >::vegas_chkpt ( vegas_pdf< T > const &  pdf,
alpha 
)
inline

Constructor. Creates an empty checkpoint with the user-defined vegas_pdf which can be used to integrate using a PDF different from a uniform one.

◆ vegas_chkpt() [3/3]

template<typename T >
hep::vegas_chkpt< T >::vegas_chkpt ( std::istream &  in)
inlineexplicit

Deserialization constructor. This creates a checkpoint by reading from the stream in.

Member Function Documentation

◆ alpha()

template<typename T >
T hep::vegas_chkpt< T >::alpha ( ) const
inline

Returns the parameter alpha, which is used to refine the PDF of VEGAS after each iteration.

◆ dimensions()

template<typename T >
void hep::vegas_chkpt< T >::dimensions ( std::size_t  dimensions)
inline

Sets the number of dimensions which is a parameter needed for the VEGAS integration.

◆ pdf()

template<typename T >
vegas_pdf<T> hep::vegas_chkpt< T >::pdf ( ) const
inline

Returns the PDF which is used for the next iteration.

◆ serialize()

template<typename T >
void hep::vegas_chkpt< T >::serialize ( std::ostream &  out) const
inlineoverridevirtual

Serializes this object. This writes a textual representation of this class to the stream out.

Reimplemented from hep::chkpt< vegas_result< T > >.