Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
382 changes: 380 additions & 2 deletions R/centrality.R

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions R/cycles.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#' a specific cycle.
#'
#' @param graph The input graph.
#' @inheritParams rlang::args_dots_empty
#' @param mode Character constant specifying how to handle directed graphs.
#' `out` follows edge directions, `in` follows edges in the reverse direction,
#' and `all` ignores edge directions. Ignored in undirected graphs.
Expand Down
3 changes: 3 additions & 0 deletions man/alpha_centrality.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions man/betweenness.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/closeness.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/diversity.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/harmonic_centrality.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/page_rank.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/power_centrality.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/strength.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/subgraph_centrality.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

160 changes: 160 additions & 0 deletions tools/migrations/centrality.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
# Argument-signature migrations: centrality
# Schema: see tools/migrations.R. Regenerate with:
# Rscript tools/generate-migrations.R

migrations <- list(
alpha_centrality = list(
old = function(graph, nodes, alpha, loops, exo, weights, tol, sparse) {},
new = function(
graph,
nodes = V(graph),
...,
alpha = 1,
loops = FALSE,
exo = 1,
weights = NULL,
tol = 1e-7,
sparse = TRUE
) {},
when = "3.0.0"
),

betweenness = list(
old = function(graph, v, directed, weights, normalized, cutoff) {},
new = function(
graph,
v = V(graph),
...,
directed = TRUE,
weights = NULL,
normalized = FALSE,
cutoff = -1
) {},
when = "3.0.0"
),

closeness = list(
old = function(graph, vids, mode, weights, normalized, cutoff) {},
new = function(
graph,
vids = V(graph),
...,
mode = c("out", "in", "all", "total"),
weights = NULL,
normalized = FALSE,
cutoff = -1
) {},
when = "3.0.0"
),

diversity = list(
old = function(graph, weights, vids) {},
new = function(
graph,
...,
weights = NULL,
vids = V(graph)
) {},
when = "3.0.0"
),

edge_betweenness = list(
old = function(graph, e, directed, weights, cutoff) {},
new = function(
graph,
e = E(graph),
...,
directed = TRUE,
weights = NULL,
cutoff = -1
) {},
when = "3.0.0"
),

harmonic_centrality = list(
old = function(graph, vids, mode, weights, normalized, cutoff) {},
new = function(
graph,
vids = V(graph),
...,
mode = c("out", "in", "all", "total"),
weights = NULL,
normalized = FALSE,
cutoff = -1
) {},
when = "3.0.0"
),

page_rank = list(
old = function(
graph,
algo,
vids,
directed,
damping,
personalized,
weights,
options
) {},
new = function(
graph,
...,
algo = c("prpack", "arpack"),
vids = V(graph),
directed = TRUE,
damping = 0.85,
personalized = NULL,
weights = NULL,
options = NULL
) {},
when = "3.0.0"
),

power_centrality = list(
old = function(
graph,
nodes,
loops,
exponent,
rescale,
tol,
sparse,
weights
) {},
new = function(
graph,
nodes = V(graph),
...,
loops = FALSE,
exponent = 1,
rescale = FALSE,
tol = 1e-7,
sparse = TRUE,
weights = NULL
) {},
when = "3.0.0"
),

strength = list(
old = function(graph, vids, mode, loops, weights) {},
new = function(
graph,
vids = V(graph),
...,
mode = c("all", "out", "in", "total"),
loops = TRUE,
weights = NULL
) {},
when = "3.0.0"
),

subgraph_centrality = list(
old = function(graph, diag) {},
new = function(
graph,
...,
diag = FALSE
) {},
when = "3.0.0"
)
)
Loading