Learn R Programming

poseticDataAnalysis (version 1.0.0)

ProductPOSet: Constructing the product of posets.

Description

Constructs the product poset \((V, \leq_{prd})\), starting from a collection of posets.

Usage

ProductPOSet(poset1, poset2, ...)

Value

The product poset, an object of S4 class ProductPOSet (subclass of POSet).

Arguments

poset1

An object of S4 class POSet. Argument poset1 must be created by using any function contained in the package aimed at building object of S4 class POSet (e.g. POSet(), LinearPOSet(), ProductPOSet(), ...) .

poset2

An object of S4 class POSet. Argument poset2 must be created by using any function contained in the package aimed at building object of S4 class POSet (e.g. POSet(), LinearPOSet(), ProductPOSet(), ...) .

...

Optional additional objects of S4 class POSet. Optional arguments must be created by using any function contained in the package aimed at building object of S4 class POSet (e.g. POSet(), LinearPOSet(), ProductPOSet(), ...) .

Details

Let \(P_1 = (V_1, \leq_1), ..., P_k = (V_k, \leq_k)\) be a collection of posets. The product poset \(P=P_1 \times...\times P_k\) is the poset \((V, \leq_{prd})\) where \(V=V_1\times...\times V_k\) and given \((a_1, ..., a_k)\in V\) and \((b_1, ..., b_k)\in V\), \((a_1, ..., a_k)\leq_{prd} (b_1, ..., b_k)\) if and only if \(a_i\leq_i b_i\) for all \(i=1, ..., k\).

Examples

Run this code
elems1 <- c("a", "b", "c", "d")
elems2 <- c("x", "y", "z")
elems3 <- c("q", "r")

dom <- matrix(c(
  "a", "b",
  "c", "b",
  "b", "d"
), ncol = 2, byrow = TRUE)

p1 <- POSet(elements = elems1, dom = dom)
p2 <- LinearPOSet(elements = elems2)
p3 <- LinearPOSet(elements = elems3)

prd12 <- ProductPOSet(p1, p2)

prd123 <- ProductPOSet(p1, p2, p3)

Run the code above in your browser using DataLab