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

履歴 編集

function template
<random>

std::operator<<(C++11)

namespace std {
  template <class CharT, class Traits>
  std::basic_ostream<CharT, Traits>& operator<<(
    std::basic_ostream<CharT, Traits>& os
    const bernoulli_distribution& x);
}

概要

ストリームへの出力を行う。

効果

osに対して、分布オブジェクトxの現在状態を出力する。

事後条件

osのフォーマットフラグが、この関数を呼び出す前の状態に戻ること。

戻り値

os

#include <iostream>
#include <random>

int main()
{
  std::bernoulli_distribution dist(0.3);
  std::cout << dist << std::endl;
}

出力例

2.99999999999999989e-01

バージョン

言語

  • C++11

処理系

参照