merge Weighted
Merges first with the given second and optionally others resulting in a ArbArgsGenerator which picks the next generator to contribute a value according to the defined weights.
The weight represent rations. For instance, given the weights 2 to A and 8 to B can be interpreted as follows: when generating 10 values, then generator A is picked 2 times and generator B 8 times in average. I.e. A has a chance of 20% to be picked and B 80%. Some additional examples:
20 to A, 50 to B, 60 C => out of 130, A is picked 20, B 50 and C 60, i.e. A has a chance of roughly 15.4%, B 38.5% and C 46.1% to be picked in average.
Return
The resulting ArbArgsGenerator.
Since
2.0.0
Parameters
The first ArbArgsGenerator with an associated weight.
The second ArbArgsGenerator with an associated weight
optionally more ArbArgsGenerator with associated weights
Throws
in case the weights are wrong (are less than 1)
in case the weights sum up to Int.MAX_VALUE or more.