Skip to content

Latest commit

 

History

History
64 lines (47 loc) · 871 Bytes

op_not_equal.md

File metadata and controls

64 lines (47 loc) · 871 Bytes

operator!=

  • random[meta header]
  • std[meta namespace]
  • function[meta id-type]
  • cpp11[meta cpp]
namespace std {
  bool operator!=(
    const bernoulli_distribution& a,
    const bernoulli_distribution& b);
}

概要

非等値比較を行う。

戻り値

!(a == b)

計算量

定数時間

#include <iostream>
#include <random>

int main()
{
  std::bernoulli_distribution a(0.5);
  std::bernoulli_distribution b(0.7);

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

出力

not equal

バージョン

言語

  • C++11

処理系

参照