diff --git a/R/aaa-auto.R b/R/aaa-auto.R index 26256c84f7..0a7e09bd21 100644 --- a/R/aaa-auto.R +++ b/R/aaa-auto.R @@ -3228,57 +3228,8 @@ subisomorphic_vf2_impl <- function(graph1, graph2, vertex.color1=NULL, vertex.co res } -get_subisomorphisms_vf2_callback_impl <- function(graph1, graph2, vertex.color1=NULL, vertex.color2=NULL, edge.color1=NULL, edge.color2=NULL, ishohandler.fn) { - # Argument checks - ensure_igraph(graph1) - ensure_igraph(graph2) - if (missing(vertex.color1)) { - if ("color" %in% vertex_attr_names(graph1)) { - vertex.color1 <- V(graph1)$color - } else { - vertex.color1 <- NULL - } - } - if (!is.null(vertex.color1)) { - vertex.color1 <- as.numeric(vertex.color1)-1 - } - if (missing(vertex.color2)) { - if ("color" %in% vertex_attr_names(graph2)) { - vertex.color2 <- V(graph2)$color - } else { - vertex.color2 <- NULL - } - } - if (!is.null(vertex.color2)) { - vertex.color2 <- as.numeric(vertex.color2)-1 - } - if (missing(edge.color1)) { - if ("color" %in% edge_attr_names(graph1)) { - edge.color1 <- E(graph1)$color - } else { - edge.color1 <- NULL - } - } - if (!is.null(edge.color1)) { - edge.color1 <- as.numeric(edge.color1)-1 - } - if (missing(edge.color2)) { - if ("color" %in% edge_attr_names(graph2)) { - edge.color2 <- E(graph2)$color - } else { - edge.color2 <- NULL - } - } - if (!is.null(edge.color2)) { - edge.color2 <- as.numeric(edge.color2)-1 - } - - on.exit( .Call(R_igraph_finalizer) ) - # Function call - res <- .Call(R_igraph_get_subisomorphisms_vf2_callback, graph1, graph2, vertex.color1, vertex.color2, edge.color1, edge.color2, ishohandler.fn) - - res -} +# get_subisomorphisms_vf2_callback_impl gives LTO warnings +# wrong number of arguments to R_igraph_get_subisomorphisms_vf2_callback() count_subisomorphisms_vf2_impl <- function(graph1, graph2, vertex.color1, vertex.color2, edge.color1, edge.color2) { # Argument checks diff --git a/R/community.R b/R/community.R index 85fb4b14ac..5f9a5d90d0 100644 --- a/R/community.R +++ b/R/community.R @@ -372,7 +372,7 @@ code.length <- function(communities) { # nocov start #' [igraph.plotting] on how to change the plot. #' #' @rdname communities -#' @family Community detection +#' @family community #' @param communities,x,object A `communities` object, the result of an #' igraph community detection function. #' @param graph An igraph graph object, corresponding to `communities`. diff --git a/R/interface.R b/R/interface.R index f6b38207cf..1be02019ff 100644 --- a/R/interface.R +++ b/R/interface.R @@ -537,7 +537,7 @@ get.edge.ids <- function( on.exit(.Call(R_igraph_finalizer)) .Call( R_igraph_get_eids, graph, as_igraph_vs(graph, vp) - 1, - as.logical(directed), as.logical(error), as.logical(multi) + as.logical(directed), as.logical(error) ) + 1 } diff --git a/R/layout_drl.R b/R/layout_drl.R index 168178c77e..2b66df1f20 100644 --- a/R/layout_drl.R +++ b/R/layout_drl.R @@ -125,12 +125,12 @@ layout_with_drl <- function(graph, use.seed = FALSE, if (dim == 2) { res <- .Call( R_igraph_layout_drl, graph, seed, use.seed, options, - weights, FALSE + weights ) } else { res <- .Call( R_igraph_layout_drl_3d, graph, seed, use.seed, options, - weights, FALSE + weights ) } res diff --git a/R/scg.R b/R/scg.R index a8ff6f3ab8..53d30150ce 100644 --- a/R/scg.R +++ b/R/scg.R @@ -135,7 +135,7 @@ stochastic_matrix <- function(graph, column.wise = FALSE, res <- .Call(R_igraph_get_stochastic_sparse, graph, column.wise, NULL) res <- igraph.i.spMatrix(res) } else { - res <- .Call(R_igraph_get_stochastic, graph, column.wise) + res <- .Call(R_igraph_get_stochastic, graph, column.wise, NULL) } if (igraph_opt("add.vertex.names") && is_named(graph)) { diff --git a/cran-comments.md b/cran-comments.md index 39f689fc3d..d8b9e31582 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,3 +1,5 @@ +Resubmission. + igraph 2.0.0 ## R CMD check results diff --git a/man/as_membership.Rd b/man/as_membership.Rd index 2b93641f1b..fc3d64d31c 100644 --- a/man/as_membership.Rd +++ b/man/as_membership.Rd @@ -42,6 +42,7 @@ Community detection \code{\link{compare}()}, \code{\link{groups}()}, \code{\link{make_clusters}()}, +\code{\link{membership}()}, \code{\link{modularity.igraph}()}, \code{\link{plot_dendrogram}()}, \code{\link{split_join_distance}()} diff --git a/man/cluster_edge_betweenness.Rd b/man/cluster_edge_betweenness.Rd index 6d31faa37f..cc5dd190a5 100644 --- a/man/cluster_edge_betweenness.Rd +++ b/man/cluster_edge_betweenness.Rd @@ -124,6 +124,7 @@ Community detection \code{\link{compare}()}, \code{\link{groups}()}, \code{\link{make_clusters}()}, +\code{\link{membership}()}, \code{\link{modularity.igraph}()}, \code{\link{plot_dendrogram}()}, \code{\link{split_join_distance}()} diff --git a/man/cluster_fast_greedy.Rd b/man/cluster_fast_greedy.Rd index 28c83d5c53..89e011519d 100644 --- a/man/cluster_fast_greedy.Rd +++ b/man/cluster_fast_greedy.Rd @@ -83,6 +83,7 @@ Community detection \code{\link{compare}()}, \code{\link{groups}()}, \code{\link{make_clusters}()}, +\code{\link{membership}()}, \code{\link{modularity.igraph}()}, \code{\link{plot_dendrogram}()}, \code{\link{split_join_distance}()} diff --git a/man/cluster_fluid_communities.Rd b/man/cluster_fluid_communities.Rd index 748da5782e..cfefcfd373 100644 --- a/man/cluster_fluid_communities.Rd +++ b/man/cluster_fluid_communities.Rd @@ -63,6 +63,7 @@ Community detection \code{\link{compare}()}, \code{\link{groups}()}, \code{\link{make_clusters}()}, +\code{\link{membership}()}, \code{\link{modularity.igraph}()}, \code{\link{plot_dendrogram}()}, \code{\link{split_join_distance}()} diff --git a/man/cluster_infomap.Rd b/man/cluster_infomap.Rd index 5fa1f72069..c486514b71 100644 --- a/man/cluster_infomap.Rd +++ b/man/cluster_infomap.Rd @@ -83,6 +83,7 @@ Community detection \code{\link{compare}()}, \code{\link{groups}()}, \code{\link{make_clusters}()}, +\code{\link{membership}()}, \code{\link{modularity.igraph}()}, \code{\link{plot_dendrogram}()}, \code{\link{split_join_distance}()} diff --git a/man/cluster_label_prop.Rd b/man/cluster_label_prop.Rd index 6e80268bbe..7e6e71977b 100644 --- a/man/cluster_label_prop.Rd +++ b/man/cluster_label_prop.Rd @@ -102,6 +102,7 @@ Community detection \code{\link{compare}()}, \code{\link{groups}()}, \code{\link{make_clusters}()}, +\code{\link{membership}()}, \code{\link{modularity.igraph}()}, \code{\link{plot_dendrogram}()}, \code{\link{split_join_distance}()} diff --git a/man/cluster_leading_eigen.Rd b/man/cluster_leading_eigen.Rd index 1dfee602db..63be0e7d3a 100644 --- a/man/cluster_leading_eigen.Rd +++ b/man/cluster_leading_eigen.Rd @@ -136,6 +136,7 @@ Community detection \code{\link{compare}()}, \code{\link{groups}()}, \code{\link{make_clusters}()}, +\code{\link{membership}()}, \code{\link{modularity.igraph}()}, \code{\link{plot_dendrogram}()}, \code{\link{split_join_distance}()} diff --git a/man/cluster_leiden.Rd b/man/cluster_leiden.Rd index de8f1dfe60..dc97b8b91a 100644 --- a/man/cluster_leiden.Rd +++ b/man/cluster_leiden.Rd @@ -145,6 +145,7 @@ Community detection \code{\link{compare}()}, \code{\link{groups}()}, \code{\link{make_clusters}()}, +\code{\link{membership}()}, \code{\link{modularity.igraph}()}, \code{\link{plot_dendrogram}()}, \code{\link{split_join_distance}()} diff --git a/man/cluster_louvain.Rd b/man/cluster_louvain.Rd index 97be08be2c..ef47e62fe6 100644 --- a/man/cluster_louvain.Rd +++ b/man/cluster_louvain.Rd @@ -90,6 +90,7 @@ Community detection \code{\link{compare}()}, \code{\link{groups}()}, \code{\link{make_clusters}()}, +\code{\link{membership}()}, \code{\link{modularity.igraph}()}, \code{\link{plot_dendrogram}()}, \code{\link{split_join_distance}()} diff --git a/man/cluster_optimal.Rd b/man/cluster_optimal.Rd index f0f9c3a917..1b27644744 100644 --- a/man/cluster_optimal.Rd +++ b/man/cluster_optimal.Rd @@ -89,6 +89,7 @@ Community detection \code{\link{compare}()}, \code{\link{groups}()}, \code{\link{make_clusters}()}, +\code{\link{membership}()}, \code{\link{modularity.igraph}()}, \code{\link{plot_dendrogram}()}, \code{\link{split_join_distance}()} diff --git a/man/cluster_spinglass.Rd b/man/cluster_spinglass.Rd index bcf6d9576d..765f526880 100644 --- a/man/cluster_spinglass.Rd +++ b/man/cluster_spinglass.Rd @@ -160,6 +160,7 @@ Community detection \code{\link{compare}()}, \code{\link{groups}()}, \code{\link{make_clusters}()}, +\code{\link{membership}()}, \code{\link{modularity.igraph}()}, \code{\link{plot_dendrogram}()}, \code{\link{split_join_distance}()} diff --git a/man/cluster_walktrap.Rd b/man/cluster_walktrap.Rd index e2940e4ca5..7efa5a3117 100644 --- a/man/cluster_walktrap.Rd +++ b/man/cluster_walktrap.Rd @@ -89,6 +89,7 @@ Community detection \code{\link{compare}()}, \code{\link{groups}()}, \code{\link{make_clusters}()}, +\code{\link{membership}()}, \code{\link{modularity.igraph}()}, \code{\link{plot_dendrogram}()}, \code{\link{split_join_distance}()} diff --git a/man/communities.Rd b/man/communities.Rd index 0069c738fd..26d22528db 100644 --- a/man/communities.Rd +++ b/man/communities.Rd @@ -253,9 +253,29 @@ dendrograms. See \code{\link[=compare]{compare()}} for comparing two community structures on the same graph. + +Community detection +\code{\link{as_membership}()}, +\code{\link{cluster_edge_betweenness}()}, +\code{\link{cluster_fast_greedy}()}, +\code{\link{cluster_fluid_communities}()}, +\code{\link{cluster_infomap}()}, +\code{\link{cluster_label_prop}()}, +\code{\link{cluster_leading_eigen}()}, +\code{\link{cluster_leiden}()}, +\code{\link{cluster_louvain}()}, +\code{\link{cluster_optimal}()}, +\code{\link{cluster_spinglass}()}, +\code{\link{cluster_walktrap}()}, +\code{\link{compare}()}, +\code{\link{groups}()}, +\code{\link{make_clusters}()}, +\code{\link{modularity.igraph}()}, +\code{\link{plot_dendrogram}()}, +\code{\link{split_join_distance}()} } \author{ Gabor Csardi \email{csardi.gabor@gmail.com} } -\concept{Community detection} +\concept{community} \keyword{graphs} diff --git a/man/compare.Rd b/man/compare.Rd index 1b0f116da4..be522b0adb 100644 --- a/man/compare.Rd +++ b/man/compare.Rd @@ -81,6 +81,7 @@ Community detection \code{\link{cluster_walktrap}()}, \code{\link{groups}()}, \code{\link{make_clusters}()}, +\code{\link{membership}()}, \code{\link{modularity.igraph}()}, \code{\link{plot_dendrogram}()}, \code{\link{split_join_distance}()} diff --git a/man/groups.Rd b/man/groups.Rd index 36a2f31709..a72ac54bb8 100644 --- a/man/groups.Rd +++ b/man/groups.Rd @@ -55,6 +55,7 @@ Community detection \code{\link{cluster_walktrap}()}, \code{\link{compare}()}, \code{\link{make_clusters}()}, +\code{\link{membership}()}, \code{\link{modularity.igraph}()}, \code{\link{plot_dendrogram}()}, \code{\link{split_join_distance}()} diff --git a/man/make_clusters.Rd b/man/make_clusters.Rd index 944eecc783..96521866a7 100644 --- a/man/make_clusters.Rd +++ b/man/make_clusters.Rd @@ -52,6 +52,7 @@ Community detection \code{\link{cluster_walktrap}()}, \code{\link{compare}()}, \code{\link{groups}()}, +\code{\link{membership}()}, \code{\link{modularity.igraph}()}, \code{\link{plot_dendrogram}()}, \code{\link{split_join_distance}()} diff --git a/man/modularity.igraph.Rd b/man/modularity.igraph.Rd index 7cd224ba80..af780bb871 100644 --- a/man/modularity.igraph.Rd +++ b/man/modularity.igraph.Rd @@ -119,6 +119,7 @@ Community detection \code{\link{compare}()}, \code{\link{groups}()}, \code{\link{make_clusters}()}, +\code{\link{membership}()}, \code{\link{plot_dendrogram}()}, \code{\link{split_join_distance}()} } diff --git a/man/plot_dendrogram.communities.Rd b/man/plot_dendrogram.communities.Rd index 908e07fb7b..03d1b48f6e 100644 --- a/man/plot_dendrogram.communities.Rd +++ b/man/plot_dendrogram.communities.Rd @@ -116,6 +116,7 @@ Community detection \code{\link{compare}()}, \code{\link{groups}()}, \code{\link{make_clusters}()}, +\code{\link{membership}()}, \code{\link{modularity.igraph}()}, \code{\link{split_join_distance}()} } diff --git a/man/split_join_distance.Rd b/man/split_join_distance.Rd index 35afa40275..241059882b 100644 --- a/man/split_join_distance.Rd +++ b/man/split_join_distance.Rd @@ -58,6 +58,7 @@ Community detection \code{\link{compare}()}, \code{\link{groups}()}, \code{\link{make_clusters}()}, +\code{\link{membership}()}, \code{\link{modularity.igraph}()}, \code{\link{plot_dendrogram}()} } diff --git a/src/Makevars.in b/src/Makevars.in index f7fcaa3b12..f4a140a1c1 100644 --- a/src/Makevars.in +++ b/src/Makevars.in @@ -7,6 +7,7 @@ PKG_FFLAGS=$(F_VISIBILITY) PKG_CPPFLAGS=-DUSING_R -I. -Ivendor -Ivendor/cigraph/src -Ivendor/cigraph/include -Ivendor/cigraph/vendor @cflags@ \ -DNDEBUG -DNTIMER -DNPRINT -DINTERNAL_ARPACK -DIGRAPH_THREAD_LOCAL= \ -DPRPACK_IGRAPH_SUPPORT \ + -DHAVE_GFORTRAN=1 \ -D_GNU_SOURCE=1 PKG_LIBS = -lxml2 -lz -lglpk -lgmp $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) diff --git a/src/cpp11.cpp b/src/cpp11.cpp index c9cff0fdcb..a97caba906 100644 --- a/src/cpp11.cpp +++ b/src/cpp11.cpp @@ -185,7 +185,7 @@ 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 *, 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 *); @@ -195,10 +195,9 @@ 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 *); +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_subisomorphisms_vf2_callback(void *, 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_getsphere(void *, void *, void *, void *, void *, void *, void *, void *); @@ -282,8 +281,8 @@ 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 *, void *); -extern SEXP R_igraph_layout_drl_3d(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 *); @@ -645,7 +644,7 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_get_diameter", (DL_FUNC) &R_igraph_get_diameter, 4}, {"R_igraph_get_edge", (DL_FUNC) &R_igraph_get_edge, 2}, {"R_igraph_get_edgelist", (DL_FUNC) &R_igraph_get_edgelist, 2}, - {"R_igraph_get_eids", (DL_FUNC) &R_igraph_get_eids, 5}, + {"R_igraph_get_eids", (DL_FUNC) &R_igraph_get_eids, 4}, {"R_igraph_get_graph_id", (DL_FUNC) &R_igraph_get_graph_id, 1}, {"R_igraph_get_isomorphisms_vf2", (DL_FUNC) &R_igraph_get_isomorphisms_vf2, 6}, {"R_igraph_get_k_shortest_paths", (DL_FUNC) &R_igraph_get_k_shortest_paths, 6}, @@ -655,10 +654,9 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_get_shortest_path_bellman_ford", (DL_FUNC) &R_igraph_get_shortest_path_bellman_ford, 5}, {"R_igraph_get_shortest_path_dijkstra", (DL_FUNC) &R_igraph_get_shortest_path_dijkstra, 5}, {"R_igraph_get_shortest_paths", (DL_FUNC) &R_igraph_get_shortest_paths, 10}, - {"R_igraph_get_stochastic", (DL_FUNC) &R_igraph_get_stochastic, 2}, + {"R_igraph_get_stochastic", (DL_FUNC) &R_igraph_get_stochastic, 3}, {"R_igraph_get_stochastic_sparse", (DL_FUNC) &R_igraph_get_stochastic_sparse, 3}, {"R_igraph_get_subisomorphisms_vf2", (DL_FUNC) &R_igraph_get_subisomorphisms_vf2, 6}, - {"R_igraph_get_subisomorphisms_vf2_callback", (DL_FUNC) &R_igraph_get_subisomorphisms_vf2_callback, 7}, {"R_igraph_get_widest_path", (DL_FUNC) &R_igraph_get_widest_path, 5}, {"R_igraph_get_widest_paths", (DL_FUNC) &R_igraph_get_widest_paths, 5}, {"R_igraph_getsphere", (DL_FUNC) &R_igraph_getsphere, 8}, @@ -742,8 +740,8 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_layout_bipartite", (DL_FUNC) &R_igraph_layout_bipartite, 5}, {"R_igraph_layout_circle", (DL_FUNC) &R_igraph_layout_circle, 2}, {"R_igraph_layout_davidson_harel", (DL_FUNC) &R_igraph_layout_davidson_harel, 11}, - {"R_igraph_layout_drl", (DL_FUNC) &R_igraph_layout_drl, 6}, - {"R_igraph_layout_drl_3d", (DL_FUNC) &R_igraph_layout_drl_3d, 6}, + {"R_igraph_layout_drl", (DL_FUNC) &R_igraph_layout_drl, 5}, + {"R_igraph_layout_drl_3d", (DL_FUNC) &R_igraph_layout_drl_3d, 5}, {"R_igraph_layout_fruchterman_reingold", (DL_FUNC) &R_igraph_layout_fruchterman_reingold, 10}, {"R_igraph_layout_fruchterman_reingold_3d", (DL_FUNC) &R_igraph_layout_fruchterman_reingold_3d, 11}, {"R_igraph_layout_gem", (DL_FUNC) &R_igraph_layout_gem, 7},