Learn R Programming

poseticDataAnalysis (version 1.0.0)

IsPartialOrder: Checking for partial ordering.

Description

Checks whether the input binary relation is a partial order.

Usage

IsPartialOrder(set, rel)

Value

A boolean value.

Arguments

set

A list of character strings (the names of the elements of the set, on which the binary relation is defined).

rel

A two-columns character matrix, each row comprising an element (pair) of the binary relation.

Examples

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

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

chk <- IsPartialOrder(set, rel)

Run the code above in your browser using DataLab