IMP  2.3.0
The Integrative Modeling Platform
IMP::base::piecewise_linear_distribution< T > Class Template Reference

#include <IMP/base/piecewise_linear_distribution.h>

Detailed Description

template<class T = double>
class IMP::base::piecewise_linear_distribution< T >

Draw random numbers from a distribution defined as a piecewise linear function. It models the boost random number generators and is made redundant by the boost::piecewise_linear_distribution in boost 1.47. Currently, it won't use that class if available, but that is just due to lack of boost 1.47 to test on.

Definition at line 35 of file piecewise_linear_distribution.h.

Public Member Functions

 piecewise_linear_distribution ()
 construct a uniform 01 More...
 
template<class LIt , class WIt >
 piecewise_linear_distribution (LIt locations_begin, LIt locations_end, WIt weights_begin)
 
template<class RNG >
double operator() (RNG &rng) const
 

Constructor & Destructor Documentation

construct a uniform 01

Definition at line 50 of file piecewise_linear_distribution.h.

template<class T = double>
template<class LIt , class WIt >
IMP::base::piecewise_linear_distribution< T >::piecewise_linear_distribution ( LIt  locations_begin,
LIt  locations_end,
WIt  weights_begin 
)

Construct the distribution by interpolating between samples at locations[i] with corresponding weight weights[i]. The weight outside of the first and last location is assume to be immediately 0.

Definition at line 64 of file piecewise_linear_distribution.h.


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