- 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.param() == b.param()であり、かつa(g)によって生成される値の無限シーケンスS1、b(g)によって生成される値の無限シーケンスS2が等しい場合trueを返し、そうでなければfalseを返す。
定数時間
#include <iostream>
#include <random>
int main()
{
std::bernoulli_distribution a(0.5);
std::bernoulli_distribution b(0.5);
if (a == b) {
std::cout << "equal" << std::endl;
}
else {
std::cout << "not equal" << std::endl;
}
}equal
- C++11
- Clang: ??
- GCC: 4.7.2
- ICC: ??
- Visual C++: ??