random.intervals: Random intervals

Description Usage Arguments Value See Also Examples

Description

The function generates M intervals, whose endpoints are are drawn uniformly without replacements from 1,2,..., n. This routine can be used inside wbs function and is typically not called directly by the user.

Usage

1

Arguments

n

a number of endpoints to choose from

M

a number of intervals to generate

Value

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

See Also

fixed.intervals wbs

Examples

1

Example output

       [,1] [,2]
  [1,]    1    7
  [2,]    4    5
  [3,]    9   10
  [4,]    5    6
  [5,]    1    9
  [6,]    8    9
  [7,]    4    7
  [8,]    3    4
  [9,]    8    9
 [10,]    8    9
 [11,]    4    7
 [12,]    2   10
 [13,]    7   10
 [14,]    3    4
 [15,]    3    4
 [16,]    2    7
 [17,]    5    6
 [18,]    3    9
 [19,]    6    7
 [20,]    1    2
 [21,]    3   10
 [22,]    9   10
 [23,]    7    9
 [24,]    2   10
 [25,]    4    6
 [26,]    7   10
 [27,]    3    6
 [28,]    3    8
 [29,]    4    7
 [30,]    7    9
 [31,]    7   10
 [32,]    1   10
 [33,]    4    9
 [34,]    1    7
 [35,]    3    7
 [36,]    7   10
 [37,]    2   10
 [38,]    4   10
 [39,]    2    8
 [40,]    3    8
 [41,]    9   10
 [42,]    8    9
 [43,]    2    9
 [44,]    7   10
 [45,]    7    8
 [46,]    1    9
 [47,]    9   10
 [48,]    5   10
 [49,]    7   10
 [50,]    6    8
 [51,]    9   10
 [52,]    9   10
 [53,]    5   10
 [54,]    7   10
 [55,]    1   10
 [56,]    1    9
 [57,]    8    9
 [58,]    1    3
 [59,]    7   10
 [60,]    4   10
 [61,]    5    8
 [62,]    1    6
 [63,]    4    8
 [64,]    4    7
 [65,]    5    6
 [66,]    6    8
 [67,]    9   10
 [68,]    7   10
 [69,]    4   10
 [70,]    7    8
 [71,]    5    9
 [72,]    2    4
 [73,]    7    8
 [74,]    3    5
 [75,]    8   10
 [76,]    1    4
 [77,]    2    4
 [78,]    5   10
 [79,]    8    9
 [80,]    7    9
 [81,]    9   10
 [82,]    1    9
 [83,]    1    3
 [84,]    1    6
 [85,]    8   10
 [86,]    5    6
 [87,]    4    5
 [88,]    9   10
 [89,]    8    9
 [90,]    4    6
 [91,]    8    9
 [92,]    9   10
 [93,]    3    8
 [94,]    2    9
 [95,]    2    7
 [96,]    8    9
 [97,]    6    8
 [98,]    2    3
 [99,]    2    8
[100,]    4   10

wbs documentation built on May 15, 2019, 1:04 a.m.