[tab:rand.req.eng] (original) (raw)

Table 125 β€” Random number engine requirements [tab:rand.req.eng]

πŸ”—Expression Return type Pre/post-condition Complexity
πŸ”—E() Creates an engine with the same initial state as all other default-constructed engines of type E.
πŸ”—E(x) Creates an engine that compares equal to x.
πŸ”—E(s) Creates an engine with initial state determined by s.
πŸ”—E(q)241 Creates an engine with an initial state that depends on a sequence produced by one call to q.generate. same as complexity of q.generate called on a sequence whose length is size of state
πŸ”—e.seed() void Postconditions: e == E(). same as E()
πŸ”—e.seed(s) void Postconditions: e == E(s). same as E(s)
πŸ”—e.seed(q) void Postconditions: e == E(q). same as E(q)
πŸ”—e() T Advances e's state e toe e) and returnsGA(e). per [rand.req.urng]
πŸ”—e.discard(z)242 void Advances e's state e to by any means equivalent to z consecutive calls e(). no worse than the complexity of z consecutive calls e()
πŸ”—x == y bool This operator is an equivalence relation. With and as the infinite sequences of values that would be generated by repeated future calls to x() and y(), respectively, returns true if ; else returns false.
πŸ”—x != y bool !(x == y).