Learn R Programming

parsec (version 1.2.0)

equivalences: Equivalence classes in posets

Description

The function provides the classes of profiles that in a poset can be considered equivalent since they share the same upset and downset.

Usage

equivalences(x)

Arguments

x

an object of class incidence or cover.

Value

The function provide a vector that attributes a class of equivalence to each profile. The vector is of class factor and not of class order because, even if levels are numerd they can not be compared.

Examples

Run this code
# NOT RUN {
Lmbd <- getlambda(A > B, A > C, B > D, A > E, B > E, C > F, C > G)
res <- equivalences(Lmbd)

equivalence_classes <- levels(res)
colrs <- sapply(res, function(x) which(equivalence_classes == x)) + 1
plot(Lmbd, col = colrs, lwd = 2)
# }

Run the code above in your browser using DataLab