The function generates approximately M intervals with endpoints in 1,2,...,n, without random drawing. This routine
can be used inside wbs function and is typically not called directly by the user.
Usage
fixed.intervals(n, M)
Arguments
n
a number of endpoints to choose from
M
a number of intervals to generate
Value
a 2-column matrix with start (first column) and end (second column) points of an interval in each row
Details
Function finds the minimal m such that \(M\leq \frac{m(m-1)}{2}\).
Then it generates m approximately equally-spaced positive integers lower than n and returns all possible intervals consisting of any two of these points.