|
| | pair (T first_left, T first_right, T second_left, T second_right) |
| | Creates pair generator defined by range of values for first and second.
|
| | pair (T both_left, T both_right) |
| | Creates pair generator defined by range of values for both first and second.
|
| pair & | eq () |
| | Restricts generator s.t. first is equal to second.
|
| pair & | neq () |
| | Restricts generator s.t. first is not equal to second.
|
| pair & | lt () |
| | Restricts generator s.t. first is less than second.
|
| pair & | gt () |
| | Restricts generator s.t. first is greater than second.
|
| pair & | leq () |
| | Restricts generator s.t. first is less than or equal to second.
|
| pair & | geq () |
| | Restricts generator s.t. first is greater than or equal to second.
|
| value | gen () const |
| | Generates a random value from the set of valid pairs.
|
| auto | gen_list (int size, Args &&...args) const |
| | Generates a list of several generation calls.
|
| auto | gen_until (Pred predicate, int max_tries, Args &&...args) const |
| | Generates a random value from the valid set until a condition is met.
|
| auto | distinct (Args &&...args) const |
| | Creates distinct generator for current generator.
|
template<typename T>
struct tgen::pair< T >
Pair generator.
Defines a set of pairs, subject to restrictions.
A uniformly random tgen::pair::value from this set of pairs (that satisfies the restrictions) can be generated with tgen::pair::gen.
Definition at line 3471 of file tgen.h.
template<typename T>
| tgen::pair< T >::pair |
( |
T | both_left, |
|
|
T | both_right ) |
|
inline |
Creates pair generator defined by range of values for both first and second.
- Template Parameters
-
| T | Integral type to be stored in the pair. |
- Parameters
-
| both_left | Left endpoint of value range for first and second. |
| both_right | Right endpoint of value range for first and second; |
Defines a generator of pairs with first in [both_left, both_right] and second in [both_left, both_right].
Equivalent to tgen::pair::pair(both_left, both_right, both_left, borh_right).
Examples
Definition at line 3488 of file tgen.h.