powered by
Computes the reflexive closure of the input binary relation.
ReflexiveClosure(set, rel)
A reflexive binary relation, as a two-columns character matrix (each row comprises an element (pair) of the transitivity closed relation).
A list of character strings (the names of the elements of the set, on which the binary relation is defined).
A two-columns character matrix, each row comprising an element (pair) of the relation.
set<-c("a", "b", "c", "d", "e") rel <- matrix(c( "a", "b", "c", "b", "d", "a", "c", "a", "a", "a", "d", "d" ), ncol = 2, byrow = TRUE) r.clo<-ReflexiveClosure(set, rel)
Run the code above in your browser using DataLab