最終更新日時(UTC):
が更新

履歴 編集

function
<random>

std::bernoulli_distribution::max(C++11)

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;
}

出力

true

バージョン

言語

  • C++11

処理系

参照