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

履歴 編集

function template
<random>

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

namespace std {
  template <class IntType>
  bool operator!=(
    const geometric_distribution<IntType>& a,
    const geometric_distribution<IntType>& b);
}

概要

非等値比較を行う。

戻り値

!(a == b)

計算量

定数時間

#include <iostream>
#include <random>

int main()
{
  std::geometric_distribution<> a(0.5);
  std::geometric_distribution<> b(0.7);

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

出力

not equal

バージョン

言語

  • C++11

処理系

参照