Skip to content

Latest commit

 

History

History
66 lines (49 loc) · 1.13 KB

File metadata and controls

66 lines (49 loc) · 1.13 KB

operator==

  • random[meta header]
  • std[meta namespace]
  • function template[meta id-type]
  • cpp11[meta cpp]
namespace std {
  template <class UIntType, UIntType a, UIntType c, UIntType m>
  bool operator==(
    const linear_congruential_engine<UIntType, a, c, m>& x,
    const linear_congruential_engine<UIntType, a, c, m>& y);
}

概要

等値比較を行う。

戻り値

xyの状態シーケンスの、全ての値を等値比較し、等しければtrue、そうでなければfalseを返す。

計算量

O(状態シーケンスのサイズ)

#include <iostream>
#include <random>

int main()
{
  std::minstd_rand e1;
  std::minstd_rand e2;

  if (e1 == e2) {
    std::cout << "equal" << std::endl;
  }
  else {
    std::cout << "not equal" << std::endl;
  }
}
  • std::minstd_rand[link /reference/random/minstd_rand.md]

出力

equal

バージョン

言語

  • C++11

処理系

参照