Learn R Programming

kStatistics (version 2.0)

mkmSet: Subdivisions of a Multiset

Description

Generate all the subdivisions of a multiset, reducing the overall computational complexity by using integer partitions.

Usage

mkmSet(vPar)

Arguments

vPar

Number of blocks to consider or vector of numbers of blocks to consider

Value

list

two-dimensional list: in the first there is the partition type, while in the second there is its multiplicity

References

E. Di Nardo, G. Guarino, D. Senato (2008) An unifying framework for k-statistics, polykays and their generalizations. Bernoulli. 14(2), 440-468. (download from http://arxiv.org/pdf/math/0607623.pdf)

See Also

umSet, mCoeff, countP, nStirling2, intPart, df

Examples

Run this code
# NOT RUN {
# Return [ [[1,1,1],1], [[1,2],3], [[3],1]  ]
# The support of the multiset has all the same eleents
mkmSet(3)

# Return [ [[1,1],[1,0],2], [[1,0],[1,0],[0,1],1],[[2,0],[0,1],1], [[2,1],1] ]
# The support of the multiset has 2 elements with instances respectively 2 and 1.
mkmSet(c(2,1)) 

# }

Run the code above in your browser using DataLab