Learn R Programming

poseticDataAnalysis (version 1.0.0)

IsReflexive: Checking binary relation reflexivity.

Description

Checks whether the input binary relation is reflexive.

Usage

IsReflexive(set, rel)

Value

A boolean value.

Arguments

set

A list of 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", "e")

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

chk <- IsReflexive(set, rel)

Run the code above in your browser using DataLab