Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

Class param_type

Boost , The Boost C++ Libraries BoostBook Documentation Subset , Class template discrete_distribution

Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Class param_type

boost::random::discrete_distribution::param_type

Synopsis

// In header: <boost/random/discrete_distribution.hpp>

class param_type {
public:
  // types
  typedef discrete_distribution distribution_type;
  // construct/copy/destruct
  param_type();
  template<typename Iter> param_type(Iter, Iter);
  param_type(const std::initializer_list< WeightType > &);
  template<typename Range> explicit param_type(const Range &);
  template<typename Func> param_type(std::size_t, double, double, Func);
  // public member functions
  std::vector< WeightType > probabilities() const;
  // friend functions
  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 &);
};

Description

param_type public construct/copy/destruct

  1. <
    param_type();
    >

    Построение объекта<param_type>, представляющего собой распределение си.

  2. <
    template<typenameIter>param_type(Iterfirst,Iterlast);
    >

    Если<first>==<last>, что эквивалентно конструктору по умолчанию. В противном случае значения диапазона представляют собой веса для возможных значений распределения.

  3. <
    param_type(conststd::initializer_list<WeightType>&wl);
    >

    Если wl.size() == 0, эквивалентен конструктору по умолчанию. В противном случае значения<initializer_list>представляют собой веса для возможных значений распределения.

  4. <
    template<typenameRange>explicitparam_type(constRange&range);
    >

    Если диапазон пуст, эквивалентен конструктору по умолчанию. В противном случае элементы диапазона представляют собой веса для возможных значений распределения.

  5. <
    template<typenameFunc>
     param_type(std::size_tnw,doublexmin,doublexmax,Funcfw);
    >

    Если nw равно нулю, то это эквивалентно конструктору по умолчанию. В противном случае диапазон распределения равен [0, nw], и веса можно найти, называя fw значениями, равномерно распределенными междуи, где

    .

param_type public member functions

  1. <
    std::vector<WeightType>probabilities()const;
    >

    Возвращает вектор, содержащий вероятности каждого возможного значения распределения.

param_type friend functions

  1. <
    template<typenameCharT,typenameTraits>
     friendstd::basic_ostream<CharT,Traits>&
     operator<<(std::basic_ostream<CharT,Traits>&os,
                constparam_type&param);
    >

    Записывает параметры в<std::ostream>.

  2. <
    template<typenameCharT,typenameTraits>
     friendstd::basic_istream<CharT,Traits>&
     operator>>(std::basic_istream<CharT,Traits>&is,
                constparam_type&param);
    >

    Считывает параметры из<std::istream>

    .
  3. <
    friendbooloperator==(constparam_type&lhs,constparam_type&rhs);
    >

    Возвращается истинно, если два набора параметров одинаковы.

  4. <
    friendbooloperator!=(constparam_type&lhs,constparam_type&rhs);
    >

    Возвращается истинно, если два набора параметров различны.


PrevUpHomeNext

Статья Class param_type раздела The Boost C++ Libraries BoostBook Documentation Subset Class template discrete_distribution может быть полезна для разработчиков на c++ и boost.




Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



:: Главная :: Class template discrete_distribution ::


реклама


©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
Top.Mail.Ru

Время компиляции файла: 2024-08-30 11:47:00
2025-05-19 20:05:48/0.0087170600891113/1