Matrix of states

states(P)

Arguments

P

Integer scalar. Number of functions.

Value

A matrix of size 2^P by P with all the possible (0,1) combinations of functions.

Examples

states(3)
#>      [,1] [,2] [,3]
#> [1,]    0    0    0
#> [2,]    1    0    0
#> [3,]    0    1    0
#> [4,]    1    1    0
#> [5,]    0    0    1
#> [6,]    1    0    1
#> [7,]    0    1    1
#> [8,]    1    1    1