get_multiplicity: Find the number of times a value k occurs in a partition that...

Description Usage Arguments Examples

View source: R/rpartitions.R

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

1
2
  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

1
get_multiplicity(10, 5, hash(), 3, 2, TRUE, FALSE)

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