poset_from_incidence: Generates a Partially Ordered SET from an incidence matrix

View source: R/poset_from_incidence.R

poset_from_incidenceR Documentation

Generates a Partially Ordered SET from an incidence matrix

Description

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..

Usage

poset_from_incidence(x)

Arguments

x

a logical matrix.

Value

an environment of class poset.

References

\insertRef

davey2002introductionPOSetR

See Also

poset.

Examples

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)

POSetR documentation built on Jan. 17, 2023, 5:18 p.m.