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