m2Set | R Documentation |
The function returns the vectors (only counted once) of all the multi-index
partitions output of the mkmSet
function. These vectors correspond also to the blocks
of the subdivisions of the multiset having the given multi-index as multeplicites.
m2Set( v=c(0) )
v |
sequence of type |
Consider the multi-index (2,1). The partitions are
0 1 1 0 2 1 1 2
1 0 0 1 0 0 1 1
with multiplicities 1, 1, 2, 1 respectively. The m2Set
function
deletes column repetitions, that is transforms the given list in
[[0,1],[1,0],[2,0],[1,1],[2,1]]
according to the order given in the input. In terms of subdivisions, suppose to consider
the multiset [a,a,b]
with multiplicities (2,1). The subdivisions are
[[[b],[a],[a]],1], [[[a,a],[b]],1], [[[a],[a,b]],2], [[a,a,b],1]. |
The m2Set
function deletes block repetitions, that is transforms the given list
in
[[b],[a],[a,a],[a,b],[a,a,b]] |
according to the order given in the input. See also the examples.
set |
the sequence with distinct elements |
Called by the nKM
and nPM
functions in the kStatistics
package.
Elvira Di Nardo elvira.dinardo@unito.it,
Giuseppe Guarino giuseppe.guarino@rete.basilicata.it
list2m
,
list2Set
M1 <- mkmSet(c(2,1)) # M1 is # list( # list( list( c(0,1), c(1,0), c(1,0) ) ,1), # list( list( c(0,1), c(2,0) ) ,1), # list( list( c(1,0), c(1,1) ) ,2), # list( list( c(2,1) ) ,1), # ) # To print all the partitions of the multi-index (2,1) run mkmSet(c(2,1),TRUE) # [( 0 1 )( 1 0 )( 1 0 ), 1 ] # [( 0 1 )( 2 0 ), 1 ] # [( 1 0 )( 1 1 ), 2 ] # [( 2 1 ), 1 ] # # Then m2Set(M1) returns the following set: [[0,1],[1,0],[2,0],[1,1],[2,1]] # m2Set( M1 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.