R/PCMIterators.R
PCMIteratorMapping.Rd
Iterator over combinations with repetions of a given set of modelTypes
PCMIteratorMapping( mapping, modelTypes, allowedModelTypesIndices = rep(list(NULL), length(mapping)) )
mapping | a vector of elements from modelTypes giving the initial combination |
---|---|
modelTypes | a vector of unique elements to choose from when building the combinations. |
allowedModelTypesIndices | a list of the same length as |
an iterator object with S3 class c("imapping", "abstractiter",
"iter")
.
Calling repeatedly nextElem on this object iterates over all possible
combinations with repetitions of the same length as the argument
mapping
.
#> [1] 1 1nextElem(it)#> [1] 1 2nextElem(it)#> [1] 1 3nextElem(it)#> [1] 2 1#> [1] 1 1nextElem(it)#> [1] 1 2nextElem(it)#> [1] 2 1nextElem(it)#> [1] 2 2nextElem(it)#> [1] 3 1nextElem(it)#> [1] 3 2#> [1] "BM" "BM"nextElem(it)#> [1] "BM" "OU"