vg
tools for working with variation graphs
Public Types | Public Member Functions | Protected Attributes | List of all members
vg::discrete_distribution< T > Class Template Reference

We provide a partial discrete_distribution implementation that is just the parts we need. More...

#include <statistics.hpp>

Public Types

typedef T result_type
 
typedef double param_type
 

Public Member Functions

template<class InputIt >
 discrete_distribution (InputIt first, InputIt last)
 
 discrete_distribution (initializer_list< double > weights={1})
 
void reset ()
 
template<class Generator >
operator() (Generator &_g)
 

Protected Attributes

vector< double > m_weights
 
vector< double > m_sums
 

Detailed Description

template<typename T = int>
class vg::discrete_distribution< T >

We provide a partial discrete_distribution implementation that is just the parts we need.

Member Typedef Documentation

◆ param_type

template<typename T = int>
typedef double vg::discrete_distribution< T >::param_type

◆ result_type

template<typename T = int>
typedef T vg::discrete_distribution< T >::result_type

Constructor & Destructor Documentation

◆ discrete_distribution() [1/2]

template<typename T = int>
template<class InputIt >
vg::discrete_distribution< T >::discrete_distribution ( InputIt  first,
InputIt  last 
)
inline

◆ discrete_distribution() [2/2]

template<typename T = int>
vg::discrete_distribution< T >::discrete_distribution ( initializer_list< double >  weights = {1})
inline

Member Function Documentation

◆ operator()()

template<typename T = int>
template<class Generator >
T vg::discrete_distribution< T >::operator() ( Generator &  _g)
inline

◆ reset()

template<typename T = int>
void vg::discrete_distribution< T >::reset ( )
inline

Member Data Documentation

◆ m_sums

template<typename T = int>
vector<double> vg::discrete_distribution< T >::m_sums
protected

◆ m_weights

template<typename T = int>
vector<double> vg::discrete_distribution< T >::m_weights
protected

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