Learn R Programming

DEXiR (version 1.0.2)

dexi_index: dexi_index

Description

Return the index of argument vector vec in the decision space dim. The index is calculated according to DEXi's sorting rules, which are different to R's.

Usage

dexi_index(vec, dim)

Value

Integer, index of vec.

Arguments

vec

Integer vector, representing arguments of some decision rule.

dim

Integer vector, representing dimensions of the corresponding decision space. Assumptions: length(vec) == length(dim) and, for each i, 1 <= vec[[i]] <= dim[[i]].

Examples

Run this code
dexi_index(c(1,1,1), c(2,2,3))
dexi_index(c(1,1,2), c(2,2,3))
dexi_index(c(1,2,3), c(2,2,3))

Run the code above in your browser using DataLab