rel_is_reflexive {agop}R Documentation

Reflexive Binary Relations

Description

A binary relation RR is reflexive, iff for all xx we have xRxxRx.

Usage

rel_is_reflexive(R)

rel_closure_reflexive(R)

rel_reduction_reflexive(R)

Arguments

R

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

Details

rel_is_reflexive finds out if a given binary relation is reflexive. The function just checks whether all elements on the diagonal of R are non-zeros, i.e., it has O(n)O(n) time complexity, where nn is the number of rows in R. Missing values on the diagonal may result in NA.

A reflexive closure of a binary relation RR, determined by rel_closure_reflexive, is the minimal reflexive superset RR' of RR.

A reflexive reduction of a binary relation RR, determined by rel_reduction_reflexive, is the minimal subset RR' of RR, such that the reflexive closures of RR and RR' are equal i.e., the largest irreflexive relation contained in RR.

Value

The rel_closure_reflexive and rel_reduction_reflexive functions return a logical square matrix. dimnames of R are preserved.

On the other hand, rel_is_reflexive returns a single logical value.

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_symmetric(), rel_is_total(), rel_is_transitive(), rel_reduction_hasse()


[Package agop version 0.2.4 Index]