C++ concepts: RandomNumberDistribution
From cppreference.com
                    
                                        
                    
                    
                                                            
                    A RandomNumberDistribution is a function object returning random numbers according to a probability density function p(x) or a discrete probability distribution P(x
i).
[edit] Requirements
| This section is incomplete | 
-  Dis a class meeting theRandomNumberDistributionrequirements. It shall also satisfy theCopyConstructibleandCopyAssignablerequirements.
-  Tis the associatedresult_type.
-  Pis the associatedparam_type. It shall satisfy theCopyConstructible,CopyAssignable, andEqualityComparablerequirements. It also has constructors that take the same arguments of the same types as the constructors ofDand has member functions identical to the parameter-returning getters ofD
-  dis an object ofDandx,yare potentially const objects ofD.
-  pis a possibly constant value ofP.
-  g,g1,g2are lvalues meeting theUniformRandomNumberGeneratorconcept.
-  osis an lvalue of std::basic_ostream.
-  isis an lvalue of std::basic_istream.
| 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 tooperator(). | 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 gandpparameter it returns a sequence of numbers distributed according to p(x;p) or P(xi; p) | Amortized constant number of invocations 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 | |
| x != 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 osas textual representation. The formatting flags and fill character ofosare unchanged. | |
| is >> d | Reference to the type of is | Restores the distribution parameters and internal state with data read from is. The formatting flags ofisare unchanged. The data must have been written using a stream with the same locale,CharTandTraitstemplate 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.dis unchanged in that case. | 
[edit] Notes
The parameters of a distribution object may be changed either permanently, by using d.param(p) or just for the duration of a single operator() call, by using d(g,p).