transitiveClosure {socialranking} | R Documentation |
Transitive Closure
Description
Apply transitive closure over power relation that has cycles.
Usage
transitiveClosure(powerRelation)
Arguments
powerRelation |
A |
Details
A power relation is a binary relationship between coalitions that is transitive.
For coalitions , this means that if
and
, then
.
A power relation with cycles is not transitive. A transitive closure over a power relation removes all cycles and turns it into a
transitive relation, placing all coalitions within a cycle in the same equivalence class.
If , from the symmetric definition in
PowerRelation()
we
therefore assume that . Similarly, if
, the transitive closure turns it into
.
transitiveClosure()
transforms a PowerRelation
object with cycles into a PowerRelation
object without cycles.
As described above, all coalitions within a cycle then are put into the same equivalence class
and all duplicate coalitions are removed.
Value
PowerRelation
object with no cycles.
Examples
pr <- as.PowerRelation("1 > 2")
# nothing changes
transitiveClosure(pr)
pr <- suppressWarnings(as.PowerRelation("1 > 2 > 1"))
# 1 ~ 2
transitiveClosure(pr)
pr <- suppressWarnings(
as.PowerRelation("1 > 3 > 1 > 2 > 23 > 2")
)
# 1 > 3 > 1 > 2 > 23 > 2 =>
# 1 ~ 3 > 2 ~ 23
transitiveClosure(pr)