Skip to content

Latest commit

 

History

History
53 lines (38 loc) · 750 Bytes

File metadata and controls

53 lines (38 loc) · 750 Bytes

max

  • random[meta header]
  • std[meta namespace]
  • bernoulli_distribution[meta class]
  • function[meta id-type]
  • cpp11[meta cpp]
result_type max() const;

概要

生成し得る値の上限を取得する。

戻り値

trueを返す。

#include <iostream>
#include <random>

int main()
{
  std::bernoulli_distribution dist(0.5);

  bool max_value = dist.max();
  std::cout << std::boolalpha << max_value << std::endl;
}
  • max()[color ff0000]

出力

true

バージョン

言語

  • C++11

処理系

参照