From aa0de48026c4d570b28ecaa1b39ad8eb67cb1486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szabolcs=20Horv=C3=A1t?= Date: Mon, 25 Mar 2024 13:59:45 +0000 Subject: [PATCH] feat: weight support for `eccentricity()` and `radius()` (#1211) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Maëlle Salmon Co-authored-by: Kirill Müller --- NAMESPACE | 1 + R/aaa-auto.R | 50 +- R/paths.R | 101 +++- R/structural.properties.R | 7 +- man/all_simple_paths.Rd | 1 + man/average.path.length.Rd | 3 +- man/diameter.Rd | 1 + man/distances.Rd | 8 +- man/eccentricity.Rd | 21 +- man/get.all.shortest.paths.Rd | 7 +- man/get.shortest.paths.Rd | 7 +- man/graph_center.Rd | 59 ++ man/k_shortest_paths.Rd | 7 +- man/radius.Rd | 24 +- man/shortest.paths.Rd | 7 +- man/voronoi_cells.Rd | 3 +- src/cpp11.cpp | 916 ++++++++++++++++---------------- src/rinterface.c | 93 ---- tests/testthat/_snaps/paths.md | 22 + tests/testthat/test-paths.R | 67 +++ tools/stimulus/functions-R.yaml | 9 + 21 files changed, 767 insertions(+), 647 deletions(-) create mode 100644 man/graph_center.Rd create mode 100644 tests/testthat/_snaps/paths.md create mode 100644 tests/testthat/test-paths.R diff --git a/NAMESPACE b/NAMESPACE index a411736613..faf16778c9 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -439,6 +439,7 @@ export(graph.union) export(graph_) export(graph_attr) export(graph_attr_names) +export(graph_center) export(graph_from_adj_list) export(graph_from_adjacency_matrix) export(graph_from_atlas) diff --git a/R/aaa-auto.R b/R/aaa-auto.R index 80f492d10a..4a02754a5f 100644 --- a/R/aaa-auto.R +++ b/R/aaa-auto.R @@ -1777,23 +1777,9 @@ contract_vertices_impl <- function(graph, mapping, vertex.attr.comb=igraph_opt(" res } -eccentricity_impl <- function(graph, vids=V(graph), mode=c("all", "out", "in", "total")) { - # Argument checks - ensure_igraph(graph) - vids <- as_igraph_vs(graph, vids) - mode <- switch(igraph.match.arg(mode), "out"=1L, "in"=2L, "all"=3L, "total"=3L) - - on.exit( .Call(R_igraph_finalizer) ) - # Function call - res <- .Call(R_igraph_eccentricity, graph, vids-1, mode) - if (igraph_opt("add.vertex.names") && is_named(graph)) { - names(res) <- vertex_attr(graph, "name", vids) - } - res -} - -eccentricity_dijkstra_impl <- function(graph, weights=NULL, vids=V(graph), mode=c("all", "out", "in", "total")) { +eccentricity_dijkstra_impl <- function(graph, vids=V(graph), ..., weights=NULL, mode=c("all", "out", "in", "total")) { # Argument checks + check_dots_empty() ensure_igraph(graph) if (is.null(weights) && "weight" %in% edge_attr_names(graph)) { weights <- E(graph)$weight @@ -1815,22 +1801,9 @@ eccentricity_dijkstra_impl <- function(graph, weights=NULL, vids=V(graph), mode= res } -graph_center_impl <- function(graph, mode=c("all", "out", "in", "total")) { - # Argument checks - ensure_igraph(graph) - mode <- switch(igraph.match.arg(mode), "out"=1L, "in"=2L, "all"=3L, "total"=3L) - - on.exit( .Call(R_igraph_finalizer) ) - # Function call - res <- .Call(R_igraph_graph_center, graph, mode) - if (igraph_opt("return.vs.es")) { - res <- create_vs(graph, res) - } - res -} - -graph_center_dijkstra_impl <- function(graph, weights=NULL, mode=c("all", "out", "in", "total")) { +graph_center_dijkstra_impl <- function(graph, ..., weights=NULL, mode=c("all", "out", "in", "total")) { # Argument checks + check_dots_empty() ensure_igraph(graph) if (is.null(weights) && "weight" %in% edge_attr_names(graph)) { weights <- E(graph)$weight @@ -1851,20 +1824,9 @@ graph_center_dijkstra_impl <- function(graph, weights=NULL, mode=c("all", "out", res } -radius_impl <- function(graph, mode=c("all", "out", "in", "total")) { - # Argument checks - ensure_igraph(graph) - mode <- switch(igraph.match.arg(mode), "out"=1L, "in"=2L, "all"=3L, "total"=3L) - - on.exit( .Call(R_igraph_finalizer) ) - # Function call - res <- .Call(R_igraph_radius, graph, mode) - - res -} - -radius_dijkstra_impl <- function(graph, weights=NULL, mode=c("all", "out", "in", "total")) { +radius_dijkstra_impl <- function(graph, ..., weights=NULL, mode=c("all", "out", "in", "total")) { # Argument checks + check_dots_empty() ensure_igraph(graph) if (is.null(weights) && "weight" %in% edge_attr_names(graph)) { weights <- E(graph)$weight diff --git a/R/paths.R b/R/paths.R index 2ea02fbd8c..28db6ed5db 100644 --- a/R/paths.R +++ b/R/paths.R @@ -242,12 +242,8 @@ max_cardinality <- maximum_cardinality_search_impl #' #' @param graph The input graph, it can be directed or undirected. #' @param vids The vertices for which the eccentricity is calculated. -#' @param mode Character constant, gives whether the shortest paths to or from -#' the given vertices should be calculated for directed graphs. If `out` -#' then the shortest paths *from* the vertex, if `in` then *to* -#' it will be considered. If `all`, the default, then the corresponding -#' undirected graph will be used, edge directions will be ignored. This -#' argument is ignored for undirected graphs. +#' @inheritParams distances +#' @inheritParams rlang::args_dots_empty #' @return `eccentricity()` returns a numeric vector, containing the #' eccentricity score of each given vertex. #' @seealso [radius()] for a related concept, @@ -259,29 +255,47 @@ max_cardinality <- maximum_cardinality_search_impl #' eccentricity(g) #' @family paths #' @export -eccentricity <- eccentricity_impl +eccentricity <- function(graph, vids = V(graph), ..., weights = NULL, mode = c("all", "out", "in", "total")) { + if (...length() > 0) { + lifecycle::deprecate_soft( + "2.1.0", + "eccentricity(... =)", + details = "The arguments `weights` and `mode` must be named." + ) + + rlang::check_dots_unnamed() + + dots <- list(...) + + if (is.null(weights) && length(dots) > 0) { + weights <- dots[[1]] + dots <- dots[-1] + } + + if (missing(mode) && length(dots) > 0) { + mode <- dots[[1]] + } + } + + eccentricity_dijkstra_impl(graph, vids = vids, weights = weights, mode = mode) +} #' Radius of a graph #' -#' The eccentricity of a vertex is its shortest path distance from the -#' farthest other node in the graph. The smallest eccentricity in a graph -#' is called its radius +#' The eccentricity of a vertex is its distance from the farthest other node +#' in the graph. The smallest eccentricity in a graph is called its radius. #' #' The eccentricity of a vertex is calculated by measuring the shortest #' distance from (or to) the vertex, to (or from) all vertices in the #' graph, and taking the maximum. #' #' This implementation ignores vertex pairs that are in different -#' components. Isolate vertices have eccentricity zero. +#' components. Isolated vertices have eccentricity zero. #' #' @param graph The input graph, it can be directed or undirected. -#' @param mode Character constant, gives whether the shortest paths to or from -#' the given vertices should be calculated for directed graphs. If `out` -#' then the shortest paths *from* the vertex, if `in` then *to* -#' it will be considered. If `all`, the default, then the corresponding -#' undirected graph will be used, edge directions will be ignored. This -#' argument is ignored for undirected graphs. +#' @inheritParams eccentricity +#' @inheritParams rlang::args_dots_empty #' @return A numeric scalar, the radius of the graph. #' @seealso [eccentricity()] for the underlying #' calculations, [distances] for general shortest path @@ -294,7 +308,58 @@ eccentricity <- eccentricity_impl #' radius(g) #' @family paths #' @export -radius <- radius_impl +radius <- function(graph, ..., weights = NULL, mode = c("all", "out", "in", "total")) { + if (...length() > 0) { + lifecycle::deprecate_soft( + "2.1.0", + "radius(... =)", + details = "The arguments `weights` and `mode` must be named." + ) + + rlang::check_dots_unnamed() + + dots <- list(...) + + if (is.null(weights) && length(dots) > 0) { + weights <- dots[[1]] + dots <- dots[-1] + } + + if (missing(mode) && length(dots) > 0) { + mode <- dots[[1]] + } + } + + radius_dijkstra_impl(graph, weights = weights, mode = mode) +} + +#' Central vertices of a graph +#' +#' @description +#' `r lifecycle::badge("experimental")` +#' +#' The center of a graph is the set of its vertices with minimal eccentricity. +#' +#' @inheritParams eccentricity +#' @inheritParams rlang::args_dots_empty +#' @return The vertex IDs of the central vertices. +#' @seealso [eccentricity()], [radius()] +#' @family paths +#' @examples +#' tree <- make_tree(100, 7) +#' graph_center(tree) +#' graph_center(tree, mode = "in") +#' graph_center(tree, mode = "out") +#' +#' # Without and with weights +#' ring <- make_ring(10) +#' graph_center(ring) +#' # Add weights +#' E(ring)$weight <- seq_len(ecount(ring)) +#' graph_center(ring) +#' +#' @export +graph_center <- graph_center_dijkstra_impl #' @rdname distances #' @param directed Whether to consider directed paths in directed graphs, diff --git a/R/structural.properties.R b/R/structural.properties.R index 823bd886ec..c3bc4397e6 100644 --- a/R/structural.properties.R +++ b/R/structural.properties.R @@ -730,13 +730,14 @@ degree_distribution <- function(graph, cumulative = FALSE, ...) { #' @param mode Character constant, gives whether the shortest paths to or from #' the given vertices should be calculated for directed graphs. If `out` #' then the shortest paths *from* the vertex, if `in` then *to* -#' it will be considered. If `all`, the default, then the corresponding -#' undirected graph will be used, i.e. not directed paths are searched. This +#' it will be considered. If `all`, the default, then the graph is treated +#' as undirected, i.e. edge directions are not taken into account. This #' argument is ignored for undirected graphs. #' @param weights Possibly a numeric vector giving edge weights. If this is #' `NULL` and the graph has a `weight` edge attribute, then the #' attribute is used. If this is `NA` then no weights are used (even if -#' the graph has a `weight` attribute). +#' the graph has a `weight` attribute). In a weighted graph, the length +#' of a path is the sum of the weights of its constituent edges. #' @param algorithm Which algorithm to use for the calculation. By default #' igraph tries to select the fastest suitable algorithm. If there are no #' weights, then an unweighted breadth-first search is used, otherwise if all diff --git a/man/all_simple_paths.Rd b/man/all_simple_paths.Rd index 0bba46fb2c..f08193d093 100644 --- a/man/all_simple_paths.Rd +++ b/man/all_simple_paths.Rd @@ -57,6 +57,7 @@ Other paths: \code{\link{diameter}()}, \code{\link{distance_table}()}, \code{\link{eccentricity}()}, +\code{\link{graph_center}()}, \code{\link{radius}()} } \concept{paths} diff --git a/man/average.path.length.Rd b/man/average.path.length.Rd index 0ecb47a717..833881dd9a 100644 --- a/man/average.path.length.Rd +++ b/man/average.path.length.Rd @@ -18,7 +18,8 @@ average.path.length( \item{weights}{Possibly a numeric vector giving edge weights. If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. If this is \code{NA} then no weights are used (even if -the graph has a \code{weight} attribute).} +the graph has a \code{weight} attribute). In a weighted graph, the length +of a path is the sum of the weights of its constituent edges.} \item{directed}{Whether to consider directed paths in directed graphs, this argument is ignored for undirected graphs.} diff --git a/man/diameter.Rd b/man/diameter.Rd index f791e616f8..0b249648fa 100644 --- a/man/diameter.Rd +++ b/man/diameter.Rd @@ -73,6 +73,7 @@ Other paths: \code{\link{all_simple_paths}()}, \code{\link{distance_table}()}, \code{\link{eccentricity}()}, +\code{\link{graph_center}()}, \code{\link{radius}()} } \author{ diff --git a/man/distances.Rd b/man/distances.Rd index 6e4f49f64b..c3dc0cdf8a 100644 --- a/man/distances.Rd +++ b/man/distances.Rd @@ -57,7 +57,8 @@ this argument is ignored for undirected graphs.} \item{weights}{Possibly a numeric vector giving edge weights. If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. If this is \code{NA} then no weights are used (even if -the graph has a \code{weight} attribute).} +the graph has a \code{weight} attribute). In a weighted graph, the length +of a path is the sum of the weights of its constituent edges.} \item{unconnected}{What to do if the graph is unconnected (not strongly connected if directed paths are considered). If TRUE, only @@ -81,8 +82,8 @@ is not required for \code{shortest_paths()}.} \item{mode}{Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} -it will be considered. If \code{all}, the default, then the corresponding -undirected graph will be used, i.e. not directed paths are searched. This +it will be considered. If \code{all}, the default, then the graph is treated +as undirected, i.e. edge directions are not taken into account. This argument is ignored for undirected graphs.} \item{algorithm}{Which algorithm to use for the calculation. By default @@ -291,6 +292,7 @@ Other paths: \code{\link{all_simple_paths}()}, \code{\link{diameter}()}, \code{\link{eccentricity}()}, +\code{\link{graph_center}()}, \code{\link{radius}()} } \author{ diff --git a/man/eccentricity.Rd b/man/eccentricity.Rd index 33480743d9..c52b65f5c0 100644 --- a/man/eccentricity.Rd +++ b/man/eccentricity.Rd @@ -4,18 +4,32 @@ \alias{eccentricity} \title{Eccentricity of the vertices in a graph} \usage{ -eccentricity(graph, vids = V(graph), mode = c("all", "out", "in", "total")) +eccentricity( + graph, + vids = V(graph), + ..., + weights = NULL, + mode = c("all", "out", "in", "total") +) } \arguments{ \item{graph}{The input graph, it can be directed or undirected.} \item{vids}{The vertices for which the eccentricity is calculated.} +\item{...}{These dots are for future extensions and must be empty.} + +\item{weights}{Possibly a numeric vector giving edge weights. If this is +\code{NULL} and the graph has a \code{weight} edge attribute, then the +attribute is used. If this is \code{NA} then no weights are used (even if +the graph has a \code{weight} attribute). In a weighted graph, the length +of a path is the sum of the weights of its constituent edges.} + \item{mode}{Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} -it will be considered. If \code{all}, the default, then the corresponding -undirected graph will be used, edge directions will be ignored. This +it will be considered. If \code{all}, the default, then the graph is treated +as undirected, i.e. edge directions are not taken into account. This argument is ignored for undirected graphs.} } \value{ @@ -50,6 +64,7 @@ Other paths: \code{\link{all_simple_paths}()}, \code{\link{diameter}()}, \code{\link{distance_table}()}, +\code{\link{graph_center}()}, \code{\link{radius}()} } \concept{paths} diff --git a/man/get.all.shortest.paths.Rd b/man/get.all.shortest.paths.Rd index 5d6b2ac488..4e96cbd734 100644 --- a/man/get.all.shortest.paths.Rd +++ b/man/get.all.shortest.paths.Rd @@ -27,14 +27,15 @@ is not required for \code{shortest_paths()}.} \item{mode}{Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} -it will be considered. If \code{all}, the default, then the corresponding -undirected graph will be used, i.e. not directed paths are searched. This +it will be considered. If \code{all}, the default, then the graph is treated +as undirected, i.e. edge directions are not taken into account. This argument is ignored for undirected graphs.} \item{weights}{Possibly a numeric vector giving edge weights. If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. If this is \code{NA} then no weights are used (even if -the graph has a \code{weight} attribute).} +the graph has a \code{weight} attribute). In a weighted graph, the length +of a path is the sum of the weights of its constituent edges.} } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} diff --git a/man/get.shortest.paths.Rd b/man/get.shortest.paths.Rd index 38077feeae..488a420ad5 100644 --- a/man/get.shortest.paths.Rd +++ b/man/get.shortest.paths.Rd @@ -31,14 +31,15 @@ is not required for \code{shortest_paths()}.} \item{mode}{Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} -it will be considered. If \code{all}, the default, then the corresponding -undirected graph will be used, i.e. not directed paths are searched. This +it will be considered. If \code{all}, the default, then the graph is treated +as undirected, i.e. edge directions are not taken into account. This argument is ignored for undirected graphs.} \item{weights}{Possibly a numeric vector giving edge weights. If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. If this is \code{NA} then no weights are used (even if -the graph has a \code{weight} attribute).} +the graph has a \code{weight} attribute). In a weighted graph, the length +of a path is the sum of the weights of its constituent edges.} \item{output}{Character scalar, defines how to report the shortest paths. \dQuote{vpath} means that the vertices along the paths are reported, this diff --git a/man/graph_center.Rd b/man/graph_center.Rd new file mode 100644 index 0000000000..d2d1f8449a --- /dev/null +++ b/man/graph_center.Rd @@ -0,0 +1,59 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/paths.R +\name{graph_center} +\alias{graph_center} +\title{Central vertices of a graph} +\usage{ +graph_center(graph, ..., weights = NULL, mode = c("all", "out", "in", "total")) +} +\arguments{ +\item{graph}{The input graph, it can be directed or undirected.} + +\item{...}{These dots are for future extensions and must be empty.} + +\item{weights}{Possibly a numeric vector giving edge weights. If this is +\code{NULL} and the graph has a \code{weight} edge attribute, then the +attribute is used. If this is \code{NA} then no weights are used (even if +the graph has a \code{weight} attribute). In a weighted graph, the length +of a path is the sum of the weights of its constituent edges.} + +\item{mode}{Character constant, gives whether the shortest paths to or from +the given vertices should be calculated for directed graphs. If \code{out} +then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} +it will be considered. If \code{all}, the default, then the graph is treated +as undirected, i.e. edge directions are not taken into account. This +argument is ignored for undirected graphs.} +} +\value{ +The vertex IDs of the central vertices. +} +\description{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} + +The center of a graph is the set of its vertices with minimal eccentricity. +} +\examples{ +tree <- make_tree(100, 7) +graph_center(tree) +graph_center(tree, mode = "in") +graph_center(tree, mode = "out") + +# Without and with weights +ring <- make_ring(10) +graph_center(ring) +# Add weights +E(ring)$weight <- seq_len(ecount(ring)) +graph_center(ring) + +} +\seealso{ +\code{\link[=eccentricity]{eccentricity()}}, \code{\link[=radius]{radius()}} + +Other paths: +\code{\link{all_simple_paths}()}, +\code{\link{diameter}()}, +\code{\link{distance_table}()}, +\code{\link{eccentricity}()}, +\code{\link{radius}()} +} +\concept{paths} diff --git a/man/k_shortest_paths.Rd b/man/k_shortest_paths.Rd index f8e5d3b4a0..ca54c2be22 100644 --- a/man/k_shortest_paths.Rd +++ b/man/k_shortest_paths.Rd @@ -29,13 +29,14 @@ increasing length.} \item{weights}{Possibly a numeric vector giving edge weights. If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. If this is \code{NA} then no weights are used (even if -the graph has a \code{weight} attribute).} +the graph has a \code{weight} attribute). In a weighted graph, the length +of a path is the sum of the weights of its constituent edges.} \item{mode}{Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} -it will be considered. If \code{all}, the default, then the corresponding -undirected graph will be used, i.e. not directed paths are searched. This +it will be considered. If \code{all}, the default, then the graph is treated +as undirected, i.e. edge directions are not taken into account. This argument is ignored for undirected graphs.} } \value{ diff --git a/man/radius.Rd b/man/radius.Rd index f54e67ac4d..5fdfa592b4 100644 --- a/man/radius.Rd +++ b/man/radius.Rd @@ -4,25 +4,32 @@ \alias{radius} \title{Radius of a graph} \usage{ -radius(graph, mode = c("all", "out", "in", "total")) +radius(graph, ..., weights = NULL, mode = c("all", "out", "in", "total")) } \arguments{ \item{graph}{The input graph, it can be directed or undirected.} +\item{...}{These dots are for future extensions and must be empty.} + +\item{weights}{Possibly a numeric vector giving edge weights. If this is +\code{NULL} and the graph has a \code{weight} edge attribute, then the +attribute is used. If this is \code{NA} then no weights are used (even if +the graph has a \code{weight} attribute). In a weighted graph, the length +of a path is the sum of the weights of its constituent edges.} + \item{mode}{Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} -it will be considered. If \code{all}, the default, then the corresponding -undirected graph will be used, edge directions will be ignored. This +it will be considered. If \code{all}, the default, then the graph is treated +as undirected, i.e. edge directions are not taken into account. This argument is ignored for undirected graphs.} } \value{ A numeric scalar, the radius of the graph. } \description{ -The eccentricity of a vertex is its shortest path distance from the -farthest other node in the graph. The smallest eccentricity in a graph -is called its radius +The eccentricity of a vertex is its distance from the farthest other node +in the graph. The smallest eccentricity in a graph is called its radius. } \details{ The eccentricity of a vertex is calculated by measuring the shortest @@ -30,7 +37,7 @@ distance from (or to) the vertex, to (or from) all vertices in the graph, and taking the maximum. This implementation ignores vertex pairs that are in different -components. Isolate vertices have eccentricity zero. +components. Isolated vertices have eccentricity zero. } \examples{ g <- make_star(10, mode = "undirected") @@ -50,6 +57,7 @@ Other paths: \code{\link{all_simple_paths}()}, \code{\link{diameter}()}, \code{\link{distance_table}()}, -\code{\link{eccentricity}()} +\code{\link{eccentricity}()}, +\code{\link{graph_center}()} } \concept{paths} diff --git a/man/shortest.paths.Rd b/man/shortest.paths.Rd index 40394f4051..f4e4ca173f 100644 --- a/man/shortest.paths.Rd +++ b/man/shortest.paths.Rd @@ -27,14 +27,15 @@ is not required for \code{shortest_paths()}.} \item{mode}{Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. If \code{out} then the shortest paths \emph{from} the vertex, if \verb{in} then \emph{to} -it will be considered. If \code{all}, the default, then the corresponding -undirected graph will be used, i.e. not directed paths are searched. This +it will be considered. If \code{all}, the default, then the graph is treated +as undirected, i.e. edge directions are not taken into account. This argument is ignored for undirected graphs.} \item{weights}{Possibly a numeric vector giving edge weights. If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. If this is \code{NA} then no weights are used (even if -the graph has a \code{weight} attribute).} +the graph has a \code{weight} attribute). In a weighted graph, the length +of a path is the sum of the weights of its constituent edges.} \item{algorithm}{Which algorithm to use for the calculation. By default igraph tries to select the fastest suitable algorithm. If there are no diff --git a/man/voronoi_cells.Rd b/man/voronoi_cells.Rd index ffd2619e51..8c0d733652 100644 --- a/man/voronoi_cells.Rd +++ b/man/voronoi_cells.Rd @@ -23,7 +23,8 @@ voronoi_cells( \item{weights}{Possibly a numeric vector giving edge weights. If this is \code{NULL} and the graph has a \code{weight} edge attribute, then the attribute is used. If this is \code{NA} then no weights are used (even if -the graph has a \code{weight} attribute).} +the graph has a \code{weight} attribute). In a weighted graph, the length +of a path is the sum of the weights of its constituent edges.} \item{mode}{Character string. In directed graphs, whether to compute distances from generator vertices to other vertices (\code{"out"}), to diff --git a/src/cpp11.cpp b/src/cpp11.cpp index 24cf10d030..2880595c59 100644 --- a/src/cpp11.cpp +++ b/src/cpp11.cpp @@ -22,465 +22,462 @@ extern "C" SEXP _igraph_getsphere(SEXP spos, SEXP sradius, SEXP scolor, SEXP lig extern "C" { /* .Call calls */ -extern SEXP R_igraph_add_edges(SEXP, SEXP); -extern SEXP R_igraph_add_env(SEXP); -extern SEXP R_igraph_add_myid_to_env(SEXP); -extern SEXP R_igraph_add_version_to_env(SEXP); -extern SEXP R_igraph_add_vertices(SEXP, SEXP); -extern SEXP R_igraph_address(SEXP); -extern SEXP R_igraph_adhesion(SEXP, SEXP); -extern SEXP R_igraph_adjacency(SEXP, SEXP, SEXP); -extern SEXP R_igraph_adjacency_spectral_embedding(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_adjacent_triangles(SEXP, SEXP); -extern SEXP R_igraph_adjacent_vertices(SEXP, SEXP, SEXP); -extern SEXP R_igraph_adjlist(SEXP, SEXP, SEXP); -extern SEXP R_igraph_all_minimal_st_separators(SEXP); -extern SEXP R_igraph_all_st_cuts(SEXP, SEXP, SEXP); -extern SEXP R_igraph_all_st_mincuts(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_are_adjacent(SEXP, SEXP, SEXP); -extern SEXP R_igraph_arpack(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_arpack_unpack_complex(SEXP, SEXP, SEXP); -extern SEXP R_igraph_articulation_points(SEXP); -extern SEXP R_igraph_assortativity(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_assortativity_degree(SEXP, SEXP); -extern SEXP R_igraph_assortativity_nominal(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_asymmetric_preference_game(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_atlas(SEXP); -extern SEXP R_igraph_authority_score(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_automorphism_group(SEXP, SEXP, SEXP); -extern SEXP R_igraph_average_local_efficiency(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_average_path_length_dijkstra(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_avg_nearest_neighbor_degree(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_barabasi_aging_game(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_barabasi_game(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_betweenness_cutoff(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_betweenness_subset(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_bfs(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_bfs_simple(SEXP, SEXP, SEXP); -extern SEXP R_igraph_biadjacency(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_bibcoupling(SEXP, SEXP); -extern SEXP R_igraph_biconnected_components(SEXP); -extern SEXP R_igraph_bipartite_game(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_bipartite_game_gnm(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_bipartite_game_gnp(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_bipartite_projection(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_bipartite_projection_size(SEXP, SEXP); -extern SEXP R_igraph_bridges(SEXP); -extern SEXP R_igraph_callaway_traits_game(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_canonical_permutation(SEXP, SEXP, SEXP); -extern SEXP R_igraph_centralization(SEXP, SEXP, SEXP); -extern SEXP R_igraph_centralization_betweenness(SEXP, SEXP, SEXP); -extern SEXP R_igraph_centralization_betweenness_tmax(SEXP, SEXP, SEXP); -extern SEXP R_igraph_centralization_closeness(SEXP, SEXP, SEXP); -extern SEXP R_igraph_centralization_closeness_tmax(SEXP, SEXP, SEXP); -extern SEXP R_igraph_centralization_degree(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_centralization_degree_tmax(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_centralization_eigenvector_centrality(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_centralization_eigenvector_centrality_tmax(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_circulant(SEXP, SEXP, SEXP); -extern SEXP R_igraph_cited_type_game(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_citing_cited_type_game(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_clique_number(SEXP); -extern SEXP R_igraph_clique_size_hist(SEXP, SEXP, SEXP); -extern SEXP R_igraph_cliques(SEXP, SEXP, SEXP); -extern SEXP R_igraph_closeness_cutoff(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_cocitation(SEXP, SEXP); -extern SEXP R_igraph_cohesion(SEXP, SEXP); -extern SEXP R_igraph_cohesive_blocks(SEXP); -extern SEXP R_igraph_community_edge_betweenness(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_community_fastgreedy(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_community_fluid_communities(SEXP, SEXP); -extern SEXP R_igraph_community_infomap(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_community_label_propagation(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_community_leading_eigenvector(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_community_leiden(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_community_multilevel(SEXP, SEXP, SEXP); -extern SEXP R_igraph_community_optimal_modularity(SEXP, SEXP); -extern SEXP R_igraph_community_to_membership2(SEXP, SEXP, SEXP); -extern SEXP R_igraph_compare_communities(SEXP, SEXP, SEXP); -extern SEXP R_igraph_complementer(SEXP, SEXP); -extern SEXP R_igraph_compose(SEXP, SEXP, SEXP); -extern SEXP R_igraph_connect_neighborhood(SEXP, SEXP, SEXP); -extern SEXP R_igraph_connected_components(SEXP, SEXP); -extern SEXP R_igraph_constraint(SEXP, SEXP, SEXP); -extern SEXP R_igraph_contract_vertices(SEXP, SEXP, SEXP); -extern SEXP R_igraph_convex_hull(SEXP); -extern SEXP R_igraph_copy(SEXP); -extern SEXP R_igraph_copy_env(SEXP); -extern SEXP R_igraph_copy_from(SEXP); -extern SEXP R_igraph_copy_to(SEXP); -extern SEXP R_igraph_coreness(SEXP, SEXP); -extern SEXP R_igraph_correlated_game(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_correlated_pair_game(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_count_automorphisms(SEXP, SEXP, SEXP); -extern SEXP R_igraph_count_isomorphisms_vf2(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_count_multiple(SEXP, SEXP); -extern SEXP R_igraph_count_subisomorphisms_vf2(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_create(SEXP, SEXP, SEXP); -extern SEXP R_igraph_create_bipartite(SEXP, SEXP, SEXP); -extern SEXP R_igraph_de_bruijn(SEXP, SEXP); -extern SEXP R_igraph_decompose(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_degree(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_degree_correlation_vector(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_degree_sequence_game(SEXP, SEXP, SEXP); -extern SEXP R_igraph_delete_edges(SEXP, SEXP); -extern SEXP R_igraph_delete_vertices(SEXP, SEXP); -extern SEXP R_igraph_delete_vertices_idx(SEXP, SEXP); -extern SEXP R_igraph_density(SEXP, SEXP); -extern SEXP R_igraph_deterministic_optimal_imitation(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_dfs(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_diameter(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_difference(SEXP, SEXP); -extern SEXP R_igraph_dim_select(SEXP); -extern SEXP R_igraph_disjoint_union(SEXP); -extern SEXP R_igraph_distances(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_distances_bellman_ford(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_distances_cutoff(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_distances_dijkstra(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_distances_dijkstra_cutoff(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_distances_floyd_warshall(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_distances_johnson(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_diversity(SEXP, SEXP, SEXP); -extern SEXP R_igraph_dominator_tree(SEXP, SEXP, SEXP); -extern SEXP R_igraph_dot_product_game(SEXP, SEXP); -extern SEXP R_igraph_dyad_census(SEXP); -extern SEXP R_igraph_ecc(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_eccentricity(SEXP, SEXP, SEXP); -extern SEXP R_igraph_eccentricity_dijkstra(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_ecount(SEXP); -extern SEXP R_igraph_edge_betweenness_cutoff(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_edge_betweenness_subset(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_edge_connectivity(SEXP, SEXP); -extern SEXP R_igraph_edge_disjoint_paths(SEXP, SEXP, SEXP); -extern SEXP R_igraph_edges(SEXP, SEXP); -extern SEXP R_igraph_eigen_adjacency(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_eigenvector_centrality(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_empty(SEXP, SEXP); -extern SEXP R_igraph_erdos_renyi_game(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_es_adj(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_es_pairs(SEXP, SEXP, SEXP); -extern SEXP R_igraph_es_path(SEXP, SEXP, SEXP); -extern SEXP R_igraph_establishment_game(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_eulerian_cycle(SEXP); -extern SEXP R_igraph_eulerian_path(SEXP); -extern SEXP R_igraph_even_tarjan_reduction(SEXP); -extern SEXP R_igraph_extended_chordal_ring(SEXP, SEXP, SEXP); -extern SEXP R_igraph_famous(SEXP); -extern SEXP R_igraph_farthest_points(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_feedback_arc_set(SEXP, SEXP, SEXP); +extern SEXP R_igraph_add_edges(void *, void *); +extern SEXP R_igraph_add_env(void *); +extern SEXP R_igraph_add_myid_to_env(void *); +extern SEXP R_igraph_add_version_to_env(void *); +extern SEXP R_igraph_add_vertices(void *, void *); +extern SEXP R_igraph_address(void *); +extern SEXP R_igraph_adhesion(void *, void *); +extern SEXP R_igraph_adjacency(void *, void *, void *); +extern SEXP R_igraph_adjacency_spectral_embedding(void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_adjacent_triangles(void *, void *); +extern SEXP R_igraph_adjacent_vertices(void *, void *, void *); +extern SEXP R_igraph_adjlist(void *, void *, void *); +extern SEXP R_igraph_all_minimal_st_separators(void *); +extern SEXP R_igraph_all_st_cuts(void *, void *, void *); +extern SEXP R_igraph_all_st_mincuts(void *, void *, void *, void *); +extern SEXP R_igraph_are_adjacent(void *, void *, void *); +extern SEXP R_igraph_arpack(void *, void *, void *, void *, void *); +extern SEXP R_igraph_arpack_unpack_complex(void *, void *, void *); +extern SEXP R_igraph_articulation_points(void *); +extern SEXP R_igraph_assortativity(void *, void *, void *, void *, void *); +extern SEXP R_igraph_assortativity_degree(void *, void *); +extern SEXP R_igraph_assortativity_nominal(void *, void *, void *, void *); +extern SEXP R_igraph_asymmetric_preference_game(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_atlas(void *); +extern SEXP R_igraph_authority_score(void *, void *, void *, void *); +extern SEXP R_igraph_automorphism_group(void *, void *, void *); +extern SEXP R_igraph_average_local_efficiency(void *, void *, void *, void *); +extern SEXP R_igraph_average_path_length_dijkstra(void *, void *, void *, void *); +extern SEXP R_igraph_avg_nearest_neighbor_degree(void *, void *, void *, void *, void *); +extern SEXP R_igraph_barabasi_aging_game(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_barabasi_game(void *, void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_betweenness_cutoff(void *, void *, void *, void *, void *); +extern SEXP R_igraph_betweenness_subset(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_bfs(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_bfs_simple(void *, void *, void *); +extern SEXP R_igraph_biadjacency(void *, void *, void *, void *); +extern SEXP R_igraph_bibcoupling(void *, void *); +extern SEXP R_igraph_biconnected_components(void *); +extern SEXP R_igraph_bipartite_game(void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_bipartite_game_gnm(void *, void *, void *, void *, void *); +extern SEXP R_igraph_bipartite_game_gnp(void *, void *, void *, void *, void *); +extern SEXP R_igraph_bipartite_projection(void *, void *, void *, void *); +extern SEXP R_igraph_bipartite_projection_size(void *, void *); +extern SEXP R_igraph_bridges(void *); +extern SEXP R_igraph_callaway_traits_game(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_canonical_permutation(void *, void *, void *); +extern SEXP R_igraph_centralization(void *, void *, void *); +extern SEXP R_igraph_centralization_betweenness(void *, void *, void *); +extern SEXP R_igraph_centralization_betweenness_tmax(void *, void *, void *); +extern SEXP R_igraph_centralization_closeness(void *, void *, void *); +extern SEXP R_igraph_centralization_closeness_tmax(void *, void *, void *); +extern SEXP R_igraph_centralization_degree(void *, void *, void *, void *); +extern SEXP R_igraph_centralization_degree_tmax(void *, void *, void *, void *); +extern SEXP R_igraph_centralization_eigenvector_centrality(void *, void *, void *, void *, void *); +extern SEXP R_igraph_centralization_eigenvector_centrality_tmax(void *, void *, void *, void *); +extern SEXP R_igraph_circulant(void *, void *, void *); +extern SEXP R_igraph_cited_type_game(void *, void *, void *, void *, void *); +extern SEXP R_igraph_citing_cited_type_game(void *, void *, void *, void *, void *); +extern SEXP R_igraph_clique_number(void *); +extern SEXP R_igraph_clique_size_hist(void *, void *, void *); +extern SEXP R_igraph_cliques(void *, void *, void *); +extern SEXP R_igraph_closeness_cutoff(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_cocitation(void *, void *); +extern SEXP R_igraph_cohesion(void *, void *); +extern SEXP R_igraph_cohesive_blocks(void *); +extern SEXP R_igraph_community_edge_betweenness(void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_community_fastgreedy(void *, void *, void *, void *, void *); +extern SEXP R_igraph_community_fluid_communities(void *, void *); +extern SEXP R_igraph_community_infomap(void *, void *, void *, void *); +extern SEXP R_igraph_community_label_propagation(void *, void *, void *, void *, void *); +extern SEXP R_igraph_community_leading_eigenvector(void *, void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_community_leiden(void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_community_multilevel(void *, void *, void *); +extern SEXP R_igraph_community_optimal_modularity(void *, void *); +extern SEXP R_igraph_community_to_membership2(void *, void *, void *); +extern SEXP R_igraph_compare_communities(void *, void *, void *); +extern SEXP R_igraph_complementer(void *, void *); +extern SEXP R_igraph_compose(void *, void *, void *); +extern SEXP R_igraph_connect_neighborhood(void *, void *, void *); +extern SEXP R_igraph_connected_components(void *, void *); +extern SEXP R_igraph_constraint(void *, void *, void *); +extern SEXP R_igraph_contract_vertices(void *, void *, void *); +extern SEXP R_igraph_convex_hull(void *); +extern SEXP R_igraph_copy(void *); +extern SEXP R_igraph_copy_env(void *); +extern SEXP R_igraph_copy_from(void *); +extern SEXP R_igraph_copy_to(void *); +extern SEXP R_igraph_coreness(void *, void *); +extern SEXP R_igraph_correlated_game(void *, void *, void *, void *); +extern SEXP R_igraph_correlated_pair_game(void *, void *, void *, void *, void *); +extern SEXP R_igraph_count_automorphisms(void *, void *, void *); +extern SEXP R_igraph_count_isomorphisms_vf2(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_count_multiple(void *, void *); +extern SEXP R_igraph_count_subisomorphisms_vf2(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_create(void *, void *, void *); +extern SEXP R_igraph_create_bipartite(void *, void *, void *); +extern SEXP R_igraph_de_bruijn(void *, void *); +extern SEXP R_igraph_decompose(void *, void *, void *, void *); +extern SEXP R_igraph_degree(void *, void *, void *, void *); +extern SEXP R_igraph_degree_correlation_vector(void *, void *, void *, void *, void *); +extern SEXP R_igraph_degree_sequence_game(void *, void *, void *); +extern SEXP R_igraph_delete_edges(void *, void *); +extern SEXP R_igraph_delete_vertices(void *, void *); +extern SEXP R_igraph_delete_vertices_idx(void *, void *); +extern SEXP R_igraph_density(void *, void *); +extern SEXP R_igraph_deterministic_optimal_imitation(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_dfs(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_diameter(void *, void *, void *, void *); +extern SEXP R_igraph_difference(void *, void *); +extern SEXP R_igraph_dim_select(void *); +extern SEXP R_igraph_disjoint_union(void *); +extern SEXP R_igraph_distances(void *, void *, void *, void *); +extern SEXP R_igraph_distances_bellman_ford(void *, void *, void *, void *, void *); +extern SEXP R_igraph_distances_cutoff(void *, void *, void *, void *, void *); +extern SEXP R_igraph_distances_dijkstra(void *, void *, void *, void *, void *); +extern SEXP R_igraph_distances_dijkstra_cutoff(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_distances_floyd_warshall(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_distances_johnson(void *, void *, void *, void *); +extern SEXP R_igraph_diversity(void *, void *, void *); +extern SEXP R_igraph_dominator_tree(void *, void *, void *); +extern SEXP R_igraph_dot_product_game(void *, void *); +extern SEXP R_igraph_dyad_census(void *); +extern SEXP R_igraph_ecc(void *, void *, void *, void *, void *); +extern SEXP R_igraph_eccentricity_dijkstra(void *, void *, void *, void *); +extern SEXP R_igraph_ecount(void *); +extern SEXP R_igraph_edge_betweenness_cutoff(void *, void *, void *, void *); +extern SEXP R_igraph_edge_betweenness_subset(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_edge_connectivity(void *, void *); +extern SEXP R_igraph_edge_disjoint_paths(void *, void *, void *); +extern SEXP R_igraph_edges(void *, void *); +extern SEXP R_igraph_eigen_adjacency(void *, void *, void *, void *); +extern SEXP R_igraph_eigenvector_centrality(void *, void *, void *, void *, void *); +extern SEXP R_igraph_empty(void *, void *); +extern SEXP R_igraph_erdos_renyi_game(void *, void *, void *, void *, void *); +extern SEXP R_igraph_es_adj(void *, void *, void *, void *); +extern SEXP R_igraph_es_pairs(void *, void *, void *); +extern SEXP R_igraph_es_path(void *, void *, void *); +extern SEXP R_igraph_establishment_game(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_eulerian_cycle(void *); +extern SEXP R_igraph_eulerian_path(void *); +extern SEXP R_igraph_even_tarjan_reduction(void *); +extern SEXP R_igraph_extended_chordal_ring(void *, void *, void *); +extern SEXP R_igraph_famous(void *); +extern SEXP R_igraph_farthest_points(void *, void *, void *, void *); +extern SEXP R_igraph_feedback_arc_set(void *, void *, void *); extern SEXP R_igraph_finalizer(void); -extern SEXP R_igraph_forest_fire_game(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_from_hrg_dendrogram(SEXP); -extern SEXP R_igraph_from_prufer(SEXP); -extern SEXP R_igraph_full(SEXP, SEXP, SEXP); -extern SEXP R_igraph_full_bipartite(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_full_citation(SEXP, SEXP); -extern SEXP R_igraph_full_multipartite(SEXP, SEXP, SEXP); -extern SEXP R_igraph_fundamental_cycles(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_generalized_petersen(SEXP, SEXP); -extern SEXP R_igraph_get_adjacency(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_adjedgelist(SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_adjlist(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_all_eids_between(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_all_shortest_paths(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_all_shortest_paths_dijkstra(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_all_simple_paths(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_all_simple_paths_pp(SEXP); -extern SEXP R_igraph_get_attr_mode(SEXP, SEXP); -extern SEXP R_igraph_get_biadjacency(SEXP, SEXP); -extern SEXP R_igraph_get_diameter(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_edge(SEXP, SEXP); -extern SEXP R_igraph_get_edgelist(SEXP, SEXP); -extern SEXP R_igraph_get_eids(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_graph_id(SEXP); -extern SEXP R_igraph_get_isomorphisms_vf2(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_k_shortest_paths(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_laplacian(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_laplacian_sparse(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_shortest_path(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_shortest_path_bellman_ford(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_shortest_path_dijkstra(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_shortest_paths(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_stochastic(SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_stochastic_sparse(SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_subisomorphisms_vf2(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_widest_path(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_widest_paths(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_girth(SEXP, SEXP); -extern SEXP R_igraph_global_efficiency(SEXP, SEXP, SEXP); -extern SEXP R_igraph_gomory_hu_tree(SEXP, SEXP); -extern SEXP R_igraph_graph_center(SEXP, SEXP); -extern SEXP R_igraph_graph_center_dijkstra(SEXP, SEXP, SEXP); -extern SEXP R_igraph_graph_count(SEXP, SEXP); -extern SEXP R_igraph_graph_power(SEXP, SEXP, SEXP); -extern SEXP R_igraph_graph_version(SEXP); -extern SEXP R_igraph_graphlets(SEXP, SEXP, SEXP); -extern SEXP R_igraph_graphlets_candidate_basis(SEXP, SEXP); -extern SEXP R_igraph_graphlets_project(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_grg_game(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_growing_random_game(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_harmonic_centrality_cutoff(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_has_loop(SEXP); -extern SEXP R_igraph_has_multiple(SEXP); -extern SEXP R_igraph_has_mutual(SEXP, SEXP); -extern SEXP R_igraph_hrg_consensus(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_hrg_create(SEXP, SEXP); -extern SEXP R_igraph_hrg_fit(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_hrg_game(SEXP); -extern SEXP R_igraph_hrg_predict(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_hrg_resize(SEXP, SEXP); -extern SEXP R_igraph_hrg_sample(SEXP); -extern SEXP R_igraph_hrg_sample_many(SEXP, SEXP); -extern SEXP R_igraph_hrg_size(SEXP); -extern SEXP R_igraph_hsbm_game(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_hsbm_list_game(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_hub_and_authority_scores(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_hub_score(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_i_levc_arp(SEXP, SEXP, SEXP); -extern SEXP R_igraph_identical_graphs(SEXP, SEXP, SEXP); -extern SEXP R_igraph_incident(SEXP, SEXP, SEXP); -extern SEXP R_igraph_incident_edges(SEXP, SEXP, SEXP); -extern SEXP R_igraph_independence_number(SEXP); -extern SEXP R_igraph_independent_vertex_sets(SEXP, SEXP, SEXP); -extern SEXP R_igraph_induced_subgraph(SEXP, SEXP, SEXP); -extern SEXP R_igraph_induced_subgraph_map(SEXP, SEXP, SEXP); -extern SEXP R_igraph_intersection(SEXP, SEXP); -extern SEXP R_igraph_is_acyclic(SEXP); -extern SEXP R_igraph_is_biconnected(SEXP); -extern SEXP R_igraph_is_bipartite(SEXP); -extern SEXP R_igraph_is_chordal(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_is_complete(SEXP); -extern SEXP R_igraph_is_connected(SEXP, SEXP); -extern SEXP R_igraph_is_dag(SEXP); -extern SEXP R_igraph_is_directed(SEXP); -extern SEXP R_igraph_is_eulerian(SEXP); -extern SEXP R_igraph_is_forest(SEXP, SEXP); -extern SEXP R_igraph_is_graphical(SEXP, SEXP, SEXP); -extern SEXP R_igraph_is_loop(SEXP, SEXP); -extern SEXP R_igraph_is_matching(SEXP, SEXP, SEXP); -extern SEXP R_igraph_is_maximal_matching(SEXP, SEXP, SEXP); -extern SEXP R_igraph_is_minimal_separator(SEXP, SEXP); -extern SEXP R_igraph_is_multiple(SEXP, SEXP); -extern SEXP R_igraph_is_mutual(SEXP, SEXP, SEXP); -extern SEXP R_igraph_is_perfect(SEXP); -extern SEXP R_igraph_is_separator(SEXP, SEXP); -extern SEXP R_igraph_is_simple(SEXP); -extern SEXP R_igraph_is_tree(SEXP, SEXP); -extern SEXP R_igraph_isoclass(SEXP); -extern SEXP R_igraph_isoclass_create(SEXP, SEXP, SEXP); -extern SEXP R_igraph_isoclass_subgraph(SEXP, SEXP); -extern SEXP R_igraph_isomorphic(SEXP, SEXP); -extern SEXP R_igraph_isomorphic_bliss(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_isomorphic_vf2(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_join(SEXP, SEXP); -extern SEXP R_igraph_joint_degree_distribution(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_joint_degree_matrix(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_joint_type_distribution(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_k_regular_game(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_kary_tree(SEXP, SEXP, SEXP); -extern SEXP R_igraph_kautz(SEXP, SEXP); -extern SEXP R_igraph_laplacian(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_laplacian_spectral_embedding(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_largest_cliques(SEXP); -extern SEXP R_igraph_largest_independent_vertex_sets(SEXP); -extern SEXP R_igraph_largest_weighted_cliques(SEXP, SEXP); -extern SEXP R_igraph_lastcit_game(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_lattice(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_bipartite(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_circle(SEXP, SEXP); -extern SEXP R_igraph_layout_davidson_harel(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_drl(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_drl_3d(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_fruchterman_reingold(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_fruchterman_reingold_3d(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_gem(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_graphopt(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_grid(SEXP, SEXP); -extern SEXP R_igraph_layout_grid_3d(SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_kamada_kawai(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_kamada_kawai_3d(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_lgl(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_mds(SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_merge_dla(SEXP, SEXP); -extern SEXP R_igraph_layout_random(SEXP); -extern SEXP R_igraph_layout_random_3d(SEXP); -extern SEXP R_igraph_layout_reingold_tilford(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_sphere(SEXP); -extern SEXP R_igraph_layout_star(SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_sugiyama(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_umap(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_umap_3d(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_layout_umap_compute_weights(SEXP, SEXP, SEXP); -extern SEXP R_igraph_lcf_vector(SEXP, SEXP, SEXP); -extern SEXP R_igraph_linegraph(SEXP); -extern SEXP R_igraph_list_triangles(SEXP); -extern SEXP R_igraph_local_efficiency(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_local_scan_0(SEXP, SEXP, SEXP); -extern SEXP R_igraph_local_scan_0_them(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_local_scan_1_ecount(SEXP, SEXP, SEXP); -extern SEXP R_igraph_local_scan_1_ecount_them(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_local_scan_k_ecount(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_local_scan_k_ecount_them(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_local_scan_neighborhood_ecount(SEXP, SEXP, SEXP); -extern SEXP R_igraph_local_scan_subset_ecount(SEXP, SEXP, SEXP); -extern SEXP R_igraph_make_weak_ref(SEXP, SEXP, SEXP); -extern SEXP R_igraph_maxflow(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_maximal_cliques(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_maximal_cliques_count(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_maximal_cliques_file(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_maximal_cliques_hist(SEXP, SEXP, SEXP); -extern SEXP R_igraph_maximal_independent_vertex_sets(SEXP); -extern SEXP R_igraph_maximum_bipartite_matching(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_maximum_cardinality_search(SEXP); -extern SEXP R_igraph_mincut(SEXP, SEXP); -extern SEXP R_igraph_mincut_value(SEXP, SEXP); -extern SEXP R_igraph_minimum_cycle_basis(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_minimum_size_separators(SEXP); -extern SEXP R_igraph_minimum_spanning_tree_prim(SEXP, SEXP); -extern SEXP R_igraph_minimum_spanning_tree_unweighted(SEXP); -extern SEXP R_igraph_modularity(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_modularity_matrix(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_moran_process(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_motifs_randesu(SEXP, SEXP, SEXP); -extern SEXP R_igraph_motifs_randesu_estimate(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_motifs_randesu_no(SEXP, SEXP, SEXP); -extern SEXP R_igraph_mybracket2(SEXP, SEXP, SEXP); -extern SEXP R_igraph_mybracket2_copy(SEXP, SEXP, SEXP); -extern SEXP R_igraph_mybracket2_names(SEXP, SEXP, SEXP); -extern SEXP R_igraph_mybracket2_set(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_mybracket3_set(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_neighborhood(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_neighborhood_graphs(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_neighborhood_size(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_neighbors(SEXP, SEXP, SEXP); -extern SEXP R_igraph_no_components(SEXP, SEXP); -extern SEXP R_igraph_path_length_hist(SEXP, SEXP); -extern SEXP R_igraph_permute_vertices(SEXP, SEXP); -extern SEXP R_igraph_personalized_pagerank(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_personalized_pagerank_vs(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_power_law_fit(SEXP, SEXP, SEXP); -extern SEXP R_igraph_preference_game(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_pseudo_diameter(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_pseudo_diameter_dijkstra(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_radius(SEXP, SEXP); -extern SEXP R_igraph_radius_dijkstra(SEXP, SEXP, SEXP); -extern SEXP R_igraph_random_edge_walk(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_random_sample(SEXP, SEXP, SEXP); -extern SEXP R_igraph_random_spanning_tree(SEXP, SEXP); -extern SEXP R_igraph_random_walk(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_read_graph_dimacs(SEXP, SEXP); -extern SEXP R_igraph_read_graph_dl(SEXP, SEXP); -extern SEXP R_igraph_read_graph_edgelist(SEXP, SEXP, SEXP); -extern SEXP R_igraph_read_graph_gml(SEXP); -extern SEXP R_igraph_read_graph_graphdb(SEXP, SEXP); -extern SEXP R_igraph_read_graph_graphml(SEXP, SEXP); -extern SEXP R_igraph_read_graph_lgl(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_read_graph_ncol(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_read_graph_pajek(SEXP); -extern SEXP R_igraph_realize_bipartite_degree_sequence(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_realize_degree_sequence(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_recent_degree_aging_game(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_reciprocity(SEXP, SEXP, SEXP); -extern SEXP R_igraph_regular_tree(SEXP, SEXP, SEXP); -extern SEXP R_igraph_residual_graph(SEXP, SEXP, SEXP); -extern SEXP R_igraph_reverse_edges(SEXP, SEXP); -extern SEXP R_igraph_reverse_residual_graph(SEXP, SEXP, SEXP); -extern SEXP R_igraph_rewire(SEXP, SEXP, SEXP); -extern SEXP R_igraph_rewire_directed_edges(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_rewire_edges(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_ring(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_roots_for_tree_layout(SEXP, SEXP, SEXP); -extern SEXP R_igraph_roulette_wheel_imitation(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_running_mean(SEXP, SEXP); -extern SEXP R_igraph_sample_dirichlet(SEXP, SEXP); -extern SEXP R_igraph_sample_sphere_surface(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_sample_sphere_volume(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_sbm_game(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_set_verbose(SEXP); -extern SEXP R_igraph_shortest_paths(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_similarity_dice(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_similarity_dice_es(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_similarity_dice_pairs(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_similarity_inverse_log_weighted(SEXP, SEXP, SEXP); -extern SEXP R_igraph_similarity_jaccard(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_similarity_jaccard_es(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_similarity_jaccard_pairs(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_simple_interconnected_islands_game(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_simplify(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_simplify_and_colorize(SEXP); -extern SEXP R_igraph_sir(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_solve_lsap(SEXP, SEXP); -extern SEXP R_igraph_spanner(SEXP, SEXP, SEXP); -extern SEXP R_igraph_spinglass_community(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_spinglass_my_community(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_split_join_distance(SEXP, SEXP); -extern SEXP R_igraph_square_lattice(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_st_edge_connectivity(SEXP, SEXP, SEXP); -extern SEXP R_igraph_st_mincut(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_st_mincut_value(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_st_vertex_connectivity(SEXP, SEXP, SEXP); -extern SEXP R_igraph_star(SEXP, SEXP, SEXP); -extern SEXP R_igraph_static_fitness_game(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_static_power_law_game(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_stochastic_imitation(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_strength(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_subcomponent(SEXP, SEXP, SEXP); -extern SEXP R_igraph_subgraph_from_edges(SEXP, SEXP, SEXP); -extern SEXP R_igraph_subisomorphic(SEXP, SEXP); -extern SEXP R_igraph_subisomorphic_lad(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_subisomorphic_vf2(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_symmetric_tree(SEXP, SEXP); -extern SEXP R_igraph_to_directed(SEXP, SEXP); -extern SEXP R_igraph_to_prufer(SEXP); -extern SEXP R_igraph_to_undirected(SEXP, SEXP, SEXP); -extern SEXP R_igraph_topological_sorting(SEXP, SEXP); -extern SEXP R_igraph_transitive_closure_dag(SEXP); -extern SEXP R_igraph_transitivity_avglocal_undirected(SEXP, SEXP); -extern SEXP R_igraph_transitivity_barrat(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_transitivity_local_undirected(SEXP, SEXP, SEXP); -extern SEXP R_igraph_transitivity_local_undirected_all(SEXP, SEXP); -extern SEXP R_igraph_transitivity_undirected(SEXP, SEXP); -extern SEXP R_igraph_tree_from_parent_vector(SEXP, SEXP); -extern SEXP R_igraph_tree_game(SEXP, SEXP, SEXP); -extern SEXP R_igraph_triad_census(SEXP); -extern SEXP R_igraph_triangular_lattice(SEXP, SEXP, SEXP); -extern SEXP R_igraph_trussness(SEXP); -extern SEXP R_igraph_turan(SEXP, SEXP); -extern SEXP R_igraph_unfold_tree(SEXP, SEXP, SEXP); -extern SEXP R_igraph_union(SEXP, SEXP); -extern SEXP R_igraph_vcount(SEXP); -extern SEXP R_igraph_vertex_coloring_greedy(SEXP, SEXP); -extern SEXP R_igraph_vertex_connectivity(SEXP, SEXP); -extern SEXP R_igraph_vertex_disjoint_paths(SEXP, SEXP, SEXP); -extern SEXP R_igraph_vertex_path_from_edge_path(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_voronoi(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_vs_adj(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_vs_nei(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_walktrap_community(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_watts_strogatz_game(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_weak_ref_key(SEXP); -extern SEXP R_igraph_weak_ref_run_finalizer(SEXP); -extern SEXP R_igraph_weak_ref_value(SEXP); -extern SEXP R_igraph_weighted_adjacency(SEXP, SEXP, SEXP); -extern SEXP R_igraph_weighted_clique_number(SEXP, SEXP); -extern SEXP R_igraph_weighted_cliques(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_wheel(SEXP, SEXP, SEXP); -extern SEXP R_igraph_widest_path_widths_dijkstra(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_widest_path_widths_floyd_warshall(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_write_graph_dimacs(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_write_graph_dot(SEXP, SEXP); -extern SEXP R_igraph_write_graph_edgelist(SEXP, SEXP); -extern SEXP R_igraph_write_graph_gml(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_write_graph_graphml(SEXP, SEXP, SEXP); -extern SEXP R_igraph_write_graph_leda(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_write_graph_lgl(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_write_graph_ncol(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_write_graph_pajek(SEXP, SEXP); -extern SEXP UUID_gen(SEXP); -extern SEXP make_lazy(SEXP, SEXP, SEXP); -extern SEXP make_lazy_dots(SEXP, SEXP); -extern SEXP promise_env_(SEXP); -extern SEXP promise_expr_(SEXP); +extern SEXP R_igraph_forest_fire_game(void *, void *, void *, void *, void *); +extern SEXP R_igraph_from_hrg_dendrogram(void *); +extern SEXP R_igraph_from_prufer(void *); +extern SEXP R_igraph_full(void *, void *, void *); +extern SEXP R_igraph_full_bipartite(void *, void *, void *, void *); +extern SEXP R_igraph_full_citation(void *, void *); +extern SEXP R_igraph_full_multipartite(void *, void *, void *); +extern SEXP R_igraph_fundamental_cycles(void *, void *, void *, void *); +extern SEXP R_igraph_generalized_petersen(void *, void *); +extern SEXP R_igraph_get_adjacency(void *, void *, void *, void *); +extern SEXP R_igraph_get_adjedgelist(void *, void *, void *); +extern SEXP R_igraph_get_adjlist(void *, void *, void *, void *); +extern SEXP R_igraph_get_all_eids_between(void *, void *, void *, void *); +extern SEXP R_igraph_get_all_shortest_paths(void *, void *, void *, void *); +extern SEXP R_igraph_get_all_shortest_paths_dijkstra(void *, void *, void *, void *, void *); +extern SEXP R_igraph_get_all_simple_paths(void *, void *, void *, void *, void *); +extern SEXP R_igraph_get_all_simple_paths_pp(void *); +extern SEXP R_igraph_get_attr_mode(void *, void *); +extern SEXP R_igraph_get_biadjacency(void *, void *); +extern SEXP R_igraph_get_diameter(void *, void *, void *, void *); +extern SEXP R_igraph_get_edge(void *, void *); +extern SEXP R_igraph_get_edgelist(void *, void *); +extern SEXP R_igraph_get_eids(void *, void *, void *, void *); +extern SEXP R_igraph_get_graph_id(void *); +extern SEXP R_igraph_get_isomorphisms_vf2(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_get_k_shortest_paths(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_get_laplacian(void *, void *, void *, void *); +extern SEXP R_igraph_get_laplacian_sparse(void *, void *, void *, void *); +extern SEXP R_igraph_get_shortest_path(void *, void *, void *, void *); +extern SEXP R_igraph_get_shortest_path_bellman_ford(void *, void *, void *, void *, void *); +extern SEXP R_igraph_get_shortest_path_dijkstra(void *, void *, void *, void *, void *); +extern SEXP R_igraph_get_shortest_paths(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_get_stochastic(void *, void *, void *); +extern SEXP R_igraph_get_stochastic_sparse(void *, void *, void *); +extern SEXP R_igraph_get_subisomorphisms_vf2(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_get_widest_path(void *, void *, void *, void *, void *); +extern SEXP R_igraph_get_widest_paths(void *, void *, void *, void *, void *); +extern SEXP R_igraph_girth(void *, void *); +extern SEXP R_igraph_global_efficiency(void *, void *, void *); +extern SEXP R_igraph_gomory_hu_tree(void *, void *); +extern SEXP R_igraph_graph_center_dijkstra(void *, void *, void *); +extern SEXP R_igraph_graph_count(void *, void *); +extern SEXP R_igraph_graph_power(void *, void *, void *); +extern SEXP R_igraph_graph_version(void *); +extern SEXP R_igraph_graphlets(void *, void *, void *); +extern SEXP R_igraph_graphlets_candidate_basis(void *, void *); +extern SEXP R_igraph_graphlets_project(void *, void *, void *, void *, void *); +extern SEXP R_igraph_grg_game(void *, void *, void *, void *); +extern SEXP R_igraph_growing_random_game(void *, void *, void *, void *); +extern SEXP R_igraph_harmonic_centrality_cutoff(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_has_loop(void *); +extern SEXP R_igraph_has_multiple(void *); +extern SEXP R_igraph_has_mutual(void *, void *); +extern SEXP R_igraph_hrg_consensus(void *, void *, void *, void *); +extern SEXP R_igraph_hrg_create(void *, void *); +extern SEXP R_igraph_hrg_fit(void *, void *, void *, void *); +extern SEXP R_igraph_hrg_game(void *); +extern SEXP R_igraph_hrg_predict(void *, void *, void *, void *, void *); +extern SEXP R_igraph_hrg_resize(void *, void *); +extern SEXP R_igraph_hrg_sample(void *); +extern SEXP R_igraph_hrg_sample_many(void *, void *); +extern SEXP R_igraph_hrg_size(void *); +extern SEXP R_igraph_hsbm_game(void *, void *, void *, void *, void *); +extern SEXP R_igraph_hsbm_list_game(void *, void *, void *, void *, void *); +extern SEXP R_igraph_hub_and_authority_scores(void *, void *, void *, void *); +extern SEXP R_igraph_hub_score(void *, void *, void *, void *); +extern SEXP R_igraph_i_levc_arp(void *, void *, void *); +extern SEXP R_igraph_identical_graphs(void *, void *, void *); +extern SEXP R_igraph_incident(void *, void *, void *); +extern SEXP R_igraph_incident_edges(void *, void *, void *); +extern SEXP R_igraph_independence_number(void *); +extern SEXP R_igraph_independent_vertex_sets(void *, void *, void *); +extern SEXP R_igraph_induced_subgraph(void *, void *, void *); +extern SEXP R_igraph_induced_subgraph_map(void *, void *, void *); +extern SEXP R_igraph_intersection(void *, void *); +extern SEXP R_igraph_is_acyclic(void *); +extern SEXP R_igraph_is_biconnected(void *); +extern SEXP R_igraph_is_bipartite(void *); +extern SEXP R_igraph_is_chordal(void *, void *, void *, void *, void *); +extern SEXP R_igraph_is_complete(void *); +extern SEXP R_igraph_is_connected(void *, void *); +extern SEXP R_igraph_is_dag(void *); +extern SEXP R_igraph_is_directed(void *); +extern SEXP R_igraph_is_eulerian(void *); +extern SEXP R_igraph_is_forest(void *, void *); +extern SEXP R_igraph_is_graphical(void *, void *, void *); +extern SEXP R_igraph_is_loop(void *, void *); +extern SEXP R_igraph_is_matching(void *, void *, void *); +extern SEXP R_igraph_is_maximal_matching(void *, void *, void *); +extern SEXP R_igraph_is_minimal_separator(void *, void *); +extern SEXP R_igraph_is_multiple(void *, void *); +extern SEXP R_igraph_is_mutual(void *, void *, void *); +extern SEXP R_igraph_is_perfect(void *); +extern SEXP R_igraph_is_separator(void *, void *); +extern SEXP R_igraph_is_simple(void *); +extern SEXP R_igraph_is_tree(void *, void *); +extern SEXP R_igraph_isoclass(void *); +extern SEXP R_igraph_isoclass_create(void *, void *, void *); +extern SEXP R_igraph_isoclass_subgraph(void *, void *); +extern SEXP R_igraph_isomorphic(void *, void *); +extern SEXP R_igraph_isomorphic_bliss(void *, void *, void *, void *, void *); +extern SEXP R_igraph_isomorphic_vf2(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_join(void *, void *); +extern SEXP R_igraph_joint_degree_distribution(void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_joint_degree_matrix(void *, void *, void *, void *); +extern SEXP R_igraph_joint_type_distribution(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_k_regular_game(void *, void *, void *, void *); +extern SEXP R_igraph_kary_tree(void *, void *, void *); +extern SEXP R_igraph_kautz(void *, void *); +extern SEXP R_igraph_laplacian(void *, void *, void *, void *); +extern SEXP R_igraph_laplacian_spectral_embedding(void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_largest_cliques(void *); +extern SEXP R_igraph_largest_independent_vertex_sets(void *); +extern SEXP R_igraph_largest_weighted_cliques(void *, void *); +extern SEXP R_igraph_lastcit_game(void *, void *, void *, void *, void *); +extern SEXP R_igraph_lattice(void *, void *, void *, void *, void *); +extern SEXP R_igraph_layout_bipartite(void *, void *, void *, void *, void *); +extern SEXP R_igraph_layout_circle(void *, void *); +extern SEXP R_igraph_layout_davidson_harel(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_layout_drl(void *, void *, void *, void *, void *); +extern SEXP R_igraph_layout_drl_3d(void *, void *, void *, void *, void *); +extern SEXP R_igraph_layout_fruchterman_reingold(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_layout_fruchterman_reingold_3d(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_layout_gem(void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_layout_graphopt(void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_layout_grid(void *, void *); +extern SEXP R_igraph_layout_grid_3d(void *, void *, void *); +extern SEXP R_igraph_layout_kamada_kawai(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_layout_kamada_kawai_3d(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_layout_lgl(void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_layout_mds(void *, void *, void *); +extern SEXP R_igraph_layout_merge_dla(void *, void *); +extern SEXP R_igraph_layout_random(void *); +extern SEXP R_igraph_layout_random_3d(void *); +extern SEXP R_igraph_layout_reingold_tilford(void *, void *, void *, void *, void *); +extern SEXP R_igraph_layout_sphere(void *); +extern SEXP R_igraph_layout_star(void *, void *, void *); +extern SEXP R_igraph_layout_sugiyama(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_layout_umap(void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_layout_umap_3d(void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_layout_umap_compute_weights(void *, void *, void *); +extern SEXP R_igraph_lcf_vector(void *, void *, void *); +extern SEXP R_igraph_linegraph(void *); +extern SEXP R_igraph_list_triangles(void *); +extern SEXP R_igraph_local_efficiency(void *, void *, void *, void *, void *); +extern SEXP R_igraph_local_scan_0(void *, void *, void *); +extern SEXP R_igraph_local_scan_0_them(void *, void *, void *, void *); +extern SEXP R_igraph_local_scan_1_ecount(void *, void *, void *); +extern SEXP R_igraph_local_scan_1_ecount_them(void *, void *, void *, void *); +extern SEXP R_igraph_local_scan_k_ecount(void *, void *, void *, void *); +extern SEXP R_igraph_local_scan_k_ecount_them(void *, void *, void *, void *, void *); +extern SEXP R_igraph_local_scan_neighborhood_ecount(void *, void *, void *); +extern SEXP R_igraph_local_scan_subset_ecount(void *, void *, void *); +extern SEXP R_igraph_make_weak_ref(void *, void *, void *); +extern SEXP R_igraph_maxflow(void *, void *, void *, void *); +extern SEXP R_igraph_maximal_cliques(void *, void *, void *, void *); +extern SEXP R_igraph_maximal_cliques_count(void *, void *, void *, void *); +extern SEXP R_igraph_maximal_cliques_file(void *, void *, void *, void *, void *); +extern SEXP R_igraph_maximal_cliques_hist(void *, void *, void *); +extern SEXP R_igraph_maximal_independent_vertex_sets(void *); +extern SEXP R_igraph_maximum_bipartite_matching(void *, void *, void *, void *); +extern SEXP R_igraph_maximum_cardinality_search(void *); +extern SEXP R_igraph_mincut(void *, void *); +extern SEXP R_igraph_mincut_value(void *, void *); +extern SEXP R_igraph_minimum_cycle_basis(void *, void *, void *, void *, void *); +extern SEXP R_igraph_minimum_size_separators(void *); +extern SEXP R_igraph_minimum_spanning_tree_prim(void *, void *); +extern SEXP R_igraph_minimum_spanning_tree_unweighted(void *); +extern SEXP R_igraph_modularity(void *, void *, void *, void *, void *); +extern SEXP R_igraph_modularity_matrix(void *, void *, void *, void *); +extern SEXP R_igraph_moran_process(void *, void *, void *, void *, void *); +extern SEXP R_igraph_motifs_randesu(void *, void *, void *); +extern SEXP R_igraph_motifs_randesu_estimate(void *, void *, void *, void *, void *); +extern SEXP R_igraph_motifs_randesu_no(void *, void *, void *); +extern SEXP R_igraph_mybracket2(void *, void *, void *); +extern SEXP R_igraph_mybracket2_copy(void *, void *, void *); +extern SEXP R_igraph_mybracket2_names(void *, void *, void *); +extern SEXP R_igraph_mybracket2_set(void *, void *, void *, void *); +extern SEXP R_igraph_mybracket3_set(void *, void *, void *, void *, void *); +extern SEXP R_igraph_neighborhood(void *, void *, void *, void *, void *); +extern SEXP R_igraph_neighborhood_graphs(void *, void *, void *, void *, void *); +extern SEXP R_igraph_neighborhood_size(void *, void *, void *, void *, void *); +extern SEXP R_igraph_neighbors(void *, void *, void *); +extern SEXP R_igraph_no_components(void *, void *); +extern SEXP R_igraph_path_length_hist(void *, void *); +extern SEXP R_igraph_permute_vertices(void *, void *); +extern SEXP R_igraph_personalized_pagerank(void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_personalized_pagerank_vs(void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_power_law_fit(void *, void *, void *); +extern SEXP R_igraph_preference_game(void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_pseudo_diameter(void *, void *, void *, void *); +extern SEXP R_igraph_pseudo_diameter_dijkstra(void *, void *, void *, void *, void *); +extern SEXP R_igraph_radius_dijkstra(void *, void *, void *); +extern SEXP R_igraph_random_edge_walk(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_random_sample(void *, void *, void *); +extern SEXP R_igraph_random_spanning_tree(void *, void *); +extern SEXP R_igraph_random_walk(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_read_graph_dimacs(void *, void *); +extern SEXP R_igraph_read_graph_dl(void *, void *); +extern SEXP R_igraph_read_graph_edgelist(void *, void *, void *); +extern SEXP R_igraph_read_graph_gml(void *); +extern SEXP R_igraph_read_graph_graphdb(void *, void *); +extern SEXP R_igraph_read_graph_graphml(void *, void *); +extern SEXP R_igraph_read_graph_lgl(void *, void *, void *, void *); +extern SEXP R_igraph_read_graph_ncol(void *, void *, void *, void *, void *); +extern SEXP R_igraph_read_graph_pajek(void *); +extern SEXP R_igraph_realize_bipartite_degree_sequence(void *, void *, void *, void *); +extern SEXP R_igraph_realize_degree_sequence(void *, void *, void *, void *); +extern SEXP R_igraph_recent_degree_aging_game(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_reciprocity(void *, void *, void *); +extern SEXP R_igraph_regular_tree(void *, void *, void *); +extern SEXP R_igraph_residual_graph(void *, void *, void *); +extern SEXP R_igraph_reverse_edges(void *, void *); +extern SEXP R_igraph_reverse_residual_graph(void *, void *, void *); +extern SEXP R_igraph_rewire(void *, void *, void *); +extern SEXP R_igraph_rewire_directed_edges(void *, void *, void *, void *); +extern SEXP R_igraph_rewire_edges(void *, void *, void *, void *); +extern SEXP R_igraph_ring(void *, void *, void *, void *); +extern SEXP R_igraph_roots_for_tree_layout(void *, void *, void *); +extern SEXP R_igraph_roulette_wheel_imitation(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_running_mean(void *, void *); +extern SEXP R_igraph_sample_dirichlet(void *, void *); +extern SEXP R_igraph_sample_sphere_surface(void *, void *, void *, void *); +extern SEXP R_igraph_sample_sphere_volume(void *, void *, void *, void *); +extern SEXP R_igraph_sbm_game(void *, void *, void *, void *, void *); +extern SEXP R_igraph_set_verbose(void *); +extern SEXP R_igraph_shortest_paths(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_similarity_dice(void *, void *, void *, void *); +extern SEXP R_igraph_similarity_dice_es(void *, void *, void *, void *); +extern SEXP R_igraph_similarity_dice_pairs(void *, void *, void *, void *); +extern SEXP R_igraph_similarity_inverse_log_weighted(void *, void *, void *); +extern SEXP R_igraph_similarity_jaccard(void *, void *, void *, void *); +extern SEXP R_igraph_similarity_jaccard_es(void *, void *, void *, void *); +extern SEXP R_igraph_similarity_jaccard_pairs(void *, void *, void *, void *); +extern SEXP R_igraph_simple_interconnected_islands_game(void *, void *, void *, void *); +extern SEXP R_igraph_simplify(void *, void *, void *, void *); +extern SEXP R_igraph_simplify_and_colorize(void *); +extern SEXP R_igraph_sir(void *, void *, void *, void *); +extern SEXP R_igraph_solve_lsap(void *, void *); +extern SEXP R_igraph_spanner(void *, void *, void *); +extern SEXP R_igraph_spinglass_community(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_spinglass_my_community(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_split_join_distance(void *, void *); +extern SEXP R_igraph_square_lattice(void *, void *, void *, void *, void *); +extern SEXP R_igraph_st_edge_connectivity(void *, void *, void *); +extern SEXP R_igraph_st_mincut(void *, void *, void *, void *); +extern SEXP R_igraph_st_mincut_value(void *, void *, void *, void *); +extern SEXP R_igraph_st_vertex_connectivity(void *, void *, void *); +extern SEXP R_igraph_star(void *, void *, void *); +extern SEXP R_igraph_static_fitness_game(void *, void *, void *, void *, void *); +extern SEXP R_igraph_static_power_law_game(void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_stochastic_imitation(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_strength(void *, void *, void *, void *, void *); +extern SEXP R_igraph_subcomponent(void *, void *, void *); +extern SEXP R_igraph_subgraph_from_edges(void *, void *, void *); +extern SEXP R_igraph_subisomorphic(void *, void *); +extern SEXP R_igraph_subisomorphic_lad(void *, void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_subisomorphic_vf2(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_symmetric_tree(void *, void *); +extern SEXP R_igraph_to_directed(void *, void *); +extern SEXP R_igraph_to_prufer(void *); +extern SEXP R_igraph_to_undirected(void *, void *, void *); +extern SEXP R_igraph_topological_sorting(void *, void *); +extern SEXP R_igraph_transitive_closure_dag(void *); +extern SEXP R_igraph_transitivity_avglocal_undirected(void *, void *); +extern SEXP R_igraph_transitivity_barrat(void *, void *, void *, void *); +extern SEXP R_igraph_transitivity_local_undirected(void *, void *, void *); +extern SEXP R_igraph_transitivity_local_undirected_all(void *, void *); +extern SEXP R_igraph_transitivity_undirected(void *, void *); +extern SEXP R_igraph_tree_from_parent_vector(void *, void *); +extern SEXP R_igraph_tree_game(void *, void *, void *); +extern SEXP R_igraph_triad_census(void *); +extern SEXP R_igraph_triangular_lattice(void *, void *, void *); +extern SEXP R_igraph_trussness(void *); +extern SEXP R_igraph_turan(void *, void *); +extern SEXP R_igraph_unfold_tree(void *, void *, void *); +extern SEXP R_igraph_union(void *, void *); +extern SEXP R_igraph_vcount(void *); +extern SEXP R_igraph_vertex_coloring_greedy(void *, void *); +extern SEXP R_igraph_vertex_connectivity(void *, void *); +extern SEXP R_igraph_vertex_disjoint_paths(void *, void *, void *); +extern SEXP R_igraph_vertex_path_from_edge_path(void *, void *, void *, void *); +extern SEXP R_igraph_voronoi(void *, void *, void *, void *, void *); +extern SEXP R_igraph_vs_adj(void *, void *, void *, void *); +extern SEXP R_igraph_vs_nei(void *, void *, void *, void *); +extern SEXP R_igraph_walktrap_community(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_watts_strogatz_game(void *, void *, void *, void *, void *, void *); +extern SEXP R_igraph_weak_ref_key(void *); +extern SEXP R_igraph_weak_ref_run_finalizer(void *); +extern SEXP R_igraph_weak_ref_value(void *); +extern SEXP R_igraph_weighted_adjacency(void *, void *, void *); +extern SEXP R_igraph_weighted_clique_number(void *, void *); +extern SEXP R_igraph_weighted_cliques(void *, void *, void *, void *, void *); +extern SEXP R_igraph_wheel(void *, void *, void *); +extern SEXP R_igraph_widest_path_widths_dijkstra(void *, void *, void *, void *, void *); +extern SEXP R_igraph_widest_path_widths_floyd_warshall(void *, void *, void *, void *, void *); +extern SEXP R_igraph_write_graph_dimacs(void *, void *, void *, void *, void *); +extern SEXP R_igraph_write_graph_dot(void *, void *); +extern SEXP R_igraph_write_graph_edgelist(void *, void *); +extern SEXP R_igraph_write_graph_gml(void *, void *, void *, void *); +extern SEXP R_igraph_write_graph_graphml(void *, void *, void *); +extern SEXP R_igraph_write_graph_leda(void *, void *, void *, void *); +extern SEXP R_igraph_write_graph_lgl(void *, void *, void *, void *, void *); +extern SEXP R_igraph_write_graph_ncol(void *, void *, void *, void *); +extern SEXP R_igraph_write_graph_pajek(void *, void *); +extern SEXP UUID_gen(void *); +extern SEXP make_lazy(void *, void *, void *); +extern SEXP make_lazy_dots(void *, void *); +extern SEXP promise_env_(void *); +extern SEXP promise_expr_(void *); static const R_CallMethodDef CallEntries[] = { {"R_igraph_add_edges", (DL_FUNC) &R_igraph_add_edges, 2}, @@ -606,7 +603,6 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_dot_product_game", (DL_FUNC) &R_igraph_dot_product_game, 2}, {"R_igraph_dyad_census", (DL_FUNC) &R_igraph_dyad_census, 1}, {"R_igraph_ecc", (DL_FUNC) &R_igraph_ecc, 5}, - {"R_igraph_eccentricity", (DL_FUNC) &R_igraph_eccentricity, 3}, {"R_igraph_eccentricity_dijkstra", (DL_FUNC) &R_igraph_eccentricity_dijkstra, 4}, {"R_igraph_ecount", (DL_FUNC) &R_igraph_ecount, 1}, {"R_igraph_edge_betweenness_cutoff", (DL_FUNC) &R_igraph_edge_betweenness_cutoff, 4}, @@ -670,7 +666,6 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_girth", (DL_FUNC) &R_igraph_girth, 2}, {"R_igraph_global_efficiency", (DL_FUNC) &R_igraph_global_efficiency, 3}, {"R_igraph_gomory_hu_tree", (DL_FUNC) &R_igraph_gomory_hu_tree, 2}, - {"R_igraph_graph_center", (DL_FUNC) &R_igraph_graph_center, 2}, {"R_igraph_graph_center_dijkstra", (DL_FUNC) &R_igraph_graph_center_dijkstra, 3}, {"R_igraph_graph_count", (DL_FUNC) &R_igraph_graph_count, 2}, {"R_igraph_graph_power", (DL_FUNC) &R_igraph_graph_power, 3}, @@ -823,7 +818,6 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_preference_game", (DL_FUNC) &R_igraph_preference_game, 7}, {"R_igraph_pseudo_diameter", (DL_FUNC) &R_igraph_pseudo_diameter, 4}, {"R_igraph_pseudo_diameter_dijkstra", (DL_FUNC) &R_igraph_pseudo_diameter_dijkstra, 5}, - {"R_igraph_radius", (DL_FUNC) &R_igraph_radius, 2}, {"R_igraph_radius_dijkstra", (DL_FUNC) &R_igraph_radius_dijkstra, 3}, {"R_igraph_random_edge_walk", (DL_FUNC) &R_igraph_random_edge_walk, 6}, {"R_igraph_random_sample", (DL_FUNC) &R_igraph_random_sample, 3}, diff --git a/src/rinterface.c b/src/rinterface.c index ea9a4f8fcd..12a9d2a527 100644 --- a/src/rinterface.c +++ b/src/rinterface.c @@ -4890,42 +4890,6 @@ SEXP R_igraph_contract_vertices(SEXP graph, SEXP mapping, SEXP vertex_attr_comb) return(r_result); } -/*-------------------------------------------/ -/ igraph_eccentricity / -/-------------------------------------------*/ -SEXP R_igraph_eccentricity(SEXP graph, SEXP vids, SEXP mode) { - /* Declarations */ - igraph_t c_graph; - igraph_vector_t c_res; - igraph_vs_t c_vids; - igraph_neimode_t c_mode; - SEXP res; - - SEXP r_result; - /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - if (0 != igraph_vector_init(&c_res, 0)) { - igraph_error("", __FILE__, __LINE__, IGRAPH_ENOMEM); - } - IGRAPH_FINALLY(igraph_vector_destroy, &c_res); - igraph_vector_int_t c_vids_data; - R_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); - c_mode = (igraph_neimode_t) Rf_asInteger(mode); - /* Call igraph */ - IGRAPH_R_CHECK(igraph_eccentricity(&c_graph, &c_res, c_vids, c_mode)); - - /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); - igraph_vector_destroy(&c_res); - IGRAPH_FINALLY_CLEAN(1); - igraph_vector_int_destroy(&c_vids_data); - igraph_vs_destroy(&c_vids); - r_result = res; - - UNPROTECT(1); - return(r_result); -} - /*-------------------------------------------/ / igraph_eccentricity_dijkstra / /-------------------------------------------*/ @@ -4964,37 +4928,6 @@ SEXP R_igraph_eccentricity_dijkstra(SEXP graph, SEXP weights, SEXP vids, SEXP mo return(r_result); } -/*-------------------------------------------/ -/ igraph_graph_center / -/-------------------------------------------*/ -SEXP R_igraph_graph_center(SEXP graph, SEXP mode) { - /* Declarations */ - igraph_t c_graph; - igraph_vector_int_t c_res; - igraph_neimode_t c_mode; - SEXP res; - - SEXP r_result; - /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - if (0 != igraph_vector_int_init(&c_res, 0)) { - igraph_error("", __FILE__, __LINE__, IGRAPH_ENOMEM); - } - IGRAPH_FINALLY(igraph_vector_int_destroy, &c_res); - c_mode = (igraph_neimode_t) Rf_asInteger(mode); - /* Call igraph */ - IGRAPH_R_CHECK(igraph_graph_center(&c_graph, &c_res, c_mode)); - - /* Convert output */ - PROTECT(res=R_igraph_vector_int_to_SEXPp1(&c_res)); - igraph_vector_int_destroy(&c_res); - IGRAPH_FINALLY_CLEAN(1); - r_result = res; - - UNPROTECT(1); - return(r_result); -} - /*-------------------------------------------/ / igraph_graph_center_dijkstra / /-------------------------------------------*/ @@ -5028,32 +4961,6 @@ SEXP R_igraph_graph_center_dijkstra(SEXP graph, SEXP weights, SEXP mode) { return(r_result); } -/*-------------------------------------------/ -/ igraph_radius / -/-------------------------------------------*/ -SEXP R_igraph_radius(SEXP graph, SEXP mode) { - /* Declarations */ - igraph_t c_graph; - igraph_real_t c_radius; - igraph_neimode_t c_mode; - SEXP radius; - - SEXP r_result; - /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - c_mode = (igraph_neimode_t) Rf_asInteger(mode); - /* Call igraph */ - IGRAPH_R_CHECK(igraph_radius(&c_graph, &c_radius, c_mode)); - - /* Convert output */ - PROTECT(radius=NEW_NUMERIC(1)); - REAL(radius)[0]=c_radius; - r_result = radius; - - UNPROTECT(1); - return(r_result); -} - /*-------------------------------------------/ / igraph_radius_dijkstra / /-------------------------------------------*/ diff --git a/tests/testthat/_snaps/paths.md b/tests/testthat/_snaps/paths.md new file mode 100644 index 0000000000..751a5d6b2b --- /dev/null +++ b/tests/testthat/_snaps/paths.md @@ -0,0 +1,22 @@ +# radius() works -- lifecycle + + Code + radius(g, NULL, "out") + Condition + Warning: + The `...` argument of `radius()` is deprecated as of igraph 2.1.0. + i The arguments `weights` and `mode` must be named. + Output + [1] 0 + +# eccentricity() works -- lifecycle + + Code + eccentricity(g, vids = V(g), NULL, "out") + Condition + Warning: + The `...` argument of `eccentricity()` is deprecated as of igraph 2.1.0. + i The arguments `weights` and `mode` must be named. + Output + [1] 3 2 1 1 1 0 0 0 0 0 + diff --git a/tests/testthat/test-paths.R b/tests/testthat/test-paths.R new file mode 100644 index 0000000000..af1fb4030d --- /dev/null +++ b/tests/testthat/test-paths.R @@ -0,0 +1,67 @@ +test_that("radius() works", { + withr::local_seed(42) + g <- make_tree(10, 2) + + expect_equal(radius(g), 3) + expect_equal(radius(g, mode = "in"), 0) + expect_equal(radius(g, mode = "out"), 0) +}) + +test_that("radius() works -- weights", { + g <- make_ring(10) + expect_equal(radius(g), 5) + + E(g)$weight <- seq_len(ecount(g)) + expect_equal(radius(g), 24) +}) + +test_that("radius() works -- lifecycle", { + withr::local_seed(42) + g <- make_tree(10, 2) + + expect_snapshot(radius(g, NULL, "out")) + +}) + +test_that("eccentricity() works", { + withr::local_seed(42) + g <- make_tree(10, 2) + + expect_equal(eccentricity(g), c(3, 3, 4, 4, 4, 5, 5, 5, 5, 5)) + expect_equal(eccentricity(g, mode = "in"), c(0, 1, 1, 2, 2, 2, 2, 3, 3, 3)) + expect_equal(eccentricity(g, mode = "out"), c(3, 2, 1, 1, 1, 0, 0, 0, 0, 0)) +}) + +test_that("eccentricity() works -- weights", { + g <- make_ring(10) + expect_equal(eccentricity(g), rep(5, 10)) + + E(g)$weight <- seq_len(ecount(g)) + expect_equal(eccentricity(g), c(27, 27, 25, 25, 26, 25, 24, 27, 26, 25)) +}) + +test_that("eccentricity() works -- lifecycle", { + withr::local_seed(42) + g <- make_tree(10, 2) + + expect_snapshot(eccentricity(g, vids = V(g), NULL, "out")) + +}) + +test_that("graph_center() works", { + withr::local_seed(42) + g <- make_tree(100, 7) + expect_equal(as.numeric(graph_center(g)), c(1, 2)) + expect_equal(as.numeric(graph_center(g, mode = "in")), 1) + expect_equal(as.numeric(graph_center(g, mode = "out")), 16:100) + +}) + +test_that("graph_center() works -- weights", { + g <- make_ring(10) + expect_equal(as.numeric(graph_center(g)), 1:10) + + E(g)$weight <- seq_len(ecount(g)) + expect_equal(as.numeric(graph_center(g)), 7) +}) + diff --git a/tools/stimulus/functions-R.yaml b/tools/stimulus/functions-R.yaml index ca0ba7b512..42a738ec7f 100644 --- a/tools/stimulus/functions-R.yaml +++ b/tools/stimulus/functions-R.yaml @@ -617,17 +617,26 @@ igraph_joint_type_distribution: igraph_contract_vertices: +# We use igraph_eccentricity_dijkstra instead igraph_eccentricity: + IGNORE: RR, RC igraph_eccentricity_dijkstra: + PARAM_ORDER: graph, vids, *, weights, ... +# We use igraph_graph_center_dijkstra instead igraph_graph_center: + IGNORE: RR, RC igraph_graph_center_dijkstra: + FIRST_KW_PARAM: weights +# We use igraph_radius_dijkstra instead igraph_radius: + IGNORE: RR, RC igraph_radius_dijkstra: + FIRST_KW_PARAM: weights igraph_pseudo_diameter: DEPS: start_vid ON graph