Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rel_reflexive

Reflexive Binary Relations


Description

A binary relation R is reflexive, iff for all x we have xRx.

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) time complexity, where n is the number of rows in R. Missing values on the diagonal may result in NA.

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

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

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


agop

Aggregation Operators and Preordered Sets

v0.2-3
LGPL (>= 3)
Authors
Marek Gagolewski [aut, cre] (<https://orcid.org/0000-0003-0637-6028>), Anna Cena [ctb] (<https://orcid.org/0000-0001-8697-5383>)
Initial release
2020-01-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.