Learn R Programming

hmcdm (version 2.1.2)

inv_bijectionvector: Convert integer to attribute pattern

Description

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.

Usage

inv_bijectionvector(K, CL)

Value

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

Arguments

K

An int for the number of attributes

CL

An int between 0 and 2^K-1

Examples

Run this code
inv_bijectionvector(4,0)

Run the code above in your browser using DataLab