Class template binomial_distribution Boost , The Boost C++ Libraries BoostBook Documentation Subset , Reference
Class template binomial_distribution
boost::random::binomial_distribution
Synopsis
template < typename IntType = int , typename RealType = double >
class binomial_distribution {
public :
typedef IntType result_type ;
typedef RealType input_type ;
class param_type {
public :
typedef binomial_distribution distribution_type ;
explicit param_type ( IntType = 1 , RealType = 0 . 5 ) ;
IntType t ( ) const ;
RealType p ( ) const ;
template < typename CharT, typename Traits>
friend std :: basic_ostream < CharT , Traits > &
operator << ( std :: basic_ostream < CharT , Traits > & , const param_type & ) ;
template < typename CharT, typename Traits>
friend std :: basic_istream < CharT , Traits > &
operator >> ( std :: basic_istream < CharT , Traits > & , param_type & ) ;
friend bool operator == ( const param_type & , const param_type & ) ;
friend bool operator != ( const param_type & , const param_type & ) ;
} ;
explicit binomial_distribution ( IntType = 1 , RealType = 0 . 5 ) ;
explicit binomial_distribution ( const param_type & ) ;
template < typename URNG> IntType operator ( ) ( URNG & ) const ;
template < typename URNG> IntType operator ( ) ( URNG & , const param_type & ) const ;
IntType t ( ) const ;
RealType p ( ) const ;
IntType min ( ) const ;
IntType max ( ) const ;
param_type param ( ) const ;
void param ( const param_type & ) ;
void reset ( ) ;
template < typename CharT, typename Traits>
friend std :: basic_ostream < CharT , Traits > &
operator << ( std :: basic_ostream < CharT , Traits > & ,
const binomial_distribution & ) ;
template < typename CharT, typename Traits>
friend std :: basic_istream < CharT , Traits > &
operator >> ( std :: basic_istream < CharT , Traits > & , binomial_distribution & ) ;
friend bool operator == ( const binomial_distribution & ,
const binomial_distribution & ) ;
friend bool operator != ( const binomial_distribution & ,
const binomial_distribution & ) ;
} ;
Description
Дистрибутив бинарных опционов представляет собой целое ценное распределение с двумя параметрами: t и p. Значения распределения находятся в пределах диапазона [0,t].
Функция распределения .
Алгоритм используется алгоритм BTRD, описанный в
«The generation of binomial random variates», Wolfgang Hormann, Journal of Statistical Computation and Simulation, Volume 46, Issue 1 & 2 April 1993, pages 101 - 110
binomial_distribution
public
construct/copy/destruct
эксплицит >биномы_распределения( IntType = 1 , RealType p = 0 >>>>5 >>>>>>32>Построить <333>3333>>
explicit binomial_ Distribution ( const param_type & param) ; Конструировать <2123>binomial_ Distribution объект из параметров.
binomial_distribution public member functions
template < typename URNG> IntType оператор ( ) ( URNG & urng> const ; Вариации вариат по распределенному.
<0m>template < typename URNG> IntType оператор( ) ( URNG urng, consvarit парам_тип
IntType t ( ) const ; Возвращает параметр t распространения.
RealType p ( ) const ; Возвращает параметр p распространения.
IntType min ( ) const ; Возвращает наименьшее значение, которое может произвести дистрибутив.
IntType max ( ) const ; Returns the largest value that the distribution can produce.
param_type param ( ) const ;
void param ( const param_type & param) ; Параметры распределения.
void перезагрузка ( ) ; Эффекты: последующее использование дистрибутива не зависит от значений, произведенных любым двигателем до ссылки на сброс.
binomial_distribution friend functions
Статья Class template binomial_distribution раздела The Boost C++ Libraries BoostBook Documentation Subset Reference может быть полезна для разработчиков на c++ и boost.
Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.
:: Главная :: Reference ::