comparable_pairs {netrankr} | R Documentation |
Calculates the fraction of comparable pairs in a partial ranking. This fraction is identical to the density of the induced undirected graph of a partial ranking.
comparable_pairs(P)
P |
A partial ranking as matrix object calculated with neighborhood_inclusion or positional_dominance. |
Fraction of comparable pairs in P
.
David Schoch
library(igraph) g <- sample_gnp(100,0.1) P <- neighborhood_inclusion(g) comparable_pairs(P) # All pairs of vertices are comparable in a threshold graph tg <- threshold_graph(100,0.3) P <- neighborhood_inclusion(g) comparable_pairs(P)