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 - cppreference.com" /> <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 - cppreference.com
Namespace
Varianti

<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

Da cppreference.com.
< cpp‎ | concept

 
 
C + + concetti
Di base
Original:
Basic
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Biblioteca-Wide
Original:
Library-Wide
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Container
Original:
Container
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Elementi contenitori
Original:
Container Elements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Iterator
Original:
Iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Numeri casuali
Original:
Random Numbers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
RandomNumberDistribution(C++11)
UniformRandomNumberGenerator(C++11)
RandomNumberEngineAdaptor(C++11)
Concorrenza
Original:
Concurrency
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
BasicLockable(C++11)
Lockable(C++11)
TimedLockable(C++11)
Mutex(C++11)
TimedMutex(C++11)
Altro
Original:
Other
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Un RandomNumberDistribution è un oggetto funzione che restituisce numeri casuali secondo una funzione di densità di probabilità p(x) o un distribuzione di probabilità discreta P(x
i
)
.
Original:
A 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(x
i
)
.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Requisiti

  • D è una classe conforme ai requisiti RandomNumberDistribution. Essa deve inoltre soddisfare i requisiti e CopyConstructible CopyAssignable.
    Original:
    D is a class meeting the RandomNumberDistribution requirements. It shall also satisfy the CopyConstructible and CopyAssignable requirements.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • T è il result_type associato.
    Original:
    T is the associated result_type.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • P è il param_type associato. Esso deve soddisfare i CopyConstructible, CopyAssignable ei requisiti EqualityComparable.
    Original:
    P is the associated param_type. It shall satisfy the CopyConstructible, CopyAssignable, and EqualityComparable requirements.
    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 di D e x, y sono oggetti potenzialmente const di D.
    Original:
    d is an object of D and x,y are potentially const objects of D.
    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 di P.
    Original:
    p is a possibly constant value of P.
    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 lvalue sono riuniti il ​​concetto UniformRandomNumberGenerator.
    Original:
    g,g1,g2 are lvalues meeting the UniformRandomNumberGenerator concept.
    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:
    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 è un lvalue di 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(x
i
;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.