Partitions {MultiStatM}R Documentation

General Partition Function

Description

A unified function to compute different types of partitions. Depending on the partition type specified, it calls the appropriate function: Partition_2Perm, Partition_DiagramsClosedNoLoops, Partition_Indecomposable, or Partition_Pairs.

Usage

Partitions(Type, ...)

Arguments

Type

A character string specifying the type of partion to compute. Choose from "2Perm", "Diagram", "Indecomp", "Pairs".

...

Additional arguments passed to the specific partition function:

For "2Perm", "Diagram" and "Indecomp":
  • L: A partition matrix.

For "Pairs":
  • N: An integer specifying the number of elements to be partitioned.

Value

Depending on the commutator type:

2Perm

A vector with the elements 1 to N permuted according to L.

Diagram

The list of partition matrices indecomposable with respect to L, representing diagrams without loops.

Indecomp

A list of partition matrices indecomposable with respect to L and a vector indicating the number of indecomposable partitions by sizes.

Pairs

The list of partition matrices with blocks containing two elements. The list is empty if N is odd.

See Also

Other Partitions: PartitionTypeAll(), PermutationInv()

Examples

# Example for 2Perm
PA <- PartitionTypeAll(4)
Partitions("2Perm", L = PA$Part.class[[3]])

# Example for Diagram
L <- matrix(c(1,1,0,0,0,0,1,1),2,4,byrow=TRUE)
Partitions("Diagram", L = L)

# Example for Indecomp
L <- matrix(c(1,1,0,0,0,0,1,1),2,4,byrow=TRUE)
Partitions("Indecomp", L = L)

# Example for Pairs
Partitions("Pairs", N = 4)

[Package MultiStatM version 2.0.0 Index]