Learn R Programming

poseticDataAnalysis (version 1.0.0)

IsComparableWith: Checking comparability between two elements of a poset.

Description

Checks whether two elements \(a\) and \(b\) of \(V\) are comparable in the input poset \((V,\leq)\).

Usage

IsComparableWith(poset, element1, element2)

Value

A boolean value.

Arguments

poset

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

element1

A character string (the name of a poset element).

element2

A character string (the name of a poset element).

Examples

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

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

pos <- POSet(elements = elems, dom = dom)

chk <- IsComparableWith(pos, "a", "d")

Run the code above in your browser using DataLab