C++ コンセプト: RandomNumberDistribution
提供: cppreference.com
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
RandomNumberDistribution
に記載の乱数を返す関数オブジェクトです確率密度関数p(x)またはa離散確率分布P(xi).
Original:
A
i).
RandomNumberDistribution
is a function object returning random numbers according to a 確率密度関数 p(x) or a 離散確率分布 P(xi).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集] 要件
This section is incomplete |
-
D
RandomNumberDistribution
要件を満たすクラスである。またCopyConstructible
とCopyAssignable
要件を満足しなければならない.Original:D
is a class meeting theRandomNumberDistribution
requirements. It shall also satisfy theCopyConstructible
andCopyAssignable
requirements.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. -
T
関連するresult_type
です.Original:T
is the associatedresult_type
.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. -
P
関連するparam_type
です。それはCopyConstructible
、CopyAssignable
、とEqualityComparable
要件を満足しなければならない.Original:P
is the associatedparam_type
. It shall satisfy theCopyConstructible
,CopyAssignable
, andEqualityComparable
requirements.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. -
d
D
のオブジェクトであり、x
、y
D
の潜在的にconstオブジェクトです.Original:d
is an object ofD
andx
,y
are potentially const objects ofD
.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. -
p
P
の可能性が一定値である.Original:p
is a possibly constant value ofP
.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. -
g
、g1
、g2
左辺値はUniformRandomNumberGenerator
コンセプトを満たしている.Original:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. -
os
std::basic_ostreamの左辺値です.Original:os
is an lvalue of std::basic_ostream.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. -
is
std::basic_istreamの左辺値です.Original:is
is an lvalue of std::basic_istream.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Expression | Type | Notes | Complexity |
---|---|---|---|
D::result_type |
T |
An arithmetic type | compile-time |
D::param_type |
P |
compile-time | |
D() |
constant | ||
D(p) |
Same as p 's construction
| ||
d.reset() |
void |
Resets the internal state of the distribution object. After a call to this function, the next call to operator() on the distribution object will not be dependent on previous calls to operator() . |
constant |
x.param() |
P |
No worse than D(p)
| |
d.param(p) |
void |
No worse than D(p)
| |
d(g) |
T |
d(g, d.param()) |
Same as d(g, d.param())
|
d(g,p) |
T |
When called with the same g and p parameter it returns a sequence of numbers distributed according to p(x;p ) or P(xi; p ) |
Amortized constant number of incovations of g
|
x.min() |
T |
The greatest lower bound returned by operator() |
constant |
x.max() |
T |
The least upper bound returned by operator() |
constant |
x == y |
bool |
constant | |
y != y |
bool |
!(x == y) |
constant |
os << x |
Reference to the type of os |
Writes a textual representation of the distribution parameters and internal state to os as textual representation. The formatting flags and fill character of os are unchanged. |
|
is >> d |
Reference to the type of is |
Restores the distribution parameters and internal state with data read from is . The formatting flags of is are unchanged. The data must have been written using a stream with the same locale, CharT and Traits template parameters, otherwise the behavior is undefined. If bad input is encountered, is.setstate(std::ios::failbit) is called, which may throw std::ios_base::failure. d is unchanged in that case. |