<div class="t-tr-text">C + +: concetti<div class="t-tr-dropdown"><div><div><div class="t-tr-dropdown-arrow-border"></div><div class="t-tr-dropdown-arrow"></div><div class="t-tr-dropdown-h">Original:</div><div class="t-tr-dropdown-orig">C++ concepts:</div><div class="t-tr-dropdown-notes">The text has been machine-translated via [http://translate.google.com Google Translate].<br/> You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.</div></div></div></div></div> RandomNumberDistribution
|
|
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
<metanoindex/>
RandomNumberDistribution è un oggetto funzione che restituisce numeri casuali secondo una funzione di densità di probabilità p(x) o un distribuzione di probabilità discreta P(xi).
RandomNumberDistribution is a function object returning random numbers according to a funzione di densità di probabilità p(x) or a distribuzione di probabilità discreta P(xi).
You can help to correct and verify the translation. Click here for instructions.
Requisiti
| This section is incomplete |
Dè una classe conforme ai requisitiRandomNumberDistribution. Essa deve inoltre soddisfare i requisiti eCopyConstructibleCopyAssignable.Original:Dis a class meeting theRandomNumberDistributionrequirements. It shall also satisfy theCopyConstructibleandCopyAssignablerequirements.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.Tè ilresult_typeassociato.Original:Tis 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è ilparam_typeassociato. Esso deve soddisfare iCopyConstructible,CopyAssignableei requisitiEqualityComparable.Original:Pis the associatedparam_type. It shall satisfy theCopyConstructible,CopyAssignable, andEqualityComparablerequirements.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.dè un oggetto diDex,ysono oggetti potenzialmente const diD.Original:dis an object ofDandx,yare 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è un valore possibilmente costante diP.Original:pis 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,g2lvalue sono riuniti il concettoUniformRandomNumberGenerator.Original:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.osè un lvalue di std::basic_ostream.Original:osis 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è un lvalue di std::basic_istream.Original:isis 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. |