rel_hasse: Hasse Diagrams

Description Usage Arguments Details Value See Also Examples

Description

This function computes the reflexive reduction and a kind of transitive reduction which is useful for drawing Hasse diagrams.

Usage

1

Arguments

R

an object coercible to a 0-1 (logical) square matrix, representing a binary relation on a finite set.

Details

The input matrix R might not necessarily be acyclic/asymmetric, i.e., it may represent any totally preordered set (which induces an equivalence relation on the underlying preordered set). The implemented algorithm runs in O(n^3) time and first determines the transitive closure of R. If an irreflexive R is given, then the transitive closures of R and of the resulting matrix are identical. Moreover, if R is additionally acyclic, then this function is equivalent to rel_reduction_transitive.

Value

The rel_reduction_hasse function returns a logical square matrix. dimnames of R are preserved.

See Also

Other binary_relations: check_comonotonicity, pord_nd, pord_spread, pord_weakdom, rel_graph, rel_is_antisymmetric, rel_is_asymmetric, rel_is_cyclic, rel_is_irreflexive, rel_is_reflexive, rel_is_symmetric, rel_is_total, rel_is_transitive

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# Let ord be a total preorder (a total and transitive binary relation)
# === Plot the Hasse diagram of ord ===
# ===  requires the igraph package  ===
library("igraph")
hasse <- graph.adjacency(rel_reduction_transitive(ord))
plot(hasse, layout=layout.fruchterman.reingold(hasse, dim=2))

## End(Not run)

agop documentation built on March 26, 2020, 7:48 p.m.