Based on the bijective relationship between natural numbers and sum of powers of two, convert integer between 0 and 2^K-1 to K-dimensional attribute pattern.

inv_bijectionvector(K, CL)

Arguments

K

An int for the number of attributes

CL

An int between 0 and 2^K-1

Value

A vec of the K-dimensional attribute pattern corresponding to CL.

Examples

inv_bijectionvector(4,0)
#>      [,1]
#> [1,]    0
#> [2,]    0
#> [3,]    0
#> [4,]    0