fixed.intervals {wbs}R Documentation

Fixed intervals

Description

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

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.

Value

a 2-column matrix with start (first column) and end (second column) points of an interval in each row

See Also

random.intervals wbs

Examples

fixed.intervals(10,100)

[Package wbs version 1.4 Index]