Learn R Programming

poseticDataAnalysis (version 1.0.0)

LinearSumPOSet: Linear sum of posets.

Description

Computes the linear sum of the input posets.

Usage

LinearSumPOSet(poset1, poset2, ...)

Value

The linear sum poset, an object of S4 class 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),\ldots,P_k=(V_k,\leq_k)\) be \(k\) posets on disjoint ground sets. Their linear sum is the poset \(P=(V,\lhd)\) having as ground set the union of the input ground sets, with \(a\leq b\) if and only if \(a\leq_i b\) for some \(i\), or \(a\in V_i\) and \(b\in V_j\), with \(i<j\). In other words, the linear sum is obtained by stacking the input posets from bottom, and making all of the minimal elements of \(P_i\) covering all of the maximal elements of \(P_{i-1}\) (\(i>1\)).

Examples

Run this code
elems1 <- c("a", "b", "c", "d")
elems2 <- c("e", "f", "g", "h")

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

dom2 <- matrix(c(
  "e", "f",
  "g", "h",
  "h", "f"
), ncol = 2, byrow = TRUE)

pos1 <- POSet(elements = elems1, dom = dom1)

pos2 <- POSet(elements = elems2, dom = dom2)

#Linear sum of pos1 and pos2
lin.sum <- LinearSumPOSet(pos1, pos2)

Run the code above in your browser using DataLab