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

履歴 編集

function template
<random>

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

namespace std {
  template <class RealType>
  bool operator==(
    const lognormal_distribution<RealType>& a,
    const lognormal_distribution<RealType>& b);
}

概要

等値比較を行う。

戻り値

a.param() == b.param()であり、かつa(g)によって生成される値の無限シーケンスS1b(g)によって生成される値の無限シーケンスS2が等しい場合trueを返し、そうでなければfalseを返す。

計算量

定数時間

#include <iostream>
#include <random>

int main()
{
  std::lognormal_distribution<> a(0.0, 1.0);
  std::lognormal_distribution<> b(0.0, 1.0);

  if (a == b) {
    std::cout << "equal" << std::endl;
  }
  else {
    std::cout << "not equal" << std::endl;
  }
}

出力

equal

バージョン

言語

  • C++11

処理系

参照