Navigation | Overlay |
---|---|
t Navigate files | h Toggle hits |
y Change url to tip of branch | m Toggle misses |
b / v Jump to prev/next hit line | p Toggle partial |
z / x Jump to prev/next missed or partial line | 1..9 Toggle flags |
shift + o Open current page in GitHub | a Toggle all on |
/ or ? Show keyboard shortcuts dialog | c Toggle context lines or commits |
1 |
#' @title Transitive Reduction
|
|
2 |
#' @description Calculates the transitive reduction of a partial ranking.
|
|
3 |
#'
|
|
4 |
#' @param P A partial ranking as matrix object calculated with [neighborhood_inclusion]
|
|
5 |
#' or [positional_dominance].
|
|
6 |
#' @return transitive reduction of `P`
|
|
7 |
#' @author David Schoch
|
|
8 |
#' @examples
|
|
9 |
#' library(igraph)
|
|
10 |
#'
|
|
11 |
#' g <- threshold_graph(100,0.1)
|
|
12 |
#' P <- neighborhood_inclusion(g)
|
|
13 |
#' sum(P)
|
|
14 |
#'
|
|
15 |
#' R <- transitive_reduction(P)
|
|
16 |
#' sum(R)
|
|
17 |
#' @export
|
|
18 |
transitive_reduction <- function(P) { |
|
19 | 1 |
B <- transreduct(P) |
20 | 1 |
return(B) |
21 |
}
|
Read our documentation on viewing source code .