bottom_up: Bottom up method of generating uniform random partitions of Q...

Description Usage Arguments Examples

View source: R/rpartitions.R

Description

Bottom up method of generating uniform random partitions of Q having N parts.

Usage

1
  bottom_up(part, Q, D, rand_int, use_c, use_hash)

Arguments

part

a list to hold the partition

Q

the total sum of the partition

D

a dictionary for the number of partitions of Q having N or less parts (or N or less as the largest part), i.e. P(Q + N, N).

rand_int

a number representing a member of the feasible set

use_c

boolean if TRUE then compiled c code is used

use_hash

boolean, if TRUE then a hash table is used

Examples

1
bottom_up(c(5, 4), 4, list(), 1, TRUE, FALSE)

Example output

Loading required package: hash
hash-3.0.1 provided by Decision Patterns

[1] 6 2 2 2 1

rpartitions documentation built on May 1, 2019, 8:03 p.m.