getBlocksDim: Generate Block Dimensions Based on Dirichlet Distribution

View source: R/getBlockDim_function.R

getBlocksDimR Documentation

Generate Block Dimensions Based on Dirichlet Distribution

Description

This function generates block dimensions based on the Dirichlet distribution, ensuring no block has zero size.

Usage

getBlocksDim(K, p, alpha = 2)

Arguments

K

Integer. The number of blocks.

p

Integer. The total number of elements to be distributed among the blocks.

alpha

Numeric. The concentration parameter for the Dirichlet distribution. Default is 2.

Value

Integer vector. A sorted vector of block sizes in descending order.

Examples

# Generate block dimensions for 5 blocks and 100 elements
getBlocksDim(K = 5, p = 100)

himelmallick/MimESys documentation built on April 13, 2025, 9:06 p.m.