Learn R Programming

poseticDataAnalysis (version 1.0.0)

IsExtensionOf: Checking poset extensions.

Description

Checks whether poset1 is an extension of poset2.

Usage

IsExtensionOf(poset1, poset2)

Value

A boolean value.

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 S4cl ass POSet (e.g. POSet(), LinearPOSet(), ProductPOSet(), ...) .

Examples

Run this code
elems <- c("a", "b", "c", "d")

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

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

pos1 <- POSet(elements = elems, dom = dom1)
pos2 <- POSet(elements = elems, dom = dom2)

chk <- IsExtensionOf(pos1, pos2)

Run the code above in your browser using DataLab