Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
dfd643e
Investigate sample_gnp()
krlmlr Oct 24, 2025
813a4f9
Investigate rewire_each_edge()
krlmlr Oct 24, 2025
ed3a31e
Investigate edge_betweenness()
krlmlr Oct 24, 2025
82a1bad
Investigate cluster_infomap()
krlmlr Oct 24, 2025
5d8e357
Avoid check on CI
krlmlr Oct 21, 2025
4a81813
Skip layout_with_sugiyama() examples and tests, crashes
krlmlr Oct 24, 2025
379c871
Investigate snapshot changes and skips
krlmlr Oct 19, 2025
69ee8bf
Investigate snapshot change in flow
krlmlr Oct 25, 2025
e182bb0
Investigate sample_degseq examples
krlmlr Oct 22, 2025
3719fe3
Investigate sample_pa_age examples
krlmlr Oct 22, 2025
c4d623d
Remove tests for games and embedding (that use games)
krlmlr Oct 25, 2025
79d01d7
Investigate changes in arguments forwarded in similarity() and cluste…
krlmlr Oct 21, 2025
da51d06
Investigate erdos_renyi_game
krlmlr Oct 24, 2025
fd87252
Investigate static_fitness_game_impl()
krlmlr Oct 24, 2025
8c3fcd0
Investigate sample_gnp()
web-flow Oct 24, 2025
569965d
Investigate static_power_law_game_impl()
web-flow Oct 24, 2025
e1dda27
Investigate sbm_game_impl()
web-flow Oct 24, 2025
53f667d
Investigate get_all_simple_paths_impl()
web-flow Oct 24, 2025
92c9f3f
Investigate assortativity_nominal_impl()
web-flow Oct 24, 2025
44ca01c
Investigate assortativity_impl()
web-flow Oct 24, 2025
16838a4
Investigate joint_degree_matrix_impl()
web-flow Oct 24, 2025
17a57bd
Investigate joint_degree_distribution_impl()
web-flow Oct 24, 2025
27c98fd
Investigate bipartite_game_gnp_impl()
web-flow Oct 24, 2025
e590e5c
Investigate cliques_impl()
web-flow Oct 24, 2025
7acd6bf
Investigate weighted_cliques_impl()
web-flow Oct 24, 2025
774a48c
Investigate similarity_jaccard_impl()
web-flow Oct 24, 2025
b850f89
Investigate eigen_adjacency_impl()
web-flow Oct 24, 2025
573830b
Investigate simple_cycles_impl()
web-flow Oct 24, 2025
a8d94a6
Investigate fundamental_cycles_impl()
web-flow Oct 24, 2025
0497941
Investigate minimum_cycle_basis_impl()
web-flow Oct 24, 2025
04a8c99
Investigate graphlets_candidate_basis()
web-flow Oct 24, 2025
2147324
Investigate similarity
krlmlr Oct 24, 2025
4d0ebd2
Fix all_simple_paths()
krlmlr Oct 25, 2025
3d9896a
Investigate UNLIMITED
krlmlr Oct 25, 2025
2a2a7eb
Skip page_rank() examples
web-flow Oct 25, 2025
0f02278
Skip sample_sbm() examples
web-flow Oct 25, 2025
794885d
Skip sample_fitness() examples
web-flow Oct 25, 2025
4b6674e
Skip sample_fitness_pl() examples
web-flow Oct 25, 2025
40a99d6
Skip sample_() examples
web-flow Oct 25, 2025
91f8f84
Skip similarity() examples
web-flow Oct 25, 2025
8dfad35
Investigate missing arg docs
krlmlr Oct 25, 2025
b061737
Build-ignore infomap citation file, need to embed it into the main file
krlmlr Oct 20, 2025
3c0e313
Fix strength()
krlmlr Oct 26, 2025
8987f18
Snaps
krlmlr Oct 26, 2025
8e53eb5
Fix is_simple()
krlmlr Nov 1, 2025
314427a
Fix automorphism_group()
krlmlr Nov 1, 2025
ae1fca8
Document
krlmlr Nov 1, 2025
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
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
^src/*\.gcda$
^src/*\.gcno$
^R/release\.R$
^src/vendor/cigraph/vendor/infomap/CITATION\.cff$
^man/dot-igraph.progress\.Rd$
^man/dot-igraph.status\.Rd$
^man/dot-extract_constructor_and_modifiers\.Rd$
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/custom/before-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ runs:
echo '_R_CHECK_PKG_SIZES_=FALSE' | tee -a $GITHUB_ENV
shell: bash

- name: "REMOVE ME: Avoid checking native code symbols"
run: |
echo 'UserNM=true' | tee -a $GITHUB_ENV
echo 'RCMDCHECK_ERROR_ON="warning"' | tee -a $GITHUB_ENV
shell: bash

- name: Install GLPK on macOS
if: runner.os == 'macOS'
run: |
Expand Down
1 change: 1 addition & 0 deletions R/assortativity.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ assortativity.degree <- function(graph, directed = TRUE) {
#'
#' @aliases assortativity
#' @param graph The input graph, it can be directed or undirected.
#' @param weights FIXME
#' @param values The vertex values, these can be arbitrary numeric values.
#' @inheritParams rlang::args_dots_empty
#' @param values.in A second value vector to use for the incoming edges when
Expand Down
62 changes: 38 additions & 24 deletions R/centrality.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ subgraph.centrality <- function(graph, diag = FALSE) {
#' `page.rank()` was renamed to [page_rank()] to create a more
#' consistent API.
#' @inheritParams page_rank
#' @param personalized Optional vector giving a probability distribution to
#' calculate personalized PageRank. For personalized PageRank, the probability
#' of jumping to a node when abandoning the random walk is not uniform, but it
#' is given by this vector. The vector should contains an entry for each vertex
#' and it will be rescaled to sum up to one.
#' @keywords internal
#' @export
page.rank <- function(
Expand All @@ -40,13 +45,19 @@ page.rank <- function(
) {
# nocov start
lifecycle::deprecate_soft("2.0.0", "page.rank()", "page_rank()")

if (lifecycle::is_present(personalized)) {
cli::cli_warn(
"The {.arg personalized} argument is deprecated and will be ignored."
)
}

page_rank(
graph = graph,
algo = algo,
vids = vids,
directed = directed,
damping = damping,
personalized = personalized,
weights = weights,
options = options
)
Expand Down Expand Up @@ -446,23 +457,14 @@ betweenness <- function(
normalized = FALSE,
cutoff = -1
) {
res <- betweenness_cutoff_impl(
graph = graph,
weights = weights,
vids = v,
betweenness_cutoff_impl(
graph,
v = v,
directed = directed,
weights = weights,
normalized = normalized,
cutoff = cutoff
)

if (normalized) {
vc <- as.numeric(vcount(graph))
if (is_directed(graph) && directed) {
res <- res / (vc * vc - 3 * vc + 2)
} else {
res <- 2 * res / (vc * vc - 3 * vc + 2)
}
}
res
}

#' @rdname betweenness
Expand All @@ -475,10 +477,13 @@ edge_betweenness <- function(
weights = NULL,
cutoff = -1
) {
e <- as_igraph_es(graph, e)
# Argument checks
ensure_igraph(graph)

res <- edge_betweenness_cutoff_impl(
graph = graph,
graph,
weights = weights,
eids = e,
directed = directed,
cutoff = cutoff
)
Expand Down Expand Up @@ -1444,9 +1449,22 @@ strength <- function(
graph,
vids = V(graph),
mode = c("all", "out", "in", "total"),
loops = TRUE,
loops = c("twice", "none", "once"),
weights = NULL
) {
if (is.logical(loops)) {
lifecycle::deprecate_soft(
"3.0.0",
"strength(loops = 'cannot be a logical')",
details = "Use the new character argument instead: 'twice', 'once', or 'none'."
)
if (loops) {
loops <- "twice"
} else {
loops <- "none"
}
}

strength_impl(
graph = graph,
vids = vids,
Expand Down Expand Up @@ -1702,11 +1720,7 @@ hub_score <- function(
#' @param directed Logical, if true directed paths will be considered for
#' directed graphs. It is ignored for undirected graphs.
#' @param damping The damping factor (\sQuote{d} in the original paper).
#' @param personalized Optional vector giving a probability distribution to
#' calculate personalized PageRank. For personalized PageRank, the probability
#' of jumping to a node when abandoning the random walk is not uniform, but it
#' is given by this vector. The vector should contains an entry for each vertex
#' and it will be rescaled to sum up to one.
#' @param reset FIXME
#' @param weights A numerical vector or `NULL`. This argument can be used
#' to give edge weights for calculating the weighted PageRank of vertices. If
#' this is `NULL` and the graph has a `weight` edge attribute then
Expand Down Expand Up @@ -1740,7 +1754,7 @@ hub_score <- function(
#' Hypertextual Web Search Engine. Proceedings of the 7th World-Wide Web
#' Conference, Brisbane, Australia, April 1998.
#' @keywords graphs
#' @examples
#' @examplesIf FALSE
#'
#' g <- sample_gnp(20, 5 / 20, directed = TRUE)
#' page_rank(g)$vector
Expand Down
3 changes: 3 additions & 0 deletions R/cliques.R
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ clique.number <- function(graph) {
#' `NULL` means no limit, i.e. it is the same as 0.
#' @param max Numeric constant, upper limit on the size of the cliques to find.
#' `NULL` means no limit.
#' @param max.results FIXME
#' @return `cliques()`, `largest_cliques()` and `clique_num()`
#' return a list containing numeric vectors of vertex ids. Each list element is
#' a clique, i.e. a vertex sequence of class [igraph.vs][V].
Expand Down Expand Up @@ -248,6 +249,7 @@ cliques <- function(graph, min = 0, max = 0) {
}

#' @rdname cliques
#' @param weights FIXME
#' @export
#' @cdocs igraph_largest_cliques
largest_cliques <- function(graph) {
Expand Down Expand Up @@ -398,6 +400,7 @@ clique_num <- function(graph) {
#' of the weighted clique finder supports positive integer weights only.
#' @param maximal Specifies whether to look for all weighted cliques (`FALSE`)
#' or only the maximal ones (`TRUE`).
#' @param max.results FIXME
#' @return `weighted_cliques()` and `largest_weighted_cliques()` return a
#' list containing numeric vectors of vertex IDs. Each list element is a weighted
#' clique, i.e. a vertex sequence of class [igraph.vs][V].
Expand Down
16 changes: 10 additions & 6 deletions R/community.R
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,8 @@ cluster_leiden <- function(
res <- community_leiden_impl(
graph = graph,
weights = weights,
vertex.weights = vertex_weights,
# FIXME: Also check below, might not be covered by tests
vertex.out.weights = vertex_weights,
resolution = resolution,
beta = beta,
start = !is.null(membership),
Expand All @@ -1717,7 +1718,8 @@ cluster_leiden <- function(
res <- community_leiden_impl(
graph = graph,
weights = weights,
vertex.weights = vertex_weights,
# FIXME: Also check above, might not be covered by tests
vertex.out.weights = vertex_weights,
resolution = resolution,
beta = beta,
start = !is.null(membership),
Expand Down Expand Up @@ -2685,11 +2687,13 @@ cluster_infomap <- function(
nb.trials = 10,
modularity = TRUE
) {
# FIXME: modularity argument?

res <- community_infomap_impl(
graph = graph,
e.weights = e.weights,
v.weights = v.weights,
nb.trials = nb.trials
graph,
e.weights,
v.weights,
nb.trials
)

if (igraph_opt("add.vertex.names") && is_named(graph)) {
Expand Down
Loading