Learn R Programming

rpartitions (version 0.1)

get_multiplicity: Find the number of times a value k occurs in a partition that is being generated at random by the multiplicity() function. The resulting multiplicity is then passed back to the multiplicity() function along with an updated value of count and an updated dictionary D

Description

Find the number of times a value k occurs in a partition that is being generated at random by the multiplicity() function. The resulting multiplicity is then passed back to the multiplicity() function along with an updated value of count and an updated dictionary D

Usage

get_multiplicity(Q, k, D, rand_int, count, use_c, use_hash)

Arguments

Q
the total sum of the partition
k
the size of the largest (and also first) part
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, Q + N).
rand_int
the random integer
count
count < rand_int
use_c
boolean if TRUE then compiled c code is used
use_hash
boolean, if TRUE then a hash table is used

Examples

Run this code
get_multiplicity(10, 5, hash(), 3, 2, TRUE, FALSE)

Run the code above in your browser using DataLab