A space is a measurable space, carrying a dimension (space_dim()) along
with membership tests (contains()). It is either a finite count_space()
that can be listed (enumerate_space()), or a region of
\(\mathbb{R}^d\). A space may serve as the sample space of a
distribution or the parameter space of a family; simplex_region() is
both, for the multinomial family and for dirichlet.
Examples
space_dim(count_space(n_trials = 4L, k = 3L))
#> [1] 3
contains(count_space(n_trials = 4L, k = 3L), c(2L, 1L, 1L))
#> [1] TRUE