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

rel_cyclic

Cyclic Binary Relations


Description

A binary relation R is cyclic, iff its transitive closure is not antisymmetric. Note that R may be reflexive and still acyclic, i.e., loops in R are not taken into account.

Usage

rel_is_cyclic(R)

Arguments

R

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

Details

rel_is_cyclic has O(n^3) time complexity, where n is the number of rows in R (the implemented algorithm currently verifies whether a depth-first search-based topological sorting is possible). Missing values in R always result in NA.

Value

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