Learn R Programming

poseticDataAnalysis (version 1.0.0)

POSet: Constructing a Partially Ordered Set.

Description

Constructs an object of class POSet, representing a partially ordered set (poset) \(P=(V,\leq)\).

Usage

POSet(elements, dom = matrix(ncol = 2, nrow = 0))

Value

An object \((V, \leq)\) of S4 class POSet, where \(V\) is the ground set and \(\leq\) is the partial order relation on it

Arguments

elements

A vector of character strings (the labels of the elements of the ground set \(V\)).

dom

Two-columns matrix of element labels, representing the dominances in the order relation \(\leq\). The generic k-th row of dom contains a pair of elements of \(V\), with dom[k, 1] \( \leq\) dom[k, 2].

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)

Run the code above in your browser using DataLab