Learn R Programming

polyMatrix (version 0.3.1)

ssetNext: The next subset

Description

Returns for a subset the next subset

Usage

ssetNext(set)

Arguments

set

the size of the full set, or the indexes of subset for which the next we will

Value

The next subset in lexicographic oder.

Details

When it is a natural number, then the program take it as the size of the full set, and returns the indicator of the first subset, which is a zero vector of the given length. If it is zero-one vector, then it read it as a subset indicator, and returns the indicator of the lexicographic next subset.

See Also

permNext, permSign

Examples

Run this code
# NOT RUN {
ssetNext(4)# 0 0 0 0
ssetNext(c(1,0,1,0)) #  1 0 1 1 
ssetNext(c(0,1,1,1)) #  1 0 0 0
ssetNext(c(1,1,1,1)) #  4
# }

Run the code above in your browser using DataLab