That would make the points non-uniform random, this is a lot trickier than it sounds. I assume you mean that generating these 2 points would not be acceptable, assuming min is 0 and max is 1:
- Point [0.4, 0.8]
- Point [0.7, 0.9]
because they overlap.
The seemingly 'obvious' way to do it (prevent the xth node to find a range that is still 'open' and restrict to only generate within that) means that higher nodes are likely to be far smaller. You can solve any bias in ordering by shuffling the generated points at the very end, but you're going to end up with a more rigid 'some points are very large, but most are quite small'. Is that what you want? That 90%+ of the time, this algorithm generates one huge range and all the rest will be tiny ranges? Or would you prefer that the algorithm generates a large number of medium-sized ranges?
There are no easy answers.
I want one large range and many small ones
Use e.g. guava's RangeSet class to keep track of which ranges are 'occupied'. For all the 'still open' ranges, add them to a list, and establish a 'factor' that is equal to the open range's size. So, if you have 0.1-0.3 open as well as 0.4-0.5, then the 'weight' of the first range is 0.2, of the second it is 0.1, for a total of 0.3. Generate a number between 0.0 and 0.3, use that to pick which range to restrict yourself to, then generate 2 random numbers, flip em if the second is lower than the first, and you got yourself another range, guaranteed not to overlap. Add this range to your rangeset and start all over again for the next node.
Many roughly equally sized ranges.
First pick the range size, by dividing the total range available to you by the # of nodes you want to generate within. So, if the min/max is 0.0 and 1.0 and you need 5 ranges, it's 0.2. Then either commit to dividing up the space precisely (at which point random is no longer a thing at all), or add some sort of jitter function which will adjust the 0.2 randomly, e.g. between 50% to 100%, then apply this algorithm, then adjust your median rangesize for the remaining nodes by taking this into account (so if you randomly went with an 0.1, you have 4 left to generate over 0.9). This is way more complicated and has a ton of 'well, what do you want?' involved.