This function generates a poset from an incidence matrix x
. Such matrix is a named and logical
that is TRUE
if the row element is dominated by the column one, FALSE
otherwise. Such incidence relation should be reflexive, anti-symmetric, and transitive..
poset_from_incidence(x)
an environment of class poset
.
a logical
matrix.
davey2002introductionPOSetR
poset
.
x <- c(
TRUE, FALSE, FALSE, FALSE, FALSE, FALSE,
TRUE, TRUE, FALSE, FALSE, FALSE, FALSE,
TRUE, TRUE, TRUE, FALSE, FALSE, FALSE,
TRUE, FALSE, FALSE, TRUE, FALSE, FALSE,
TRUE, TRUE, FALSE, TRUE, TRUE, FALSE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE
)
x <- matrix(x, nrow = 6, ncol = 6)
rownames(x) <- colnames(x) <- LETTERS[1:6]
p <- poset_from_incidence(x)
plot(p)
Run the code above in your browser using DataLab