Class template normal_distribution Boost , The Boost C++ Libraries BoostBook Documentation Subset , Reference    
  
Class template normal_distribution boost::random::normal_distribution
 
Synopsis 
template < typename  RealType =  double >  
class  normal_distribution  { 
public : 
  
  typedef  RealType  input_type ;  
  typedef  RealType  result_type ; 
  
  class  param_type  { 
  public : 
    
    typedef  normal_distribution  distribution_type ; 
    
    explicit  param_type ( RealType  =  0 . 0 ,  RealType  =  1 . 0 ) ; 
    
    RealType  mean ( )  const ; 
    RealType  sigma ( )  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  >  & ,  const  param_type  & ) ; 
    friend  bool  operator == ( const  param_type  & ,  const  param_type  & ) ; 
    friend  bool  operator != ( const  param_type  & ,  const  param_type  & ) ; 
  } ; 
  
  explicit  normal_distribution ( const  RealType  &  =  0 . 0 ,  const  RealType  &  =  1 . 0 ) ; 
  explicit  normal_distribution ( const  param_type  & ) ; 
  
  RealType  mean ( )  const ; 
  RealType  sigma ( )  const ; 
  RealType  min ( )  const ; 
  RealType  max ( )  const ; 
  param_type  param ( )  const ; 
  void  param ( const  param_type  & ) ; 
  void  reset ( ) ; 
  template < typename  Engine>  result_type  operator ( ) ( Engine  & ) ; 
  template < typename  URNG>  result_type  operator ( ) ( URNG  & ,  const  param_type  & ) ; 
  
  template < typename  CharT,  typename  Traits>  
    friend  std :: basic_ostream <  CharT ,  Traits  >  &  
    operator << ( std :: basic_ostream <  CharT ,  Traits  >  & ,  
               const  normal_distribution  & ) ; 
  template < typename  CharT,  typename  Traits>  
    friend  std :: basic_istream <  CharT ,  Traits  >  &  
    operator >> ( std :: basic_istream <  CharT ,  Traits  >  & ,  
               const  normal_distribution  & ) ; 
  friend  bool  operator == ( const  normal_distribution  & ,  
                         const  normal_distribution  & ) ; 
  friend  bool  operator != ( const  normal_distribution  & ,  
                         const  normal_distribution  & ) ; 
} ; 
Description 
Обоснование шаблона классанормальное распределение модельслучайное распределение . Такое распределение производит случайные числа<x>, распределенные с функцией плотности вероятности
normal_distribution 
        public
       construct/copy/destruct 
<explicit normal_distribution ( const RealType & mean= 0 . 0 , 
                            const RealType & sigma= 1 . 0 ) ; Конструирует<normal_distribution mean>и<sigma>являются параметрами распределения.
Требуется: sigma >= 0
 
<explicit normal_distribution ( const param_type & param) ; Построение объекта<normal_distribution 
 
  
normal_distribution public member functions 
<RealType mean ( ) const ; Возвращает среднее значение распределения.
 
<RealType sigma ( ) const ; Возвращает стандартное отклонение распределения.
 
<RealType min ( ) const ; Возвращает наименьшее значение, которое может произвести распределение.
 
<RealType max ( ) const ; Возвращает наибольшую ценность, которую может произвести распределение.
 
<param_type param ( ) const ; Возвращает параметры распределения.
 
<void param ( const param_type & param) ; Устанавливает параметры распределения.
 
<void reset ( ) ; Эффекты: Последующее использование распределения не зависит от значений, произведенных каким-либо двигателем до вызова сброса.
 
<template < typename Engine> result_type operator ( ) ( Engine & eng) ; Возвращает нормальную переменную.
 
<template < typename URNG> 
 result_type operator ( ) ( URNG & urng, const param_type & param) ; Возвращает нормальную вариацию с параметрами, указанными<param>
. 
  
normal_distribution friend functions 
<template < typename CharT, typename Traits> 
 friend std :: basic_ostream < CharT , Traits > & 
 operator << ( std :: basic_ostream < CharT , Traits > & os, 
            const normal_distribution & nd) ; Пишет<normal_distribution std::ostream>
. 
<template < typename CharT, typename Traits> 
 friend std :: basic_istream < CharT , Traits > & 
 operator >> ( std :: basic_istream < CharT , Traits > & is, 
            const normal_distribution & nd) ; Читает<normal_distribution std::istream>.
 
<friend bool operator == ( const normal_distribution & lhs, 
                      const normal_distribution & rhs) ; Возвращается истинно, если два экземпляра<normal_distribution 
 
<friend bool operator != ( const normal_distribution & lhs, 
                      const normal_distribution & rhs) ; Возвращается истинно, если два экземпляра<normal_distribution 
 
  
 
 
Статья Class template normal_distribution  раздела The Boost C++ Libraries BoostBook Documentation Subset Reference  может быть полезна для разработчиков на c++ и boost.
Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.
:: Главная  :: Reference  ::