Skip to contents

The sample space of a multinomial or multivariate hypergeometric: the non-negative integer points of the scaled simplex.

Usage

count_space(n_trials, k)

Arguments

n_trials

Integer total count per outcome (the number of trials).

k

Integer number of categories.

Value

A count_space.

Examples

count_space(n_trials = 4L, k = 3L)
#> <ripr::count_space>
#>  @ n_trials: int 4
#>  @ k       : int 3
#>  @ outcomes: int [1:15, 1:3] 0 0 0 0 0 1 1 1 1 2 ...
enumerate_space(count_space(n_trials = 2L, k = 3L))
#>      [,1] [,2] [,3]
#> [1,]    0    0    2
#> [2,]    0    1    1
#> [3,]    0    2    0
#> [4,]    1    0    1
#> [5,]    1    1    0
#> [6,]    2    0    0