diff --git a/R/bipartite.R b/R/bipartite.R index 5b671ef92d1..c5cabb23870 100644 --- a/R/bipartite.R +++ b/R/bipartite.R @@ -191,7 +191,7 @@ bipartite_projection <- function( on.exit(.Call(Rx_igraph_finalizer)) # Function call res <- .Call( - R_igraph_bipartite_projection, + Rx_igraph_bipartite_projection, graph, types, as.numeric(probe1), diff --git a/R/cliques.R b/R/cliques.R index 47c934ef7ed..1bd3a52c306 100644 --- a/R/cliques.R +++ b/R/cliques.R @@ -317,7 +317,7 @@ max_cliques <- function( } else { on.exit(.Call(Rx_igraph_finalizer)) res <- .Call( - R_igraph_maximal_cliques, + Rx_igraph_maximal_cliques, graph, subset, as.numeric(min), diff --git a/R/conversion.R b/R/conversion.R index 50fc3147166..5ae9719dfc4 100644 --- a/R/conversion.R +++ b/R/conversion.R @@ -253,7 +253,7 @@ get.adjacency.dense <- function( on.exit(.Call(Rx_igraph_finalizer)) type <- switch(type, "upper" = 0, "lower" = 1, "both" = 2) res <- .Call( - R_igraph_get_adjacency, + Rx_igraph_get_adjacency, graph, as.numeric(type), weights, diff --git a/R/make.R b/R/make.R index 4c0940db88e..71d1adf2310 100644 --- a/R/make.R +++ b/R/make.R @@ -575,7 +575,7 @@ graph.full <- function(n, directed = FALSE, loops = FALSE) { lifecycle::deprecate_soft("2.1.0", "graph.full()", "make_full_graph()") on.exit(.Call(Rx_igraph_finalizer)) res <- .Call( - R_igraph_full, + Rx_igraph_full, as.numeric(n), as.logical(directed), as.logical(loops) @@ -1918,7 +1918,7 @@ star <- function(...) constructor_spec(make_star, ...) make_full_graph <- function(n, directed = FALSE, loops = FALSE) { on.exit(.Call(Rx_igraph_finalizer)) res <- .Call( - R_igraph_full, + Rx_igraph_full, as.numeric(n), as.logical(directed), as.logical(loops) diff --git a/R/structural-properties.R b/R/structural-properties.R index 01cce19733a..3bd2180cd10 100644 --- a/R/structural-properties.R +++ b/R/structural-properties.R @@ -2768,7 +2768,7 @@ bfs <- function( on.exit(.Call(Rx_igraph_finalizer)) res <- .Call( - R_igraph_bfs, + Rx_igraph_bfs, graph, root, roots, diff --git a/R/versions.R b/R/versions.R index eb22b799c44..40b80ac2a12 100644 --- a/R/versions.R +++ b/R/versions.R @@ -110,7 +110,7 @@ upgrade_graph <- function(graph) { graph[igraph_t_idx_oi:igraph_t_idx_is] <- list(NULL) class(graph) <- "igraph" - # Calling for side effect: error if R_SEXP_to_igraph() fails, create native igraph, + # Calling for side effect: error if Rz_SEXP_to_igraph() fails, create native igraph, # update "me" element of environment V(graph) @@ -125,7 +125,7 @@ upgrade_graph <- function(graph) { ## Check that the version is the latest warn_version <- function(graph) { - # Calling for side effect: error if R_SEXP_to_igraph() fails + # Calling for side effect: error if Rz_SEXP_to_igraph() fails # Don't call vcount_impl() to avoid recursion .Call(Rx_igraph_vcount, graph) diff --git a/src/cpp11.cpp b/src/cpp11.cpp index 3f9ac93aed2..5f715fcf438 100644 --- a/src/cpp11.cpp +++ b/src/cpp11.cpp @@ -43,14 +43,12 @@ 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_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_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_bond_percolation(SEXP, SEXP); extern SEXP R_igraph_bridges(SEXP); @@ -141,13 +139,11 @@ extern SEXP R_igraph_find_cycle(SEXP, SEXP); 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_adjacency_sparse(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); @@ -272,7 +268,6 @@ 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_maxdegree(SEXP, 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); extern SEXP R_igraph_maximal_cliques_hist(SEXP, SEXP, SEXP); extern SEXP R_igraph_maximal_independent_vertex_sets(SEXP); @@ -403,6 +398,8 @@ extern SEXP Rx_igraph_arpack(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP Rx_igraph_arpack_unpack_complex(SEXP, SEXP, SEXP); extern SEXP Rx_igraph_barabasi_aging_game(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP Rx_igraph_barabasi_game(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_bfs(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_bipartite_projection(SEXP, SEXP, SEXP, SEXP); extern SEXP Rx_igraph_callaway_traits_game(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP Rx_igraph_cited_type_game(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP Rx_igraph_citing_cited_type_game(SEXP, SEXP, SEXP, SEXP, SEXP); @@ -431,6 +428,8 @@ extern SEXP Rx_igraph_es_path(SEXP, SEXP, SEXP); extern SEXP Rx_igraph_establishment_game(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP Rx_igraph_farthest_points(SEXP, SEXP, SEXP, SEXP); extern SEXP Rx_igraph_finalizer(void); +extern SEXP Rx_igraph_full(SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_get_adjacency(SEXP, SEXP, SEXP, SEXP); extern SEXP Rx_igraph_get_adjedgelist(SEXP, SEXP, SEXP); extern SEXP Rx_igraph_get_adjlist(SEXP, SEXP, SEXP, SEXP); extern SEXP Rx_igraph_get_all_simple_paths_pp(SEXP); @@ -462,6 +461,7 @@ extern SEXP Rx_igraph_layout_lgl(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP) extern SEXP Rx_igraph_layout_merge_dla(SEXP, SEXP); extern SEXP Rx_igraph_layout_reingold_tilford(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP Rx_igraph_make_weak_ref(SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_maximal_cliques(SEXP, SEXP, SEXP, SEXP); extern SEXP Rx_igraph_maximal_cliques_count(SEXP, SEXP, SEXP, SEXP); extern SEXP Rx_igraph_maximal_cliques_file(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP Rx_igraph_mybracket2(SEXP, SEXP, SEXP); @@ -530,14 +530,12 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_avg_nearest_neighbor_degree", (DL_FUNC) &R_igraph_avg_nearest_neighbor_degree, 5}, {"R_igraph_betweenness_cutoff", (DL_FUNC) &R_igraph_betweenness_cutoff, 5}, {"R_igraph_betweenness_subset", (DL_FUNC) &R_igraph_betweenness_subset, 6}, - {"R_igraph_bfs", (DL_FUNC) &R_igraph_bfs, 15}, {"R_igraph_bfs_simple", (DL_FUNC) &R_igraph_bfs_simple, 3}, {"R_igraph_biadjacency", (DL_FUNC) &R_igraph_biadjacency, 4}, {"R_igraph_bibcoupling", (DL_FUNC) &R_igraph_bibcoupling, 2}, {"R_igraph_biconnected_components", (DL_FUNC) &R_igraph_biconnected_components, 1}, {"R_igraph_bipartite_game_gnm", (DL_FUNC) &R_igraph_bipartite_game_gnm, 5}, {"R_igraph_bipartite_game_gnp", (DL_FUNC) &R_igraph_bipartite_game_gnp, 5}, - {"R_igraph_bipartite_projection", (DL_FUNC) &R_igraph_bipartite_projection, 4}, {"R_igraph_bipartite_projection_size", (DL_FUNC) &R_igraph_bipartite_projection_size, 2}, {"R_igraph_bond_percolation", (DL_FUNC) &R_igraph_bond_percolation, 2}, {"R_igraph_bridges", (DL_FUNC) &R_igraph_bridges, 1}, @@ -628,13 +626,11 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_forest_fire_game", (DL_FUNC) &R_igraph_forest_fire_game, 5}, {"R_igraph_from_hrg_dendrogram", (DL_FUNC) &R_igraph_from_hrg_dendrogram, 1}, {"R_igraph_from_prufer", (DL_FUNC) &R_igraph_from_prufer, 1}, - {"R_igraph_full", (DL_FUNC) &R_igraph_full, 3}, {"R_igraph_full_bipartite", (DL_FUNC) &R_igraph_full_bipartite, 4}, {"R_igraph_full_citation", (DL_FUNC) &R_igraph_full_citation, 2}, {"R_igraph_full_multipartite", (DL_FUNC) &R_igraph_full_multipartite, 3}, {"R_igraph_fundamental_cycles", (DL_FUNC) &R_igraph_fundamental_cycles, 4}, {"R_igraph_generalized_petersen", (DL_FUNC) &R_igraph_generalized_petersen, 2}, - {"R_igraph_get_adjacency", (DL_FUNC) &R_igraph_get_adjacency, 4}, {"R_igraph_get_adjacency_sparse", (DL_FUNC) &R_igraph_get_adjacency_sparse, 4}, {"R_igraph_get_all_eids_between", (DL_FUNC) &R_igraph_get_all_eids_between, 4}, {"R_igraph_get_all_shortest_paths", (DL_FUNC) &R_igraph_get_all_shortest_paths, 4}, @@ -759,7 +755,6 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_local_scan_subset_ecount", (DL_FUNC) &R_igraph_local_scan_subset_ecount, 3}, {"R_igraph_maxdegree", (DL_FUNC) &R_igraph_maxdegree, 4}, {"R_igraph_maxflow", (DL_FUNC) &R_igraph_maxflow, 4}, - {"R_igraph_maximal_cliques", (DL_FUNC) &R_igraph_maximal_cliques, 4}, {"R_igraph_maximal_cliques_count", (DL_FUNC) &R_igraph_maximal_cliques_count, 3}, {"R_igraph_maximal_cliques_hist", (DL_FUNC) &R_igraph_maximal_cliques_hist, 3}, {"R_igraph_maximal_independent_vertex_sets", (DL_FUNC) &R_igraph_maximal_independent_vertex_sets, 1}, @@ -890,6 +885,8 @@ static const R_CallMethodDef CallEntries[] = { {"Rx_igraph_arpack_unpack_complex", (DL_FUNC) &Rx_igraph_arpack_unpack_complex, 3}, {"Rx_igraph_barabasi_aging_game", (DL_FUNC) &Rx_igraph_barabasi_aging_game, 12}, {"Rx_igraph_barabasi_game", (DL_FUNC) &Rx_igraph_barabasi_game, 9}, + {"Rx_igraph_bfs", (DL_FUNC) &Rx_igraph_bfs, 15}, + {"Rx_igraph_bipartite_projection", (DL_FUNC) &Rx_igraph_bipartite_projection, 4}, {"Rx_igraph_callaway_traits_game", (DL_FUNC) &Rx_igraph_callaway_traits_game, 6}, {"Rx_igraph_cited_type_game", (DL_FUNC) &Rx_igraph_cited_type_game, 5}, {"Rx_igraph_citing_cited_type_game", (DL_FUNC) &Rx_igraph_citing_cited_type_game, 5}, @@ -918,6 +915,8 @@ static const R_CallMethodDef CallEntries[] = { {"Rx_igraph_establishment_game", (DL_FUNC) &Rx_igraph_establishment_game, 6}, {"Rx_igraph_farthest_points", (DL_FUNC) &Rx_igraph_farthest_points, 4}, {"Rx_igraph_finalizer", (DL_FUNC) &Rx_igraph_finalizer, 0}, + {"Rx_igraph_full", (DL_FUNC) &Rx_igraph_full, 3}, + {"Rx_igraph_get_adjacency", (DL_FUNC) &Rx_igraph_get_adjacency, 4}, {"Rx_igraph_get_adjedgelist", (DL_FUNC) &Rx_igraph_get_adjedgelist, 3}, {"Rx_igraph_get_adjlist", (DL_FUNC) &Rx_igraph_get_adjlist, 4}, {"Rx_igraph_get_all_simple_paths_pp", (DL_FUNC) &Rx_igraph_get_all_simple_paths_pp, 1}, @@ -949,6 +948,7 @@ static const R_CallMethodDef CallEntries[] = { {"Rx_igraph_layout_merge_dla", (DL_FUNC) &Rx_igraph_layout_merge_dla, 2}, {"Rx_igraph_layout_reingold_tilford", (DL_FUNC) &Rx_igraph_layout_reingold_tilford, 5}, {"Rx_igraph_make_weak_ref", (DL_FUNC) &Rx_igraph_make_weak_ref, 3}, + {"Rx_igraph_maximal_cliques", (DL_FUNC) &Rx_igraph_maximal_cliques, 4}, {"Rx_igraph_maximal_cliques_count", (DL_FUNC) &Rx_igraph_maximal_cliques_count, 4}, {"Rx_igraph_maximal_cliques_file", (DL_FUNC) &Rx_igraph_maximal_cliques_file, 5}, {"Rx_igraph_mybracket2", (DL_FUNC) &Rx_igraph_mybracket2, 3}, diff --git a/src/init.cpp b/src/init.cpp index cc36f9609fe..891dfecdd09 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -2,12 +2,12 @@ #include "igraph.h" -extern "C" void R_igraph_init_handlers(DllInfo* dll); -extern "C" void R_igraph_init_vector_class(DllInfo* dll); +extern "C" void Rx_igraph_init_handlers(DllInfo* dll); +extern "C" void Rx_igraph_init_vector_class(DllInfo* dll); [[cpp11::init]] void igraph_init(DllInfo* dll) { - R_igraph_init_handlers(dll); - R_igraph_init_vector_class(dll); + Rx_igraph_init_handlers(dll); + Rx_igraph_init_vector_class(dll); } diff --git a/src/rinterface.c b/src/rinterface.c index 730e8537669..e6276175686 100644 --- a/src/rinterface.c +++ b/src/rinterface.c @@ -49,7 +49,7 @@ SEXP R_igraph_empty(SEXP n, SEXP directed) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -69,15 +69,15 @@ SEXP R_igraph_add_edges(SEXP graph, SEXP edges) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph_copy(graph, &c_graph); + Rz_SEXP_to_igraph_copy(graph, &c_graph); IGRAPH_FINALLY(igraph_destroy, &c_graph); - R_SEXP_to_vector_int_copy(edges, &c_edges); + Rz_SEXP_to_vector_int_copy(edges, &c_edges); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edges); /* Call igraph */ IGRAPH_R_CHECK(igraph_add_edges(&c_graph, &c_edges, 0)); /* Convert output */ - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_edges); @@ -99,7 +99,7 @@ SEXP R_igraph_add_vertices(SEXP graph, SEXP nv) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph_copy(graph, &c_graph); + Rz_SEXP_to_igraph_copy(graph, &c_graph); IGRAPH_FINALLY(igraph_destroy, &c_graph); IGRAPH_R_CHECK_INT(nv); c_nv = (igraph_integer_t) REAL(nv)[0]; @@ -107,7 +107,7 @@ SEXP R_igraph_add_vertices(SEXP graph, SEXP nv) { IGRAPH_R_CHECK(igraph_add_vertices(&c_graph, c_nv, 0)); /* Convert output */ - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -127,13 +127,13 @@ SEXP R_igraph_copy(SEXP from) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(from, &c_from); + Rz_SEXP_to_igraph(from, &c_from); /* Call igraph */ IGRAPH_R_CHECK(igraph_copy(&c_to, &c_from)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_to); - PROTECT(to=R_igraph_to_SEXP(&c_to)); + PROTECT(to=Ry_igraph_to_SEXP(&c_to)); IGRAPH_I_DESTROY(&c_to); IGRAPH_FINALLY_CLEAN(1); r_result = to; @@ -152,15 +152,15 @@ SEXP R_igraph_delete_edges(SEXP graph, SEXP edges) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph_copy(graph, &c_graph); + Rz_SEXP_to_igraph_copy(graph, &c_graph); IGRAPH_FINALLY(igraph_destroy, &c_graph); igraph_vector_int_t c_edges_data; - IGRAPH_R_CHECK(R_SEXP_to_igraph_es(edges, &c_graph, &c_edges, &c_edges_data)); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_es(edges, &c_graph, &c_edges, &c_edges_data)); /* Call igraph */ IGRAPH_R_CHECK(igraph_delete_edges(&c_graph, c_edges)); /* Convert output */ - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_edges_data); @@ -181,15 +181,15 @@ SEXP R_igraph_delete_vertices(SEXP graph, SEXP vertices) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph_copy(graph, &c_graph); + Rz_SEXP_to_igraph_copy(graph, &c_graph); IGRAPH_FINALLY(igraph_destroy, &c_graph); igraph_vector_int_t c_vertices_data; - R_SEXP_to_igraph_vs(vertices, &c_graph, &c_vertices, &c_vertices_data); + Rz_SEXP_to_igraph_vs(vertices, &c_graph, &c_vertices, &c_vertices_data); /* Call igraph */ IGRAPH_R_CHECK(igraph_delete_vertices(&c_graph, c_vertices)); /* Convert output */ - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vertices_data); @@ -214,10 +214,10 @@ SEXP R_igraph_delete_vertices_idx(SEXP graph, SEXP vertices) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph_copy(graph, &c_graph); + Rz_SEXP_to_igraph_copy(graph, &c_graph); IGRAPH_FINALLY(igraph_destroy, &c_graph); igraph_vector_int_t c_vertices_data; - R_SEXP_to_igraph_vs(vertices, &c_graph, &c_vertices, &c_vertices_data); + Rz_SEXP_to_igraph_vs(vertices, &c_graph, &c_vertices, &c_vertices_data); IGRAPH_R_CHECK(igraph_vector_int_init(&c_idx, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_idx); IGRAPH_R_CHECK(igraph_vector_int_init(&c_invidx, 0)); @@ -228,15 +228,15 @@ SEXP R_igraph_delete_vertices_idx(SEXP graph, SEXP vertices) { /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vertices_data); igraph_vs_destroy(&c_vertices); - PROTECT(idx=R_igraph_vector_int_to_SEXP(&c_idx)); + PROTECT(idx=Ry_igraph_vector_int_to_SEXP(&c_idx)); igraph_vector_int_destroy(&c_idx); IGRAPH_FINALLY_CLEAN(1); - PROTECT(invidx=R_igraph_vector_int_to_SEXP(&c_invidx)); + PROTECT(invidx=Ry_igraph_vector_int_to_SEXP(&c_invidx)); igraph_vector_int_destroy(&c_invidx); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, graph); @@ -261,7 +261,7 @@ SEXP R_igraph_vcount(SEXP graph) { igraph_integer_t c_result; SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ c_result=igraph_vcount(&c_graph); @@ -283,7 +283,7 @@ SEXP R_igraph_ecount(SEXP graph) { igraph_integer_t c_result; SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ c_result=igraph_ecount(&c_graph); @@ -309,7 +309,7 @@ SEXP R_igraph_neighbors(SEXP graph, SEXP vid, SEXP mode) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_neis, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_neis); c_vid = (igraph_integer_t) REAL(vid)[0]; @@ -318,7 +318,7 @@ SEXP R_igraph_neighbors(SEXP graph, SEXP vid, SEXP mode) { IGRAPH_R_CHECK(igraph_neighbors(&c_graph, &c_neis, c_vid, c_mode)); /* Convert output */ - PROTECT(neis=R_igraph_vector_int_to_SEXPp1(&c_neis)); + PROTECT(neis=Ry_igraph_vector_int_to_SEXPp1(&c_neis)); igraph_vector_int_destroy(&c_neis); IGRAPH_FINALLY_CLEAN(1); r_result = neis; @@ -336,7 +336,7 @@ SEXP R_igraph_is_directed(SEXP graph) { igraph_bool_t c_result; SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ c_result=igraph_is_directed(&c_graph); @@ -363,11 +363,11 @@ SEXP R_igraph_degree(SEXP graph, SEXP vids, SEXP mode, SEXP loops) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_res); igraph_vector_int_t c_vids_data; - R_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); c_mode = (igraph_neimode_t) Rf_asInteger(mode); IGRAPH_R_CHECK_BOOL(loops); c_loops = LOGICAL(loops)[0]; @@ -375,7 +375,7 @@ SEXP R_igraph_degree(SEXP graph, SEXP vids, SEXP mode, SEXP loops) { IGRAPH_R_CHECK(igraph_degree(&c_graph, &c_res, c_vids, c_mode, c_loops)); /* Convert output */ - PROTECT(res=R_igraph_vector_int_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_int_to_SEXP(&c_res)); igraph_vector_int_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -398,9 +398,9 @@ SEXP R_igraph_edges(SEXP graph, SEXP eids) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); igraph_vector_int_t c_eids_data; - IGRAPH_R_CHECK(R_SEXP_to_igraph_es(eids, &c_graph, &c_eids, &c_eids_data)); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_es(eids, &c_graph, &c_eids, &c_eids_data)); IGRAPH_R_CHECK(igraph_vector_int_init(&c_edges, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edges); /* Call igraph */ @@ -409,7 +409,7 @@ SEXP R_igraph_edges(SEXP graph, SEXP eids) { /* Convert output */ igraph_vector_int_destroy(&c_eids_data); igraph_es_destroy(&c_eids); - PROTECT(edges=R_igraph_vector_int_to_SEXPp1(&c_edges)); + PROTECT(edges=Ry_igraph_vector_int_to_SEXPp1(&c_edges)); igraph_vector_int_destroy(&c_edges); IGRAPH_FINALLY_CLEAN(1); r_result = edges; @@ -432,7 +432,7 @@ SEXP R_igraph_get_all_eids_between(SEXP graph, SEXP from, SEXP to, SEXP directed SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_eids, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_eids); c_from = (igraph_integer_t) REAL(from)[0]; @@ -443,7 +443,7 @@ SEXP R_igraph_get_all_eids_between(SEXP graph, SEXP from, SEXP to, SEXP directed IGRAPH_R_CHECK(igraph_get_all_eids_between(&c_graph, &c_eids, c_from, c_to, c_directed)); /* Convert output */ - PROTECT(eids=R_igraph_vector_int_to_SEXPp1(&c_eids)); + PROTECT(eids=Ry_igraph_vector_int_to_SEXPp1(&c_eids)); igraph_vector_int_destroy(&c_eids); IGRAPH_FINALLY_CLEAN(1); r_result = eids; @@ -465,7 +465,7 @@ SEXP R_igraph_incident(SEXP graph, SEXP vid, SEXP mode) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_eids, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_eids); c_vid = (igraph_integer_t) REAL(vid)[0]; @@ -474,7 +474,7 @@ SEXP R_igraph_incident(SEXP graph, SEXP vid, SEXP mode) { IGRAPH_R_CHECK(igraph_incident(&c_graph, &c_eids, c_vid, c_mode)); /* Convert output */ - PROTECT(eids=R_igraph_vector_int_to_SEXPp1(&c_eids)); + PROTECT(eids=Ry_igraph_vector_int_to_SEXPp1(&c_eids)); igraph_vector_int_destroy(&c_eids); IGRAPH_FINALLY_CLEAN(1); r_result = eids; @@ -496,7 +496,7 @@ SEXP R_igraph_adjacency(SEXP adjmatrix, SEXP mode, SEXP loops) { SEXP r_result; /* Convert input */ - R_SEXP_to_matrix(adjmatrix, &c_adjmatrix); + Rz_SEXP_to_matrix(adjmatrix, &c_adjmatrix); c_mode = (igraph_adjacency_t) Rf_asInteger(mode); c_loops = (igraph_loops_t) Rf_asInteger(loops); /* Call igraph */ @@ -504,7 +504,7 @@ SEXP R_igraph_adjacency(SEXP adjmatrix, SEXP mode, SEXP loops) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -528,7 +528,7 @@ SEXP R_igraph_weighted_adjacency(SEXP adjmatrix, SEXP mode, SEXP loops) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_matrix(adjmatrix, &c_adjmatrix); + Rz_SEXP_to_matrix(adjmatrix, &c_adjmatrix); c_mode = (igraph_adjacency_t) Rf_asInteger(mode); IGRAPH_R_CHECK(igraph_vector_init(&c_weights, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_weights); @@ -541,10 +541,10 @@ SEXP R_igraph_weighted_adjacency(SEXP adjmatrix, SEXP mode, SEXP loops) { PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); - PROTECT(weights=R_igraph_0orvector_to_SEXP(&c_weights)); + PROTECT(weights=Ry_igraph_0orvector_to_SEXP(&c_weights)); igraph_vector_destroy(&c_weights); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, graph); @@ -581,7 +581,7 @@ SEXP R_igraph_wheel(SEXP n, SEXP mode, SEXP center) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -611,7 +611,7 @@ SEXP R_igraph_hypercube(SEXP n, SEXP directed) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -635,7 +635,7 @@ SEXP R_igraph_square_lattice(SEXP dimvector, SEXP nei, SEXP directed, SEXP mutua SEXP r_result; /* Convert input */ - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(dimvector, &c_dimvector)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(dimvector, &c_dimvector)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_dimvector); IGRAPH_R_CHECK_INT(nei); c_nei = (igraph_integer_t) REAL(nei)[0]; @@ -644,14 +644,14 @@ SEXP R_igraph_square_lattice(SEXP dimvector, SEXP nei, SEXP directed, SEXP mutua IGRAPH_R_CHECK_BOOL(mutual); c_mutual = LOGICAL(mutual)[0]; if (!Rf_isNull(periodic)) { - R_SEXP_to_vector_bool(periodic, &c_periodic); + Rz_SEXP_to_vector_bool(periodic, &c_periodic); } /* Call igraph */ IGRAPH_R_CHECK(igraph_square_lattice(&c_graph, &c_dimvector, c_nei, c_directed, c_mutual, (Rf_isNull(periodic) ? 0 : &c_periodic))); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_dimvector); @@ -675,7 +675,7 @@ SEXP R_igraph_triangular_lattice(SEXP dimvector, SEXP directed, SEXP mutual) { SEXP r_result; /* Convert input */ - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(dimvector, &c_dimvector)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(dimvector, &c_dimvector)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_dimvector); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; @@ -686,7 +686,7 @@ SEXP R_igraph_triangular_lattice(SEXP dimvector, SEXP directed, SEXP mutual) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_dimvector); @@ -721,7 +721,7 @@ SEXP R_igraph_path_graph(SEXP n, SEXP directed, SEXP mutual) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -754,7 +754,7 @@ SEXP R_igraph_cycle_graph(SEXP n, SEXP directed, SEXP mutual) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -775,7 +775,7 @@ SEXP R_igraph_symmetric_tree(SEXP branches, SEXP type) { SEXP r_result; /* Convert input */ - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(branches, &c_branches)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(branches, &c_branches)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_branches); c_type = (igraph_tree_mode_t) Rf_asInteger(type); /* Call igraph */ @@ -783,7 +783,7 @@ SEXP R_igraph_symmetric_tree(SEXP branches, SEXP type) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_branches); @@ -817,7 +817,7 @@ SEXP R_igraph_regular_tree(SEXP h, SEXP k, SEXP type) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -847,7 +847,7 @@ SEXP R_igraph_full_citation(SEXP n, SEXP directed) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -874,7 +874,7 @@ SEXP R_igraph_atlas(SEXP number) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -898,7 +898,7 @@ SEXP R_igraph_extended_chordal_ring(SEXP nodes, SEXP W, SEXP directed) { /* Convert input */ IGRAPH_R_CHECK_INT(nodes); c_nodes = (igraph_integer_t) REAL(nodes)[0]; - R_SEXP_to_matrix_int(W, &c_W); + Rz_SEXP_to_matrix_int(W, &c_W); IGRAPH_FINALLY(igraph_matrix_int_destroy, &c_W); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; @@ -907,7 +907,7 @@ SEXP R_igraph_extended_chordal_ring(SEXP nodes, SEXP W, SEXP directed) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_matrix_int_destroy(&c_W); @@ -931,7 +931,7 @@ SEXP R_igraph_graph_power(SEXP graph, SEXP order, SEXP directed) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK_INT(order); c_order = (igraph_integer_t) REAL(order)[0]; IGRAPH_R_CHECK_BOOL(directed); @@ -941,7 +941,7 @@ SEXP R_igraph_graph_power(SEXP graph, SEXP order, SEXP directed) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_res); - PROTECT(res=R_igraph_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_to_SEXP(&c_res)); IGRAPH_I_DESTROY(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -961,13 +961,13 @@ SEXP R_igraph_linegraph(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ IGRAPH_R_CHECK(igraph_linegraph(&c_graph, &c_linegraph)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_linegraph); - PROTECT(linegraph=R_igraph_to_SEXP(&c_linegraph)); + PROTECT(linegraph=Ry_igraph_to_SEXP(&c_linegraph)); IGRAPH_I_DESTROY(&c_linegraph); IGRAPH_FINALLY_CLEAN(1); r_result = linegraph; @@ -997,7 +997,7 @@ SEXP R_igraph_de_bruijn(SEXP m, SEXP n) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -1027,7 +1027,7 @@ SEXP R_igraph_kautz(SEXP m, SEXP n) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -1053,7 +1053,7 @@ SEXP R_igraph_famous(SEXP name) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -1077,7 +1077,7 @@ SEXP R_igraph_lcf_vector(SEXP n, SEXP shifts, SEXP repeats) { /* Convert input */ IGRAPH_R_CHECK_INT(n); c_n = (igraph_integer_t) REAL(n)[0]; - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(shifts, &c_shifts)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(shifts, &c_shifts)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_shifts); IGRAPH_R_CHECK_INT(repeats); c_repeats = (igraph_integer_t) REAL(repeats)[0]; @@ -1086,7 +1086,7 @@ SEXP R_igraph_lcf_vector(SEXP n, SEXP shifts, SEXP repeats) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_shifts); @@ -1115,7 +1115,7 @@ SEXP R_igraph_mycielski_graph(SEXP k) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -1137,7 +1137,7 @@ SEXP R_igraph_adjlist(SEXP adjlist, SEXP mode, SEXP duplicate) { SEXP r_result; /* Convert input */ - IGRAPH_R_CHECK(R_SEXP_to_igraph_adjlist(adjlist, &c_adjlist)); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_adjlist(adjlist, &c_adjlist)); c_mode = (igraph_neimode_t) Rf_asInteger(mode); IGRAPH_R_CHECK_BOOL(duplicate); c_duplicate = LOGICAL(duplicate)[0]; @@ -1146,7 +1146,7 @@ SEXP R_igraph_adjlist(SEXP adjlist, SEXP mode, SEXP duplicate) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_adjlist_destroy(&c_adjlist); @@ -1188,10 +1188,10 @@ SEXP R_igraph_full_bipartite(SEXP n1, SEXP n2, SEXP directed, SEXP mode) { PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); - PROTECT(types=R_igraph_vector_bool_to_SEXP(&c_types)); + PROTECT(types=Ry_igraph_vector_bool_to_SEXP(&c_types)); igraph_vector_bool_destroy(&c_types); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, graph); @@ -1222,7 +1222,7 @@ SEXP R_igraph_full_multipartite(SEXP n, SEXP directed, SEXP mode) { /* Convert input */ IGRAPH_R_CHECK(igraph_vector_int_init(&c_types, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_types); - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(n, &c_n)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(n, &c_n)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_n); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; @@ -1234,10 +1234,10 @@ SEXP R_igraph_full_multipartite(SEXP n, SEXP directed, SEXP mode) { PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); - PROTECT(types=R_igraph_vector_int_to_SEXPp1(&c_types)); + PROTECT(types=Ry_igraph_vector_int_to_SEXPp1(&c_types)); igraph_vector_int_destroy(&c_types); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_n); @@ -1267,10 +1267,10 @@ SEXP R_igraph_realize_degree_sequence(SEXP out_deg, SEXP in_deg, SEXP allowed_ed SEXP r_result; /* Convert input */ - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(out_deg, &c_out_deg)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(out_deg, &c_out_deg)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_out_deg); if (!Rf_isNull(in_deg)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(in_deg, &c_in_deg)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(in_deg, &c_in_deg)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_in_deg); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_in_deg, 0)); @@ -1283,7 +1283,7 @@ SEXP R_igraph_realize_degree_sequence(SEXP out_deg, SEXP in_deg, SEXP allowed_ed /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_out_deg); @@ -1310,9 +1310,9 @@ SEXP R_igraph_realize_bipartite_degree_sequence(SEXP degrees1, SEXP degrees2, SE SEXP r_result; /* Convert input */ - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(degrees1, &c_degrees1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(degrees1, &c_degrees1)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_degrees1); - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(degrees2, &c_degrees2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(degrees2, &c_degrees2)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_degrees2); c_allowed_edge_types = (igraph_edge_type_sw_t) Rf_asInteger(allowed_edge_types); c_method = (igraph_realize_degseq_t) Rf_asInteger(method); @@ -1321,7 +1321,7 @@ SEXP R_igraph_realize_bipartite_degree_sequence(SEXP degrees1, SEXP degrees2, SE /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_degrees1); @@ -1349,7 +1349,7 @@ SEXP R_igraph_circulant(SEXP n, SEXP shifts, SEXP directed) { /* Convert input */ IGRAPH_R_CHECK_INT(n); c_n = (igraph_integer_t) REAL(n)[0]; - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(shifts, &c_shifts)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(shifts, &c_shifts)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_shifts); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; @@ -1358,7 +1358,7 @@ SEXP R_igraph_circulant(SEXP n, SEXP shifts, SEXP directed) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_shifts); @@ -1390,7 +1390,7 @@ SEXP R_igraph_generalized_petersen(SEXP n, SEXP k) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -1426,10 +1426,10 @@ SEXP R_igraph_turan(SEXP n, SEXP r) { PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); - PROTECT(types=R_igraph_vector_int_to_SEXPp1(&c_types)); + PROTECT(types=Ry_igraph_vector_int_to_SEXPp1(&c_types)); igraph_vector_int_destroy(&c_types); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, graph); @@ -1470,7 +1470,7 @@ SEXP R_igraph_erdos_renyi_game_gnp(SEXP n, SEXP p, SEXP directed, SEXP loops) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -1506,7 +1506,7 @@ SEXP R_igraph_erdos_renyi_game_gnm(SEXP n, SEXP m, SEXP directed, SEXP loops) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -1542,7 +1542,7 @@ SEXP R_igraph_growing_random_game(SEXP n, SEXP m, SEXP directed, SEXP citation) /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -1574,10 +1574,10 @@ SEXP R_igraph_preference_game(SEXP nodes, SEXP types, SEXP type_dist, SEXP fixed c_nodes = (igraph_integer_t) REAL(nodes)[0]; IGRAPH_R_CHECK_INT(types); c_types = (igraph_integer_t) REAL(types)[0]; - R_SEXP_to_vector(type_dist, &c_type_dist); + Rz_SEXP_to_vector(type_dist, &c_type_dist); IGRAPH_R_CHECK_BOOL(fixed_sizes); c_fixed_sizes = LOGICAL(fixed_sizes)[0]; - R_SEXP_to_matrix(pref_matrix, &c_pref_matrix); + Rz_SEXP_to_matrix(pref_matrix, &c_pref_matrix); IGRAPH_R_CHECK(igraph_vector_int_init(&c_node_type_vec, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_node_type_vec); IGRAPH_R_CHECK_BOOL(directed); @@ -1591,10 +1591,10 @@ SEXP R_igraph_preference_game(SEXP nodes, SEXP types, SEXP type_dist, SEXP fixed PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); - PROTECT(node_type_vec=R_igraph_vector_int_to_SEXP(&c_node_type_vec)); + PROTECT(node_type_vec=Ry_igraph_vector_int_to_SEXP(&c_node_type_vec)); igraph_vector_int_destroy(&c_node_type_vec); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, graph); @@ -1634,8 +1634,8 @@ SEXP R_igraph_asymmetric_preference_game(SEXP nodes, SEXP out_types, SEXP in_typ c_out_types = (igraph_integer_t) REAL(out_types)[0]; IGRAPH_R_CHECK_INT(in_types); c_in_types = (igraph_integer_t) REAL(in_types)[0]; - R_SEXP_to_matrix(type_dist_matrix, &c_type_dist_matrix); - R_SEXP_to_matrix(pref_matrix, &c_pref_matrix); + Rz_SEXP_to_matrix(type_dist_matrix, &c_type_dist_matrix); + Rz_SEXP_to_matrix(pref_matrix, &c_pref_matrix); IGRAPH_R_CHECK(igraph_vector_int_init(&c_node_type_out_vec, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_node_type_out_vec); IGRAPH_R_CHECK(igraph_vector_int_init(&c_node_type_in_vec, 0)); @@ -1649,13 +1649,13 @@ SEXP R_igraph_asymmetric_preference_game(SEXP nodes, SEXP out_types, SEXP in_typ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); - PROTECT(node_type_out_vec=R_igraph_vector_int_to_SEXP(&c_node_type_out_vec)); + PROTECT(node_type_out_vec=Ry_igraph_vector_int_to_SEXP(&c_node_type_out_vec)); igraph_vector_int_destroy(&c_node_type_out_vec); IGRAPH_FINALLY_CLEAN(1); - PROTECT(node_type_in_vec=R_igraph_vector_int_to_SEXP(&c_node_type_in_vec)); + PROTECT(node_type_in_vec=Ry_igraph_vector_int_to_SEXP(&c_node_type_in_vec)); igraph_vector_int_destroy(&c_node_type_in_vec); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, graph); @@ -1683,7 +1683,7 @@ SEXP R_igraph_rewire_edges(SEXP graph, SEXP prob, SEXP loops, SEXP multiple) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph_copy(graph, &c_graph); + Rz_SEXP_to_igraph_copy(graph, &c_graph); IGRAPH_FINALLY(igraph_destroy, &c_graph); IGRAPH_R_CHECK_REAL(prob); c_prob = REAL(prob)[0]; @@ -1695,7 +1695,7 @@ SEXP R_igraph_rewire_edges(SEXP graph, SEXP prob, SEXP loops, SEXP multiple) { IGRAPH_R_CHECK(igraph_rewire_edges(&c_graph, c_prob, c_loops, c_multiple)); /* Convert output */ - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -1716,7 +1716,7 @@ SEXP R_igraph_rewire_directed_edges(SEXP graph, SEXP prob, SEXP loops, SEXP mode SEXP r_result; /* Convert input */ - R_SEXP_to_igraph_copy(graph, &c_graph); + Rz_SEXP_to_igraph_copy(graph, &c_graph); IGRAPH_FINALLY(igraph_destroy, &c_graph); IGRAPH_R_CHECK_REAL(prob); c_prob = REAL(prob)[0]; @@ -1727,7 +1727,7 @@ SEXP R_igraph_rewire_directed_edges(SEXP graph, SEXP prob, SEXP loops, SEXP mode IGRAPH_R_CHECK(igraph_rewire_directed_edges(&c_graph, c_prob, c_loops, c_mode)); /* Convert output */ - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -1766,7 +1766,7 @@ SEXP R_igraph_forest_fire_game(SEXP nodes, SEXP fw_prob, SEXP bw_factor, SEXP am /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -1802,7 +1802,7 @@ SEXP R_igraph_simple_interconnected_islands_game(SEXP islands_n, SEXP islands_si /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -1825,9 +1825,9 @@ SEXP R_igraph_chung_lu_game(SEXP out_weights, SEXP in_weights, SEXP loops, SEXP SEXP r_result; /* Convert input */ - R_SEXP_to_vector(out_weights, &c_out_weights); + Rz_SEXP_to_vector(out_weights, &c_out_weights); if (!Rf_isNull(in_weights)) { - R_SEXP_to_vector(in_weights, &c_in_weights); + Rz_SEXP_to_vector(in_weights, &c_in_weights); } IGRAPH_R_CHECK_BOOL(loops); c_loops = LOGICAL(loops)[0]; @@ -1837,7 +1837,7 @@ SEXP R_igraph_chung_lu_game(SEXP out_weights, SEXP in_weights, SEXP loops, SEXP /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -1863,9 +1863,9 @@ SEXP R_igraph_static_fitness_game(SEXP no_of_edges, SEXP fitness_out, SEXP fitne /* Convert input */ IGRAPH_R_CHECK_INT(no_of_edges); c_no_of_edges = (igraph_integer_t) REAL(no_of_edges)[0]; - R_SEXP_to_vector(fitness_out, &c_fitness_out); + Rz_SEXP_to_vector(fitness_out, &c_fitness_out); if (!Rf_isNull(fitness_in)) { - R_SEXP_to_vector(fitness_in, &c_fitness_in); + Rz_SEXP_to_vector(fitness_in, &c_fitness_in); } IGRAPH_R_CHECK_BOOL(loops); c_loops = LOGICAL(loops)[0]; @@ -1876,7 +1876,7 @@ SEXP R_igraph_static_fitness_game(SEXP no_of_edges, SEXP fitness_out, SEXP fitne /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -1921,7 +1921,7 @@ SEXP R_igraph_static_power_law_game(SEXP no_of_nodes, SEXP no_of_edges, SEXP exp /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -1957,7 +1957,7 @@ SEXP R_igraph_k_regular_game(SEXP no_of_nodes, SEXP k, SEXP directed, SEXP multi /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -1983,8 +1983,8 @@ SEXP R_igraph_sbm_game(SEXP n, SEXP pref_matrix, SEXP block_sizes, SEXP directed /* Convert input */ IGRAPH_R_CHECK_INT(n); c_n = (igraph_integer_t) REAL(n)[0]; - R_SEXP_to_matrix(pref_matrix, &c_pref_matrix); - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(block_sizes, &c_block_sizes)); + Rz_SEXP_to_matrix(pref_matrix, &c_pref_matrix); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(block_sizes, &c_block_sizes)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_block_sizes); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; @@ -1995,7 +1995,7 @@ SEXP R_igraph_sbm_game(SEXP n, SEXP pref_matrix, SEXP block_sizes, SEXP directed /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_block_sizes); @@ -2025,8 +2025,8 @@ SEXP R_igraph_hsbm_game(SEXP n, SEXP m, SEXP rho, SEXP C, SEXP p) { c_n = (igraph_integer_t) REAL(n)[0]; IGRAPH_R_CHECK_INT(m); c_m = (igraph_integer_t) REAL(m)[0]; - R_SEXP_to_vector(rho, &c_rho); - R_SEXP_to_matrix(C, &c_C); + Rz_SEXP_to_vector(rho, &c_rho); + Rz_SEXP_to_matrix(C, &c_C); IGRAPH_R_CHECK_REAL(p); c_p = REAL(p)[0]; /* Call igraph */ @@ -2034,7 +2034,7 @@ SEXP R_igraph_hsbm_game(SEXP n, SEXP m, SEXP rho, SEXP C, SEXP p) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -2060,10 +2060,10 @@ SEXP R_igraph_hsbm_list_game(SEXP n, SEXP mlist, SEXP rholist, SEXP Clist, SEXP /* Convert input */ IGRAPH_R_CHECK_INT(n); c_n = (igraph_integer_t) REAL(n)[0]; - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(mlist, &c_mlist)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(mlist, &c_mlist)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_mlist); - R_igraph_SEXP_to_vector_list(rholist, &c_rholist); - R_igraph_SEXP_to_matrixlist(Clist, &c_Clist); + Ry_igraph_SEXP_to_vector_list(rholist, &c_rholist); + Ry_igraph_SEXP_to_matrixlist(Clist, &c_Clist); IGRAPH_R_CHECK_REAL(p); c_p = REAL(p)[0]; /* Call igraph */ @@ -2071,7 +2071,7 @@ SEXP R_igraph_hsbm_list_game(SEXP n, SEXP mlist, SEXP rholist, SEXP Clist, SEXP /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_mlist); @@ -2096,13 +2096,13 @@ SEXP R_igraph_correlated_game(SEXP old_graph, SEXP corr, SEXP p, SEXP permutatio SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(old_graph, &c_old_graph); + Rz_SEXP_to_igraph(old_graph, &c_old_graph); IGRAPH_R_CHECK_REAL(corr); c_corr = REAL(corr)[0]; IGRAPH_R_CHECK_REAL(p); c_p = REAL(p)[0]; if (!Rf_isNull(permutation)) { - R_SEXP_to_vector_int_copy(permutation, &c_permutation); + Rz_SEXP_to_vector_int_copy(permutation, &c_permutation); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_permutation); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_permutation, 0)); @@ -2113,7 +2113,7 @@ SEXP R_igraph_correlated_game(SEXP old_graph, SEXP corr, SEXP p, SEXP permutatio /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_new_graph); - PROTECT(new_graph=R_igraph_to_SEXP(&c_new_graph)); + PROTECT(new_graph=Ry_igraph_to_SEXP(&c_new_graph)); IGRAPH_I_DESTROY(&c_new_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_permutation); @@ -2150,7 +2150,7 @@ SEXP R_igraph_correlated_pair_game(SEXP n, SEXP corr, SEXP p, SEXP directed, SEX IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; if (!Rf_isNull(permutation)) { - R_SEXP_to_vector_int_copy(permutation, &c_permutation); + Rz_SEXP_to_vector_int_copy(permutation, &c_permutation); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_permutation); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_permutation, 0)); @@ -2163,11 +2163,11 @@ SEXP R_igraph_correlated_pair_game(SEXP n, SEXP corr, SEXP p, SEXP directed, SEX PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); IGRAPH_FINALLY(igraph_destroy, &c_graph1); - PROTECT(graph1=R_igraph_to_SEXP(&c_graph1)); + PROTECT(graph1=Ry_igraph_to_SEXP(&c_graph1)); IGRAPH_I_DESTROY(&c_graph1); IGRAPH_FINALLY_CLEAN(1); IGRAPH_FINALLY(igraph_destroy, &c_graph2); - PROTECT(graph2=R_igraph_to_SEXP(&c_graph2)); + PROTECT(graph2=Ry_igraph_to_SEXP(&c_graph2)); IGRAPH_I_DESTROY(&c_graph2); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_permutation); @@ -2195,7 +2195,7 @@ SEXP R_igraph_dot_product_game(SEXP vecs, SEXP directed) { SEXP r_result; /* Convert input */ - R_SEXP_to_matrix(vecs, &c_vecs); + Rz_SEXP_to_matrix(vecs, &c_vecs); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; /* Call igraph */ @@ -2203,7 +2203,7 @@ SEXP R_igraph_dot_product_game(SEXP vecs, SEXP directed) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -2240,7 +2240,7 @@ SEXP R_igraph_sample_sphere_surface(SEXP dim, SEXP n, SEXP radius, SEXP positive IGRAPH_R_CHECK(igraph_sample_sphere_surface(c_dim, c_n, c_radius, c_positive, &c_res)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -2277,7 +2277,7 @@ SEXP R_igraph_sample_sphere_volume(SEXP dim, SEXP n, SEXP radius, SEXP positive) IGRAPH_R_CHECK(igraph_sample_sphere_volume(c_dim, c_n, c_radius, c_positive, &c_res)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -2300,14 +2300,14 @@ SEXP R_igraph_sample_dirichlet(SEXP n, SEXP alpha) { /* Convert input */ IGRAPH_R_CHECK_INT(n); c_n = (igraph_integer_t) REAL(n)[0]; - R_SEXP_to_vector(alpha, &c_alpha); + Rz_SEXP_to_vector(alpha, &c_alpha); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); /* Call igraph */ IGRAPH_R_CHECK(igraph_sample_dirichlet(c_n, &c_alpha, &c_res)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -2329,7 +2329,7 @@ SEXP R_igraph_are_adjacent(SEXP graph, SEXP v1, SEXP v2) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_v1 = (igraph_integer_t) REAL(v1)[0]; c_v2 = (igraph_integer_t) REAL(v2)[0]; /* Call igraph */ @@ -2363,16 +2363,16 @@ SEXP R_igraph_closeness(SEXP graph, SEXP vids, SEXP mode, SEXP weights, SEXP nor SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); IGRAPH_R_CHECK(igraph_vector_int_init(&c_reachable_count, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_reachable_count); igraph_vector_int_t c_vids_data; - R_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); c_mode = (igraph_neimode_t) Rf_asInteger(mode); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK_BOOL(normalized); c_normalized = LOGICAL(normalized)[0]; @@ -2382,10 +2382,10 @@ SEXP R_igraph_closeness(SEXP graph, SEXP vids, SEXP mode, SEXP weights, SEXP nor /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); - PROTECT(reachable_count=R_igraph_vector_int_to_SEXP(&c_reachable_count)); + PROTECT(reachable_count=Ry_igraph_vector_int_to_SEXP(&c_reachable_count)); igraph_vector_int_destroy(&c_reachable_count); IGRAPH_FINALLY_CLEAN(1); PROTECT(all_reachable=NEW_LOGICAL(1)); @@ -2425,16 +2425,16 @@ SEXP R_igraph_closeness_cutoff(SEXP graph, SEXP vids, SEXP mode, SEXP weights, S SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); IGRAPH_R_CHECK(igraph_vector_int_init(&c_reachable_count, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_reachable_count); igraph_vector_int_t c_vids_data; - R_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); c_mode = (igraph_neimode_t) Rf_asInteger(mode); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK_BOOL(normalized); c_normalized = LOGICAL(normalized)[0]; @@ -2446,10 +2446,10 @@ SEXP R_igraph_closeness_cutoff(SEXP graph, SEXP vids, SEXP mode, SEXP weights, S /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); - PROTECT(reachable_count=R_igraph_vector_int_to_SEXP(&c_reachable_count)); + PROTECT(reachable_count=Ry_igraph_vector_int_to_SEXP(&c_reachable_count)); igraph_vector_int_destroy(&c_reachable_count); IGRAPH_FINALLY_CLEAN(1); PROTECT(all_reachable=NEW_LOGICAL(1)); @@ -2485,7 +2485,7 @@ SEXP R_igraph_get_shortest_path(SEXP graph, SEXP from, SEXP to, SEXP mode) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertices, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertices); IGRAPH_R_CHECK(igraph_vector_int_init(&c_edges, 0)); @@ -2499,10 +2499,10 @@ SEXP R_igraph_get_shortest_path(SEXP graph, SEXP from, SEXP to, SEXP mode) { /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(vertices=R_igraph_vector_int_to_SEXPp1(&c_vertices)); + PROTECT(vertices=Ry_igraph_vector_int_to_SEXPp1(&c_vertices)); igraph_vector_int_destroy(&c_vertices); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edges=R_igraph_vector_int_to_SEXPp1(&c_edges)); + PROTECT(edges=Ry_igraph_vector_int_to_SEXPp1(&c_edges)); igraph_vector_int_destroy(&c_edges); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, vertices); @@ -2533,7 +2533,7 @@ SEXP R_igraph_get_shortest_path_bellman_ford(SEXP graph, SEXP from, SEXP to, SEX SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertices, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertices); IGRAPH_R_CHECK(igraph_vector_int_init(&c_edges, 0)); @@ -2541,7 +2541,7 @@ SEXP R_igraph_get_shortest_path_bellman_ford(SEXP graph, SEXP from, SEXP to, SEX c_from = (igraph_integer_t) REAL(from)[0]; c_to = (igraph_integer_t) REAL(to)[0]; if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ @@ -2550,10 +2550,10 @@ SEXP R_igraph_get_shortest_path_bellman_ford(SEXP graph, SEXP from, SEXP to, SEX /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(vertices=R_igraph_vector_int_to_SEXPp1(&c_vertices)); + PROTECT(vertices=Ry_igraph_vector_int_to_SEXPp1(&c_vertices)); igraph_vector_int_destroy(&c_vertices); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edges=R_igraph_vector_int_to_SEXPp1(&c_edges)); + PROTECT(edges=Ry_igraph_vector_int_to_SEXPp1(&c_edges)); igraph_vector_int_destroy(&c_edges); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, vertices); @@ -2584,7 +2584,7 @@ SEXP R_igraph_get_shortest_path_dijkstra(SEXP graph, SEXP from, SEXP to, SEXP we SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertices, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertices); IGRAPH_R_CHECK(igraph_vector_int_init(&c_edges, 0)); @@ -2592,7 +2592,7 @@ SEXP R_igraph_get_shortest_path_dijkstra(SEXP graph, SEXP from, SEXP to, SEXP we c_from = (igraph_integer_t) REAL(from)[0]; c_to = (igraph_integer_t) REAL(to)[0]; if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ @@ -2601,10 +2601,10 @@ SEXP R_igraph_get_shortest_path_dijkstra(SEXP graph, SEXP from, SEXP to, SEXP we /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(vertices=R_igraph_vector_int_to_SEXPp1(&c_vertices)); + PROTECT(vertices=Ry_igraph_vector_int_to_SEXPp1(&c_vertices)); igraph_vector_int_destroy(&c_vertices); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edges=R_igraph_vector_int_to_SEXPp1(&c_edges)); + PROTECT(edges=Ry_igraph_vector_int_to_SEXPp1(&c_edges)); igraph_vector_int_destroy(&c_edges); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, vertices); @@ -2636,7 +2636,7 @@ SEXP R_igraph_get_all_shortest_paths(SEXP graph, SEXP from, SEXP to, SEXP mode) SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_vertices, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_vertices); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_edges, 0)); @@ -2645,7 +2645,7 @@ SEXP R_igraph_get_all_shortest_paths(SEXP graph, SEXP from, SEXP to, SEXP mode) IGRAPH_FINALLY(igraph_vector_int_destroy, &c_nrgeo); c_from = (igraph_integer_t) REAL(from)[0]; igraph_vector_int_t c_to_data; - R_SEXP_to_igraph_vs(to, &c_graph, &c_to, &c_to_data); + Rz_SEXP_to_igraph_vs(to, &c_graph, &c_to, &c_to_data); c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_get_all_shortest_paths(&c_graph, &c_vertices, &c_edges, &c_nrgeo, c_from, c_to, c_mode)); @@ -2653,13 +2653,13 @@ SEXP R_igraph_get_all_shortest_paths(SEXP graph, SEXP from, SEXP to, SEXP mode) /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(vertices=R_igraph_vector_int_list_to_SEXPp1(&c_vertices)); + PROTECT(vertices=Ry_igraph_vector_int_list_to_SEXPp1(&c_vertices)); igraph_vector_int_list_destroy(&c_vertices); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edges=R_igraph_vector_int_list_to_SEXPp1(&c_edges)); + PROTECT(edges=Ry_igraph_vector_int_list_to_SEXPp1(&c_edges)); igraph_vector_int_list_destroy(&c_edges); IGRAPH_FINALLY_CLEAN(1); - PROTECT(nrgeo=R_igraph_vector_int_to_SEXP(&c_nrgeo)); + PROTECT(nrgeo=Ry_igraph_vector_int_to_SEXP(&c_nrgeo)); igraph_vector_int_destroy(&c_nrgeo); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_to_data); @@ -2696,7 +2696,7 @@ SEXP R_igraph_get_all_shortest_paths_dijkstra(SEXP graph, SEXP from, SEXP to, SE SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_vertices, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_vertices); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_edges, 0)); @@ -2705,9 +2705,9 @@ SEXP R_igraph_get_all_shortest_paths_dijkstra(SEXP graph, SEXP from, SEXP to, SE IGRAPH_FINALLY(igraph_vector_int_destroy, &c_nrgeo); c_from = (igraph_integer_t) REAL(from)[0]; igraph_vector_int_t c_to_data; - R_SEXP_to_igraph_vs(to, &c_graph, &c_to, &c_to_data); + Rz_SEXP_to_igraph_vs(to, &c_graph, &c_to, &c_to_data); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ @@ -2716,13 +2716,13 @@ SEXP R_igraph_get_all_shortest_paths_dijkstra(SEXP graph, SEXP from, SEXP to, SE /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(vertices=R_igraph_vector_int_list_to_SEXPp1(&c_vertices)); + PROTECT(vertices=Ry_igraph_vector_int_list_to_SEXPp1(&c_vertices)); igraph_vector_int_list_destroy(&c_vertices); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edges=R_igraph_vector_int_list_to_SEXPp1(&c_edges)); + PROTECT(edges=Ry_igraph_vector_int_list_to_SEXPp1(&c_edges)); igraph_vector_int_list_destroy(&c_edges); IGRAPH_FINALLY_CLEAN(1); - PROTECT(nrgeo=R_igraph_vector_int_to_SEXP(&c_nrgeo)); + PROTECT(nrgeo=Ry_igraph_vector_int_to_SEXP(&c_nrgeo)); igraph_vector_int_destroy(&c_nrgeo); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_to_data); @@ -2757,15 +2757,15 @@ SEXP R_igraph_voronoi(SEXP graph, SEXP generators, SEXP weights, SEXP mode, SEXP SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_membership, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_membership); IGRAPH_R_CHECK(igraph_vector_init(&c_distances, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_distances); - R_SEXP_to_vector_int_copy(generators, &c_generators); + Rz_SEXP_to_vector_int_copy(generators, &c_generators); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_generators); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } c_mode = (igraph_neimode_t) Rf_asInteger(mode); c_tiebreaker = (igraph_voronoi_tiebreaker_t) Rf_asInteger(tiebreaker); @@ -2775,10 +2775,10 @@ SEXP R_igraph_voronoi(SEXP graph, SEXP generators, SEXP weights, SEXP mode, SEXP /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(membership=R_igraph_vector_int_to_SEXP(&c_membership)); + PROTECT(membership=Ry_igraph_vector_int_to_SEXP(&c_membership)); igraph_vector_int_destroy(&c_membership); IGRAPH_FINALLY_CLEAN(1); - PROTECT(distances=R_igraph_vector_to_SEXP(&c_distances)); + PROTECT(distances=Ry_igraph_vector_to_SEXP(&c_distances)); igraph_vector_destroy(&c_distances); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_generators); @@ -2809,12 +2809,12 @@ SEXP R_igraph_get_all_simple_paths(SEXP graph, SEXP from, SEXP to, SEXP cutoff, SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_res); c_from = (igraph_integer_t) REAL(from)[0]; igraph_vector_int_t c_to_data; - R_SEXP_to_igraph_vs(to, &c_graph, &c_to, &c_to_data); + Rz_SEXP_to_igraph_vs(to, &c_graph, &c_to, &c_to_data); IGRAPH_R_CHECK_INT(cutoff); c_cutoff = (igraph_integer_t) REAL(cutoff)[0]; c_mode = (igraph_neimode_t) Rf_asInteger(mode); @@ -2822,7 +2822,7 @@ SEXP R_igraph_get_all_simple_paths(SEXP graph, SEXP from, SEXP to, SEXP cutoff, IGRAPH_R_CHECK(igraph_get_all_simple_paths(&c_graph, &c_res, c_from, c_to, c_cutoff, c_mode)); /* Convert output */ - PROTECT(res=R_igraph_vector_int_to_SEXPp1(&c_res)); + PROTECT(res=Ry_igraph_vector_int_to_SEXPp1(&c_res)); igraph_vector_int_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_to_data); @@ -2851,9 +2851,9 @@ SEXP R_igraph_get_k_shortest_paths(SEXP graph, SEXP weights, SEXP k, SEXP from, SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_vertex_paths, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_vertex_paths); @@ -2870,10 +2870,10 @@ SEXP R_igraph_get_k_shortest_paths(SEXP graph, SEXP weights, SEXP k, SEXP from, /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(vertex_paths=R_igraph_vector_int_list_to_SEXPp1(&c_vertex_paths)); + PROTECT(vertex_paths=Ry_igraph_vector_int_list_to_SEXPp1(&c_vertex_paths)); igraph_vector_int_list_destroy(&c_vertex_paths); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edge_paths=R_igraph_vector_int_list_to_SEXPp1(&c_edge_paths)); + PROTECT(edge_paths=Ry_igraph_vector_int_list_to_SEXPp1(&c_edge_paths)); igraph_vector_int_list_destroy(&c_edge_paths); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, vertex_paths); @@ -2904,14 +2904,14 @@ SEXP R_igraph_get_widest_path(SEXP graph, SEXP from, SEXP to, SEXP weights, SEXP SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertices, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertices); IGRAPH_R_CHECK(igraph_vector_int_init(&c_edges, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edges); c_from = (igraph_integer_t) REAL(from)[0]; c_to = (igraph_integer_t) REAL(to)[0]; - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_get_widest_path(&c_graph, &c_vertices, &c_edges, c_from, c_to, &c_weights, c_mode)); @@ -2919,10 +2919,10 @@ SEXP R_igraph_get_widest_path(SEXP graph, SEXP from, SEXP to, SEXP weights, SEXP /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(vertices=R_igraph_vector_int_to_SEXPp1(&c_vertices)); + PROTECT(vertices=Ry_igraph_vector_int_to_SEXPp1(&c_vertices)); igraph_vector_int_destroy(&c_vertices); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edges=R_igraph_vector_int_to_SEXPp1(&c_edges)); + PROTECT(edges=Ry_igraph_vector_int_to_SEXPp1(&c_edges)); igraph_vector_int_destroy(&c_edges); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, vertices); @@ -2957,15 +2957,15 @@ SEXP R_igraph_get_widest_paths(SEXP graph, SEXP from, SEXP to, SEXP weights, SEX SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_vertices, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_vertices); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_edges, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_edges); c_from = (igraph_integer_t) REAL(from)[0]; igraph_vector_int_t c_to_data; - R_SEXP_to_igraph_vs(to, &c_graph, &c_to, &c_to_data); - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_igraph_vs(to, &c_graph, &c_to, &c_to_data); + Rz_SEXP_to_vector(weights, &c_weights); c_mode = (igraph_neimode_t) Rf_asInteger(mode); IGRAPH_R_CHECK(igraph_vector_int_init(&c_parents, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_parents); @@ -2977,18 +2977,18 @@ SEXP R_igraph_get_widest_paths(SEXP graph, SEXP from, SEXP to, SEXP weights, SEX /* Convert output */ PROTECT(r_result=NEW_LIST(4)); PROTECT(r_names=NEW_CHARACTER(4)); - PROTECT(vertices=R_igraph_vector_int_list_to_SEXPp1(&c_vertices)); + PROTECT(vertices=Ry_igraph_vector_int_list_to_SEXPp1(&c_vertices)); igraph_vector_int_list_destroy(&c_vertices); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edges=R_igraph_vector_int_list_to_SEXPp1(&c_edges)); + PROTECT(edges=Ry_igraph_vector_int_list_to_SEXPp1(&c_edges)); igraph_vector_int_list_destroy(&c_edges); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_to_data); igraph_vs_destroy(&c_to); - PROTECT(parents=R_igraph_vector_int_to_SEXP(&c_parents)); + PROTECT(parents=Ry_igraph_vector_int_to_SEXP(&c_parents)); igraph_vector_int_destroy(&c_parents); IGRAPH_FINALLY_CLEAN(1); - PROTECT(inbound_edges=R_igraph_vector_int_to_SEXP(&c_inbound_edges)); + PROTECT(inbound_edges=Ry_igraph_vector_int_to_SEXP(&c_inbound_edges)); igraph_vector_int_destroy(&c_inbound_edges); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, vertices); @@ -3021,20 +3021,20 @@ SEXP R_igraph_widest_path_widths_dijkstra(SEXP graph, SEXP from, SEXP to, SEXP w SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); igraph_vector_int_t c_from_data; - R_SEXP_to_igraph_vs(from, &c_graph, &c_from, &c_from_data); + Rz_SEXP_to_igraph_vs(from, &c_graph, &c_from, &c_from_data); igraph_vector_int_t c_to_data; - R_SEXP_to_igraph_vs(to, &c_graph, &c_to, &c_to_data); - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_igraph_vs(to, &c_graph, &c_to, &c_to_data); + Rz_SEXP_to_vector(weights, &c_weights); c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_widest_path_widths_dijkstra(&c_graph, &c_res, c_from, c_to, &c_weights, c_mode)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_from_data); @@ -3062,20 +3062,20 @@ SEXP R_igraph_widest_path_widths_floyd_warshall(SEXP graph, SEXP from, SEXP to, SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); igraph_vector_int_t c_from_data; - R_SEXP_to_igraph_vs(from, &c_graph, &c_from, &c_from_data); + Rz_SEXP_to_igraph_vs(from, &c_graph, &c_from, &c_from_data); igraph_vector_int_t c_to_data; - R_SEXP_to_igraph_vs(to, &c_graph, &c_to, &c_to_data); - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_igraph_vs(to, &c_graph, &c_to, &c_to_data); + Rz_SEXP_to_vector(weights, &c_weights); c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_widest_path_widths_floyd_warshall(&c_graph, &c_res, c_from, c_to, &c_weights, c_mode)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_from_data); @@ -3101,19 +3101,19 @@ SEXP R_igraph_spanner(SEXP graph, SEXP stretch, SEXP weights) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_spanner, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_spanner); IGRAPH_R_CHECK_REAL(stretch); c_stretch = REAL(stretch)[0]; if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_spanner(&c_graph, &c_spanner, c_stretch, (Rf_isNull(weights) ? 0 : &c_weights))); /* Convert output */ - PROTECT(spanner=R_igraph_vector_int_to_SEXPp1(&c_spanner)); + PROTECT(spanner=Ry_igraph_vector_int_to_SEXPp1(&c_spanner)); igraph_vector_int_destroy(&c_spanner); IGRAPH_FINALLY_CLEAN(1); r_result = spanner; @@ -3137,15 +3137,15 @@ SEXP R_igraph_betweenness_cutoff(SEXP graph, SEXP vids, SEXP directed, SEXP weig SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); 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); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK_REAL(cutoff); c_cutoff = REAL(cutoff)[0]; @@ -3153,7 +3153,7 @@ SEXP R_igraph_betweenness_cutoff(SEXP graph, SEXP vids, SEXP directed, SEXP weig IGRAPH_R_CHECK(igraph_betweenness_cutoff(&c_graph, &c_res, c_vids, c_directed, (Rf_isNull(weights) ? 0 : &c_weights), c_cutoff)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -3180,25 +3180,25 @@ SEXP R_igraph_betweenness_subset(SEXP graph, SEXP vids, SEXP directed, SEXP sour SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); 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); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; igraph_vector_int_t c_sources_data; - R_SEXP_to_igraph_vs(sources, &c_graph, &c_sources, &c_sources_data); + Rz_SEXP_to_igraph_vs(sources, &c_graph, &c_sources, &c_sources_data); igraph_vector_int_t c_targets_data; - R_SEXP_to_igraph_vs(targets, &c_graph, &c_targets, &c_targets_data); + Rz_SEXP_to_igraph_vs(targets, &c_graph, &c_targets, &c_targets_data); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_betweenness_subset(&c_graph, &c_res, c_vids, c_directed, c_sources, c_targets, (Rf_isNull(weights) ? 0 : &c_weights))); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -3226,19 +3226,19 @@ SEXP R_igraph_edge_betweenness(SEXP graph, SEXP directed, SEXP weights) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_edge_betweenness(&c_graph, &c_res, c_directed, (Rf_isNull(weights) ? 0 : &c_weights))); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -3261,13 +3261,13 @@ SEXP R_igraph_edge_betweenness_cutoff(SEXP graph, SEXP directed, SEXP weights, S SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK_REAL(cutoff); c_cutoff = REAL(cutoff)[0]; @@ -3275,7 +3275,7 @@ SEXP R_igraph_edge_betweenness_cutoff(SEXP graph, SEXP directed, SEXP weights, S IGRAPH_R_CHECK(igraph_edge_betweenness_cutoff(&c_graph, &c_res, c_directed, (Rf_isNull(weights) ? 0 : &c_weights), c_cutoff)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -3300,25 +3300,25 @@ SEXP R_igraph_edge_betweenness_subset(SEXP graph, SEXP eids, SEXP directed, SEXP SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); igraph_vector_int_t c_eids_data; - IGRAPH_R_CHECK(R_SEXP_to_igraph_es(eids, &c_graph, &c_eids, &c_eids_data)); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_es(eids, &c_graph, &c_eids, &c_eids_data)); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; igraph_vector_int_t c_sources_data; - R_SEXP_to_igraph_vs(sources, &c_graph, &c_sources, &c_sources_data); + Rz_SEXP_to_igraph_vs(sources, &c_graph, &c_sources, &c_sources_data); igraph_vector_int_t c_targets_data; - R_SEXP_to_igraph_vs(targets, &c_graph, &c_targets, &c_targets_data); + Rz_SEXP_to_igraph_vs(targets, &c_graph, &c_targets, &c_targets_data); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_edge_betweenness_subset(&c_graph, &c_res, c_eids, c_directed, c_sources, c_targets, (Rf_isNull(weights) ? 0 : &c_weights))); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_eids_data); @@ -3349,14 +3349,14 @@ SEXP R_igraph_harmonic_centrality_cutoff(SEXP graph, SEXP vids, SEXP mode, SEXP SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); 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); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); c_mode = (igraph_neimode_t) Rf_asInteger(mode); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK_BOOL(normalized); c_normalized = LOGICAL(normalized)[0]; @@ -3366,7 +3366,7 @@ SEXP R_igraph_harmonic_centrality_cutoff(SEXP graph, SEXP vids, SEXP mode, SEXP IGRAPH_R_CHECK(igraph_harmonic_centrality_cutoff(&c_graph, &c_res, c_vids, c_mode, (Rf_isNull(weights) ? 0 : &c_weights), c_normalized, c_cutoff)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -3398,25 +3398,25 @@ SEXP R_igraph_personalized_pagerank(SEXP graph, SEXP algo, SEXP vids, SEXP direc SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_algo = (igraph_pagerank_algo_t) Rf_asInteger(algo); IGRAPH_R_CHECK(igraph_vector_init(&c_vector, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_vector); igraph_vector_int_t c_vids_data; - R_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; IGRAPH_R_CHECK_REAL(damping); c_damping = REAL(damping)[0]; if (!Rf_isNull(personalized)) { - R_SEXP_to_vector(personalized, &c_personalized); + Rz_SEXP_to_vector(personalized, &c_personalized); } if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } if (!Rf_isNull(options)) { if (c_algo == IGRAPH_PAGERANK_ALGO_ARPACK) { - R_SEXP_to_igraph_arpack_options(options, &c_options1); + Rz_SEXP_to_igraph_arpack_options(options, &c_options1); c_options = &c_options1; } else { c_options = NULL; @@ -3428,7 +3428,7 @@ SEXP R_igraph_personalized_pagerank(SEXP graph, SEXP algo, SEXP vids, SEXP direc /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(vector=R_igraph_vector_to_SEXP(&c_vector)); + PROTECT(vector=Ry_igraph_vector_to_SEXP(&c_vector)); igraph_vector_destroy(&c_vector); IGRAPH_FINALLY_CLEAN(1); PROTECT(value=NEW_NUMERIC(1)); @@ -3436,7 +3436,7 @@ SEXP R_igraph_personalized_pagerank(SEXP graph, SEXP algo, SEXP vids, SEXP direc igraph_vector_int_destroy(&c_vids_data); igraph_vs_destroy(&c_vids); if (c_algo == IGRAPH_PAGERANK_ALGO_ARPACK) { - PROTECT(options = Rx_igraph_arpack_options_to_SEXP(&c_options1)); + PROTECT(options = Ry_igraph_arpack_options_to_SEXP(&c_options1)); } else { PROTECT(options); } @@ -3474,24 +3474,24 @@ SEXP R_igraph_personalized_pagerank_vs(SEXP graph, SEXP algo, SEXP vids, SEXP di SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_algo = (igraph_pagerank_algo_t) Rf_asInteger(algo); IGRAPH_R_CHECK(igraph_vector_init(&c_vector, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_vector); igraph_vector_int_t c_vids_data; - R_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; IGRAPH_R_CHECK_REAL(damping); c_damping = REAL(damping)[0]; igraph_vector_int_t c_reset_vids_data; - R_SEXP_to_igraph_vs(reset_vids, &c_graph, &c_reset_vids, &c_reset_vids_data); + Rz_SEXP_to_igraph_vs(reset_vids, &c_graph, &c_reset_vids, &c_reset_vids_data); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } if (!Rf_isNull(options)) { if (c_algo == IGRAPH_PAGERANK_ALGO_ARPACK) { - R_SEXP_to_igraph_arpack_options(options, &c_options1); + Rz_SEXP_to_igraph_arpack_options(options, &c_options1); c_options = &c_options1; } else { c_options = NULL; @@ -3503,7 +3503,7 @@ SEXP R_igraph_personalized_pagerank_vs(SEXP graph, SEXP algo, SEXP vids, SEXP di /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(vector=R_igraph_vector_to_SEXP(&c_vector)); + PROTECT(vector=Ry_igraph_vector_to_SEXP(&c_vector)); igraph_vector_destroy(&c_vector); IGRAPH_FINALLY_CLEAN(1); PROTECT(value=NEW_NUMERIC(1)); @@ -3513,7 +3513,7 @@ SEXP R_igraph_personalized_pagerank_vs(SEXP graph, SEXP algo, SEXP vids, SEXP di igraph_vector_int_destroy(&c_reset_vids_data); igraph_vs_destroy(&c_reset_vids); if (c_algo == IGRAPH_PAGERANK_ALGO_ARPACK) { - PROTECT(options = Rx_igraph_arpack_options_to_SEXP(&c_options1)); + PROTECT(options = Ry_igraph_arpack_options_to_SEXP(&c_options1)); } else { PROTECT(options); } @@ -3541,7 +3541,7 @@ SEXP R_igraph_rewire(SEXP rewire, SEXP n, SEXP mode) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph_copy(rewire, &c_rewire); + Rz_SEXP_to_igraph_copy(rewire, &c_rewire); IGRAPH_FINALLY(igraph_destroy, &c_rewire); IGRAPH_R_CHECK_INT(n); c_n = (igraph_integer_t) REAL(n)[0]; @@ -3550,7 +3550,7 @@ SEXP R_igraph_rewire(SEXP rewire, SEXP n, SEXP mode) { IGRAPH_R_CHECK(igraph_rewire(&c_rewire, c_n, c_mode)); /* Convert output */ - PROTECT(rewire=R_igraph_to_SEXP(&c_rewire)); + PROTECT(rewire=Ry_igraph_to_SEXP(&c_rewire)); IGRAPH_I_DESTROY(&c_rewire); IGRAPH_FINALLY_CLEAN(1); r_result = rewire; @@ -3572,16 +3572,16 @@ SEXP R_igraph_induced_subgraph(SEXP graph, SEXP vids, SEXP impl) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); igraph_vector_int_t c_vids_data; - R_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); c_impl = (igraph_subgraph_implementation_t) Rf_asInteger(impl); /* Call igraph */ IGRAPH_R_CHECK(igraph_induced_subgraph(&c_graph, &c_res, c_vids, c_impl)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_res); - PROTECT(res=R_igraph_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_to_SEXP(&c_res)); IGRAPH_I_DESTROY(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -3605,9 +3605,9 @@ SEXP R_igraph_subgraph_from_edges(SEXP graph, SEXP eids, SEXP delete_vertices) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); igraph_vector_int_t c_eids_data; - IGRAPH_R_CHECK(R_SEXP_to_igraph_es(eids, &c_graph, &c_eids, &c_eids_data)); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_es(eids, &c_graph, &c_eids, &c_eids_data)); IGRAPH_R_CHECK_BOOL(delete_vertices); c_delete_vertices = LOGICAL(delete_vertices)[0]; /* Call igraph */ @@ -3615,7 +3615,7 @@ SEXP R_igraph_subgraph_from_edges(SEXP graph, SEXP eids, SEXP delete_vertices) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_res); - PROTECT(res=R_igraph_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_to_SEXP(&c_res)); IGRAPH_I_DESTROY(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_eids_data); @@ -3636,15 +3636,15 @@ SEXP R_igraph_reverse_edges(SEXP graph, SEXP eids) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph_copy(graph, &c_graph); + Rz_SEXP_to_igraph_copy(graph, &c_graph); IGRAPH_FINALLY(igraph_destroy, &c_graph); igraph_vector_int_t c_eids_data; - IGRAPH_R_CHECK(R_SEXP_to_igraph_es(eids, &c_graph, &c_eids, &c_eids_data)); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_es(eids, &c_graph, &c_eids, &c_eids_data)); /* Call igraph */ IGRAPH_R_CHECK(igraph_reverse_edges(&c_graph, c_eids)); /* Convert output */ - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_eids_data); @@ -3671,9 +3671,9 @@ SEXP R_igraph_average_path_length_dijkstra(SEXP graph, SEXP weights, SEXP direct SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; @@ -3714,7 +3714,7 @@ SEXP R_igraph_path_length_hist(SEXP graph, SEXP directed) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); IGRAPH_R_CHECK_BOOL(directed); @@ -3725,7 +3725,7 @@ SEXP R_igraph_path_length_hist(SEXP graph, SEXP directed) { /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); PROTECT(unconnected=NEW_NUMERIC(1)); @@ -3753,19 +3753,19 @@ SEXP R_igraph_simplify(SEXP graph, SEXP remove_multiple, SEXP remove_loops, SEXP SEXP r_result; /* Convert input */ - R_SEXP_to_igraph_copy(graph, &c_graph); + Rz_SEXP_to_igraph_copy(graph, &c_graph); IGRAPH_FINALLY(igraph_destroy, &c_graph); IGRAPH_R_CHECK_BOOL(remove_multiple); c_remove_multiple = LOGICAL(remove_multiple)[0]; IGRAPH_R_CHECK_BOOL(remove_loops); c_remove_loops = LOGICAL(remove_loops)[0]; - R_SEXP_to_attr_comb(edge_attr_comb, &c_edge_attr_comb); + Rz_SEXP_to_attr_comb(edge_attr_comb, &c_edge_attr_comb); IGRAPH_FINALLY(igraph_attribute_combination_destroy, &c_edge_attr_comb); /* Call igraph */ IGRAPH_R_CHECK(igraph_simplify(&c_graph, c_remove_multiple, c_remove_loops, &c_edge_attr_comb)); /* Convert output */ - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_attribute_combination_destroy(&c_edge_attr_comb); @@ -3788,7 +3788,7 @@ SEXP R_igraph_transitivity_undirected(SEXP graph, SEXP mode) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_mode = (igraph_transitivity_mode_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_transitivity_undirected(&c_graph, &c_res, c_mode)); @@ -3815,17 +3815,17 @@ SEXP R_igraph_transitivity_local_undirected(SEXP graph, SEXP vids, SEXP mode) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); 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); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); c_mode = (igraph_transitivity_mode_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_transitivity_local_undirected(&c_graph, &c_res, c_vids, c_mode)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -3848,7 +3848,7 @@ SEXP R_igraph_transitivity_avglocal_undirected(SEXP graph, SEXP mode) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_mode = (igraph_transitivity_mode_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_transitivity_avglocal_undirected(&c_graph, &c_res, c_mode)); @@ -3876,20 +3876,20 @@ SEXP R_igraph_transitivity_barrat(SEXP graph, SEXP vids, SEXP weights, SEXP mode SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); 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); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } c_mode = (igraph_transitivity_mode_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_transitivity_barrat(&c_graph, &c_res, c_vids, (Rf_isNull(weights) ? 0 : &c_weights), c_mode)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -3915,11 +3915,11 @@ SEXP R_igraph_ecc(SEXP graph, SEXP eids, SEXP k, SEXP offset, SEXP normalize) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); igraph_vector_int_t c_eids_data; - IGRAPH_R_CHECK(R_SEXP_to_igraph_es(eids, &c_graph, &c_eids, &c_eids_data)); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_es(eids, &c_graph, &c_eids, &c_eids_data)); IGRAPH_R_CHECK_INT(k); c_k = (igraph_integer_t) REAL(k)[0]; IGRAPH_R_CHECK_BOOL(offset); @@ -3930,7 +3930,7 @@ SEXP R_igraph_ecc(SEXP graph, SEXP eids, SEXP k, SEXP offset, SEXP normalize) { IGRAPH_R_CHECK(igraph_ecc(&c_graph, &c_res, c_eids, c_k, c_offset, c_normalize)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_eids_data); @@ -3954,7 +3954,7 @@ SEXP R_igraph_reciprocity(SEXP graph, SEXP ignore_loops, SEXP mode) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK_BOOL(ignore_loops); c_ignore_loops = LOGICAL(ignore_loops)[0]; c_mode = (igraph_reciprocity_t) Rf_asInteger(mode); @@ -3983,19 +3983,19 @@ SEXP R_igraph_constraint(SEXP graph, SEXP vids, SEXP weights) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); 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); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_constraint(&c_graph, &c_res, c_vids, (Rf_isNull(weights) ? 0 : &c_weights))); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -4020,10 +4020,10 @@ SEXP R_igraph_maxdegree(SEXP graph, SEXP vids, SEXP mode, SEXP loops) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_res=0; igraph_vector_int_t c_vids_data; - R_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); c_mode = (igraph_neimode_t) Rf_asInteger(mode); IGRAPH_R_CHECK_BOOL(loops); c_loops = LOGICAL(loops)[0]; @@ -4053,7 +4053,7 @@ SEXP R_igraph_density(SEXP graph, SEXP loops) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK_BOOL(loops); c_loops = LOGICAL(loops)[0]; /* Call igraph */ @@ -4080,7 +4080,7 @@ SEXP R_igraph_mean_degree(SEXP graph, SEXP loops) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK_BOOL(loops); c_loops = LOGICAL(loops)[0]; /* Call igraph */ @@ -4107,7 +4107,7 @@ SEXP R_igraph_topological_sorting(SEXP graph, SEXP mode) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_res); c_mode = (igraph_neimode_t) Rf_asInteger(mode); @@ -4115,7 +4115,7 @@ SEXP R_igraph_topological_sorting(SEXP graph, SEXP mode) { IGRAPH_R_CHECK(igraph_topological_sorting(&c_graph, &c_res, c_mode)); /* Convert output */ - PROTECT(res=R_igraph_vector_int_to_SEXPp1(&c_res)); + PROTECT(res=Ry_igraph_vector_int_to_SEXPp1(&c_res)); igraph_vector_int_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -4137,18 +4137,18 @@ SEXP R_igraph_feedback_arc_set(SEXP graph, SEXP weights, SEXP algo) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_result, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_result); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } c_algo = (igraph_fas_algorithm_t) Rf_asInteger(algo); /* Call igraph */ IGRAPH_R_CHECK(igraph_feedback_arc_set(&c_graph, &c_result, (Rf_isNull(weights) ? 0 : &c_weights), c_algo)); /* Convert output */ - PROTECT(result=R_igraph_vector_int_to_SEXPp1(&c_result)); + PROTECT(result=Ry_igraph_vector_int_to_SEXPp1(&c_result)); igraph_vector_int_destroy(&c_result); IGRAPH_FINALLY_CLEAN(1); r_result = result; @@ -4170,18 +4170,18 @@ SEXP R_igraph_feedback_vertex_set(SEXP graph, SEXP weights, SEXP algo) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_result, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_result); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } c_algo = (igraph_fvs_algorithm_t) Rf_asInteger(algo); /* Call igraph */ IGRAPH_R_CHECK(igraph_feedback_vertex_set(&c_graph, &c_result, (Rf_isNull(weights) ? 0 : &c_weights), c_algo)); /* Convert output */ - PROTECT(result=R_igraph_vector_int_to_SEXPp1(&c_result)); + PROTECT(result=Ry_igraph_vector_int_to_SEXPp1(&c_result)); igraph_vector_int_destroy(&c_result); IGRAPH_FINALLY_CLEAN(1); r_result = result; @@ -4202,16 +4202,16 @@ SEXP R_igraph_is_loop(SEXP graph, SEXP es) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_bool_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_bool_destroy, &c_res); igraph_vector_int_t c_es_data; - IGRAPH_R_CHECK(R_SEXP_to_igraph_es(es, &c_graph, &c_es, &c_es_data)); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_es(es, &c_graph, &c_es, &c_es_data)); /* Call igraph */ IGRAPH_R_CHECK(igraph_is_loop(&c_graph, &c_res, c_es)); /* Convert output */ - PROTECT(res=R_igraph_vector_bool_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_bool_to_SEXP(&c_res)); igraph_vector_bool_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_es_data); @@ -4233,7 +4233,7 @@ SEXP R_igraph_is_dag(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ IGRAPH_R_CHECK(igraph_is_dag(&c_graph, &c_res)); @@ -4257,7 +4257,7 @@ SEXP R_igraph_is_acyclic(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ IGRAPH_R_CHECK(igraph_is_acyclic(&c_graph, &c_res)); @@ -4281,7 +4281,7 @@ SEXP R_igraph_is_simple(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ IGRAPH_R_CHECK(igraph_is_simple(&c_graph, &c_res)); @@ -4306,16 +4306,16 @@ SEXP R_igraph_is_multiple(SEXP graph, SEXP es) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_bool_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_bool_destroy, &c_res); igraph_vector_int_t c_es_data; - IGRAPH_R_CHECK(R_SEXP_to_igraph_es(es, &c_graph, &c_es, &c_es_data)); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_es(es, &c_graph, &c_es, &c_es_data)); /* Call igraph */ IGRAPH_R_CHECK(igraph_is_multiple(&c_graph, &c_res, c_es)); /* Convert output */ - PROTECT(res=R_igraph_vector_bool_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_bool_to_SEXP(&c_res)); igraph_vector_bool_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_es_data); @@ -4337,7 +4337,7 @@ SEXP R_igraph_has_loop(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ IGRAPH_R_CHECK(igraph_has_loop(&c_graph, &c_res)); @@ -4361,7 +4361,7 @@ SEXP R_igraph_has_multiple(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ IGRAPH_R_CHECK(igraph_has_multiple(&c_graph, &c_res)); @@ -4385,7 +4385,7 @@ SEXP R_igraph_count_loops(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_loop_count=0; /* Call igraph */ IGRAPH_R_CHECK(igraph_count_loops(&c_graph, &c_loop_count)); @@ -4411,16 +4411,16 @@ SEXP R_igraph_count_multiple(SEXP graph, SEXP es) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_res); igraph_vector_int_t c_es_data; - IGRAPH_R_CHECK(R_SEXP_to_igraph_es(es, &c_graph, &c_es, &c_es_data)); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_es(es, &c_graph, &c_es, &c_es_data)); /* Call igraph */ IGRAPH_R_CHECK(igraph_count_multiple(&c_graph, &c_res, c_es)); /* Convert output */ - PROTECT(res=R_igraph_vector_int_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_int_to_SEXP(&c_res)); igraph_vector_int_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_es_data); @@ -4444,7 +4444,7 @@ SEXP R_igraph_girth(SEXP graph) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_circle, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_circle); /* Call igraph */ @@ -4455,7 +4455,7 @@ SEXP R_igraph_girth(SEXP graph) { PROTECT(r_names=NEW_CHARACTER(2)); PROTECT(girth=NEW_NUMERIC(1)); REAL(girth)[0]=c_girth; - PROTECT(circle=R_igraph_vector_int_to_SEXPp1(&c_circle)); + PROTECT(circle=Ry_igraph_vector_int_to_SEXPp1(&c_circle)); igraph_vector_int_destroy(&c_circle); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, girth); @@ -4480,7 +4480,7 @@ SEXP R_igraph_is_perfect(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ IGRAPH_R_CHECK(igraph_is_perfect(&c_graph, &c_res)); @@ -4510,7 +4510,7 @@ SEXP R_igraph_eigenvector_centrality(SEXP graph, SEXP directed, SEXP scale, SEXP SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_vector, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_vector); IGRAPH_R_CHECK_BOOL(directed); @@ -4518,21 +4518,21 @@ SEXP R_igraph_eigenvector_centrality(SEXP graph, SEXP directed, SEXP scale, SEXP IGRAPH_R_CHECK_BOOL(scale); c_scale = LOGICAL(scale)[0]; if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } - R_SEXP_to_igraph_arpack_options(options, &c_options); + Rz_SEXP_to_igraph_arpack_options(options, &c_options); /* Call igraph */ IGRAPH_R_CHECK(igraph_eigenvector_centrality(&c_graph, &c_vector, &c_value, c_directed, c_scale, (Rf_isNull(weights) ? 0 : &c_weights), &c_options)); /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(vector=R_igraph_vector_to_SEXP(&c_vector)); + PROTECT(vector=Ry_igraph_vector_to_SEXP(&c_vector)); igraph_vector_destroy(&c_vector); IGRAPH_FINALLY_CLEAN(1); PROTECT(value=NEW_NUMERIC(1)); REAL(value)[0]=c_value; - PROTECT(options=Rx_igraph_arpack_options_to_SEXP(&c_options)); + PROTECT(options=Ry_igraph_arpack_options_to_SEXP(&c_options)); SET_VECTOR_ELT(r_result, 0, vector); SET_VECTOR_ELT(r_result, 1, value); SET_VECTOR_ELT(r_result, 2, options); @@ -4564,7 +4564,7 @@ SEXP R_igraph_hub_and_authority_scores(SEXP graph, SEXP scale, SEXP weights, SEX SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_hub, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_hub); IGRAPH_R_CHECK(igraph_vector_init(&c_authority, 0)); @@ -4572,24 +4572,24 @@ SEXP R_igraph_hub_and_authority_scores(SEXP graph, SEXP scale, SEXP weights, SEX IGRAPH_R_CHECK_BOOL(scale); c_scale = LOGICAL(scale)[0]; if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } - R_SEXP_to_igraph_arpack_options(options, &c_options); + Rz_SEXP_to_igraph_arpack_options(options, &c_options); /* Call igraph */ IGRAPH_R_CHECK(igraph_hub_and_authority_scores(&c_graph, &c_hub, &c_authority, &c_value, c_scale, (Rf_isNull(weights) ? 0 : &c_weights), &c_options)); /* Convert output */ PROTECT(r_result=NEW_LIST(4)); PROTECT(r_names=NEW_CHARACTER(4)); - PROTECT(hub=R_igraph_vector_to_SEXP(&c_hub)); + PROTECT(hub=Ry_igraph_vector_to_SEXP(&c_hub)); igraph_vector_destroy(&c_hub); IGRAPH_FINALLY_CLEAN(1); - PROTECT(authority=R_igraph_vector_to_SEXP(&c_authority)); + PROTECT(authority=Ry_igraph_vector_to_SEXP(&c_authority)); igraph_vector_destroy(&c_authority); IGRAPH_FINALLY_CLEAN(1); PROTECT(value=NEW_NUMERIC(1)); REAL(value)[0]=c_value; - PROTECT(options=Rx_igraph_arpack_options_to_SEXP(&c_options)); + PROTECT(options=Ry_igraph_arpack_options_to_SEXP(&c_options)); SET_VECTOR_ELT(r_result, 0, hub); SET_VECTOR_ELT(r_result, 1, authority); SET_VECTOR_ELT(r_result, 2, value); @@ -4620,9 +4620,9 @@ SEXP R_igraph_unfold_tree(SEXP graph, SEXP mode, SEXP roots) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_mode = (igraph_neimode_t) Rf_asInteger(mode); - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(roots, &c_roots)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(roots, &c_roots)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_roots); IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_index, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_index); @@ -4633,12 +4633,12 @@ SEXP R_igraph_unfold_tree(SEXP graph, SEXP mode, SEXP roots) { PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); IGRAPH_FINALLY(igraph_destroy, &c_tree); - PROTECT(tree=R_igraph_to_SEXP(&c_tree)); + PROTECT(tree=Ry_igraph_to_SEXP(&c_tree)); IGRAPH_I_DESTROY(&c_tree); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_roots); IGRAPH_FINALLY_CLEAN(1); - PROTECT(vertex_index=R_igraph_vector_int_to_SEXPp1(&c_vertex_index)); + PROTECT(vertex_index=Ry_igraph_vector_int_to_SEXPp1(&c_vertex_index)); igraph_vector_int_destroy(&c_vertex_index); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, tree); @@ -4665,18 +4665,18 @@ SEXP R_igraph_is_mutual(SEXP graph, SEXP es, SEXP loops) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_bool_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_bool_destroy, &c_res); igraph_vector_int_t c_es_data; - IGRAPH_R_CHECK(R_SEXP_to_igraph_es(es, &c_graph, &c_es, &c_es_data)); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_es(es, &c_graph, &c_es, &c_es_data)); IGRAPH_R_CHECK_BOOL(loops); c_loops = LOGICAL(loops)[0]; /* Call igraph */ IGRAPH_R_CHECK(igraph_is_mutual(&c_graph, &c_res, c_es, c_loops)); /* Convert output */ - PROTECT(res=R_igraph_vector_bool_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_bool_to_SEXP(&c_res)); igraph_vector_bool_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_es_data); @@ -4699,7 +4699,7 @@ SEXP R_igraph_has_mutual(SEXP graph, SEXP loops) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK_BOOL(loops); c_loops = LOGICAL(loops)[0]; /* Call igraph */ @@ -4727,7 +4727,7 @@ SEXP R_igraph_maximum_cardinality_search(SEXP graph) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_alpha, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_alpha); IGRAPH_R_CHECK(igraph_vector_int_init(&c_alpham1, 0)); @@ -4738,10 +4738,10 @@ SEXP R_igraph_maximum_cardinality_search(SEXP graph) { /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(alpha=R_igraph_vector_int_to_SEXPp1(&c_alpha)); + PROTECT(alpha=Ry_igraph_vector_int_to_SEXPp1(&c_alpha)); igraph_vector_int_destroy(&c_alpha); IGRAPH_FINALLY_CLEAN(1); - PROTECT(alpham1=R_igraph_vector_int_to_SEXPp1(&c_alpham1)); + PROTECT(alpham1=Ry_igraph_vector_int_to_SEXPp1(&c_alpham1)); igraph_vector_int_destroy(&c_alpham1); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, alpha); @@ -4772,9 +4772,9 @@ SEXP R_igraph_avg_nearest_neighbor_degree(SEXP graph, SEXP vids, SEXP mode, SEXP SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); igraph_vector_int_t c_vids_data; - R_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); c_mode = (igraph_neimode_t) Rf_asInteger(mode); c_neighbor_degree_mode = (igraph_neimode_t) Rf_asInteger(neighbor_degree_mode); IGRAPH_R_CHECK(igraph_vector_init(&c_knn, 0)); @@ -4782,7 +4782,7 @@ SEXP R_igraph_avg_nearest_neighbor_degree(SEXP graph, SEXP vids, SEXP mode, SEXP IGRAPH_R_CHECK(igraph_vector_init(&c_knnk, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_knnk); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_avg_nearest_neighbor_degree(&c_graph, c_vids, c_mode, c_neighbor_degree_mode, &c_knn, &c_knnk, (Rf_isNull(weights) ? 0 : &c_weights))); @@ -4792,10 +4792,10 @@ SEXP R_igraph_avg_nearest_neighbor_degree(SEXP graph, SEXP vids, SEXP mode, SEXP PROTECT(r_names=NEW_CHARACTER(2)); igraph_vector_int_destroy(&c_vids_data); igraph_vs_destroy(&c_vids); - PROTECT(knn=R_igraph_vector_to_SEXP(&c_knn)); + PROTECT(knn=Ry_igraph_vector_to_SEXP(&c_knn)); igraph_vector_destroy(&c_knn); IGRAPH_FINALLY_CLEAN(1); - PROTECT(knnk=R_igraph_vector_to_SEXP(&c_knnk)); + PROTECT(knnk=Ry_igraph_vector_to_SEXP(&c_knnk)); igraph_vector_destroy(&c_knnk); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, knn); @@ -4824,9 +4824,9 @@ SEXP R_igraph_degree_correlation_vector(SEXP graph, SEXP weights, SEXP from_mode SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK(igraph_vector_init(&c_knnk, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_knnk); @@ -4838,7 +4838,7 @@ SEXP R_igraph_degree_correlation_vector(SEXP graph, SEXP weights, SEXP from_mode IGRAPH_R_CHECK(igraph_degree_correlation_vector(&c_graph, (Rf_isNull(weights) ? 0 : &c_weights), &c_knnk, c_from_mode, c_to_mode, c_directed_neighbors)); /* Convert output */ - PROTECT(knnk=R_igraph_vector_to_SEXP(&c_knnk)); + PROTECT(knnk=Ry_igraph_vector_to_SEXP(&c_knnk)); igraph_vector_destroy(&c_knnk); IGRAPH_FINALLY_CLEAN(1); r_result = knnk; @@ -4863,13 +4863,13 @@ SEXP R_igraph_rich_club_sequence(SEXP graph, SEXP weights, SEXP vertex_order, SE SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); - R_SEXP_to_vector_int_copy(vertex_order, &c_vertex_order); + Rz_SEXP_to_vector_int_copy(vertex_order, &c_vertex_order); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_order); IGRAPH_R_CHECK_BOOL(normalized); c_normalized = LOGICAL(normalized)[0]; @@ -4881,7 +4881,7 @@ SEXP R_igraph_rich_club_sequence(SEXP graph, SEXP weights, SEXP vertex_order, SE IGRAPH_R_CHECK(igraph_rich_club_sequence(&c_graph, (Rf_isNull(weights) ? 0 : &c_weights), &c_res, &c_vertex_order, c_normalized, c_loops, c_directed)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vertex_order); @@ -4907,22 +4907,22 @@ SEXP R_igraph_strength(SEXP graph, SEXP vids, SEXP mode, SEXP loops, SEXP weight SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); 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); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); c_mode = (igraph_neimode_t) Rf_asInteger(mode); IGRAPH_R_CHECK_BOOL(loops); c_loops = LOGICAL(loops)[0]; if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_strength(&c_graph, &c_res, c_vids, c_mode, c_loops, (Rf_isNull(weights) ? 0 : &c_weights))); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -4944,7 +4944,7 @@ SEXP R_igraph_centralization(SEXP scores, SEXP theoretical_max, SEXP normalized) igraph_real_t c_result; SEXP r_result; /* Convert input */ - R_SEXP_to_vector(scores, &c_scores); + Rz_SEXP_to_vector(scores, &c_scores); IGRAPH_R_CHECK_REAL(theoretical_max); c_theoretical_max = REAL(theoretical_max)[0]; IGRAPH_R_CHECK_BOOL(normalized); @@ -4979,7 +4979,7 @@ SEXP R_igraph_centralization_degree(SEXP graph, SEXP mode, SEXP loops, SEXP norm SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); c_mode = (igraph_neimode_t) Rf_asInteger(mode); @@ -4993,7 +4993,7 @@ SEXP R_igraph_centralization_degree(SEXP graph, SEXP mode, SEXP loops, SEXP norm /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); PROTECT(centralization=NEW_NUMERIC(1)); @@ -5028,7 +5028,7 @@ SEXP R_igraph_centralization_degree_tmax(SEXP graph, SEXP nodes, SEXP mode, SEXP SEXP r_result; /* Convert input */ if (!Rf_isNull(graph)) { - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); } IGRAPH_R_CHECK_INT(nodes); c_nodes = (igraph_integer_t) REAL(nodes)[0]; @@ -5064,7 +5064,7 @@ SEXP R_igraph_centralization_betweenness(SEXP graph, SEXP directed, SEXP normali SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); IGRAPH_R_CHECK_BOOL(directed); @@ -5077,7 +5077,7 @@ SEXP R_igraph_centralization_betweenness(SEXP graph, SEXP directed, SEXP normali /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); PROTECT(centralization=NEW_NUMERIC(1)); @@ -5111,7 +5111,7 @@ SEXP R_igraph_centralization_betweenness_tmax(SEXP graph, SEXP nodes, SEXP direc SEXP r_result; /* Convert input */ if (!Rf_isNull(graph)) { - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); } IGRAPH_R_CHECK_INT(nodes); c_nodes = (igraph_integer_t) REAL(nodes)[0]; @@ -5146,7 +5146,7 @@ SEXP R_igraph_centralization_closeness(SEXP graph, SEXP mode, SEXP normalized) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); c_mode = (igraph_neimode_t) Rf_asInteger(mode); @@ -5158,7 +5158,7 @@ SEXP R_igraph_centralization_closeness(SEXP graph, SEXP mode, SEXP normalized) { /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); PROTECT(centralization=NEW_NUMERIC(1)); @@ -5192,7 +5192,7 @@ SEXP R_igraph_centralization_closeness_tmax(SEXP graph, SEXP nodes, SEXP mode) { SEXP r_result; /* Convert input */ if (!Rf_isNull(graph)) { - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); } IGRAPH_R_CHECK_INT(nodes); c_nodes = (igraph_integer_t) REAL(nodes)[0]; @@ -5230,14 +5230,14 @@ SEXP R_igraph_centralization_eigenvector_centrality(SEXP graph, SEXP directed, S SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_vector, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_vector); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; IGRAPH_R_CHECK_BOOL(scale); c_scale = LOGICAL(scale)[0]; - R_SEXP_to_igraph_arpack_options(options, &c_options); + Rz_SEXP_to_igraph_arpack_options(options, &c_options); IGRAPH_R_CHECK_BOOL(normalized); c_normalized = LOGICAL(normalized)[0]; /* Call igraph */ @@ -5246,12 +5246,12 @@ SEXP R_igraph_centralization_eigenvector_centrality(SEXP graph, SEXP directed, S /* Convert output */ PROTECT(r_result=NEW_LIST(5)); PROTECT(r_names=NEW_CHARACTER(5)); - PROTECT(vector=R_igraph_vector_to_SEXP(&c_vector)); + PROTECT(vector=Ry_igraph_vector_to_SEXP(&c_vector)); igraph_vector_destroy(&c_vector); IGRAPH_FINALLY_CLEAN(1); PROTECT(value=NEW_NUMERIC(1)); REAL(value)[0]=c_value; - PROTECT(options=Rx_igraph_arpack_options_to_SEXP(&c_options)); + PROTECT(options=Ry_igraph_arpack_options_to_SEXP(&c_options)); PROTECT(centralization=NEW_NUMERIC(1)); REAL(centralization)[0]=c_centralization; PROTECT(theoretical_max=NEW_NUMERIC(1)); @@ -5288,7 +5288,7 @@ SEXP R_igraph_centralization_eigenvector_centrality_tmax(SEXP graph, SEXP nodes, SEXP r_result; /* Convert input */ if (!Rf_isNull(graph)) { - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); } IGRAPH_R_CHECK_INT(nodes); c_nodes = (igraph_integer_t) REAL(nodes)[0]; @@ -5322,8 +5322,8 @@ SEXP R_igraph_assortativity_nominal(SEXP graph, SEXP types, SEXP directed, SEXP SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - R_SEXP_to_vector_int_copy(types, &c_types); + Rz_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_vector_int_copy(types, &c_types); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_types); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; @@ -5358,10 +5358,10 @@ SEXP R_igraph_assortativity(SEXP graph, SEXP values, SEXP values_in, SEXP direct SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - R_SEXP_to_vector(values, &c_values); + Rz_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_vector(values, &c_values); if (!Rf_isNull(values_in)) { - R_SEXP_to_vector(values_in, &c_values_in); + Rz_SEXP_to_vector(values_in, &c_values_in); } IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; @@ -5391,7 +5391,7 @@ SEXP R_igraph_assortativity_degree(SEXP graph, SEXP directed) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; /* Call igraph */ @@ -5420,9 +5420,9 @@ SEXP R_igraph_joint_degree_matrix(SEXP graph, SEXP weights, SEXP max_out_degree, SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK(igraph_matrix_init(&c_jdm, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_jdm); @@ -5434,7 +5434,7 @@ SEXP R_igraph_joint_degree_matrix(SEXP graph, SEXP weights, SEXP max_out_degree, IGRAPH_R_CHECK(igraph_joint_degree_matrix(&c_graph, (Rf_isNull(weights) ? 0 : &c_weights), &c_jdm, c_max_out_degree, c_max_in_degree)); /* Convert output */ - PROTECT(jdm=R_igraph_matrix_to_SEXP(&c_jdm)); + PROTECT(jdm=Ry_igraph_matrix_to_SEXP(&c_jdm)); igraph_matrix_destroy(&c_jdm); IGRAPH_FINALLY_CLEAN(1); r_result = jdm; @@ -5461,9 +5461,9 @@ SEXP R_igraph_joint_degree_distribution(SEXP graph, SEXP weights, SEXP from_mode SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK(igraph_matrix_init(&c_p, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_p); @@ -5481,7 +5481,7 @@ SEXP R_igraph_joint_degree_distribution(SEXP graph, SEXP weights, SEXP from_mode IGRAPH_R_CHECK(igraph_joint_degree_distribution(&c_graph, (Rf_isNull(weights) ? 0 : &c_weights), &c_p, c_from_mode, c_to_mode, c_directed_neighbors, c_normalized, c_max_from_degree, c_max_to_degree)); /* Convert output */ - PROTECT(p=R_igraph_matrix_to_SEXP(&c_p)); + PROTECT(p=Ry_igraph_matrix_to_SEXP(&c_p)); igraph_matrix_destroy(&c_p); IGRAPH_FINALLY_CLEAN(1); r_result = p; @@ -5506,16 +5506,16 @@ SEXP R_igraph_joint_type_distribution(SEXP graph, SEXP weights, SEXP from_types, SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK(igraph_matrix_init(&c_p, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_p); - R_SEXP_to_vector_int_copy(from_types, &c_from_types); + Rz_SEXP_to_vector_int_copy(from_types, &c_from_types); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_from_types); if (!Rf_isNull(to_types)) { - R_SEXP_to_vector_int_copy(to_types, &c_to_types); + Rz_SEXP_to_vector_int_copy(to_types, &c_to_types); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_to_types); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_to_types, 0)); @@ -5529,7 +5529,7 @@ SEXP R_igraph_joint_type_distribution(SEXP graph, SEXP weights, SEXP from_types, IGRAPH_R_CHECK(igraph_joint_type_distribution(&c_graph, (Rf_isNull(weights) ? 0 : &c_weights), &c_p, &c_from_types, (Rf_isNull(to_types) ? 0 : &c_to_types), c_directed, c_normalized)); /* Convert output */ - PROTECT(p=R_igraph_matrix_to_SEXP(&c_p)); + PROTECT(p=Ry_igraph_matrix_to_SEXP(&c_p)); igraph_matrix_destroy(&c_p); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_from_types); @@ -5553,17 +5553,17 @@ SEXP R_igraph_contract_vertices(SEXP graph, SEXP mapping, SEXP vertex_attr_comb) SEXP r_result; /* Convert input */ - R_SEXP_to_igraph_copy(graph, &c_graph); + Rz_SEXP_to_igraph_copy(graph, &c_graph); IGRAPH_FINALLY(igraph_destroy, &c_graph); - R_SEXP_to_vector_int_copy(mapping, &c_mapping); + Rz_SEXP_to_vector_int_copy(mapping, &c_mapping); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_mapping); - R_SEXP_to_attr_comb(vertex_attr_comb, &c_vertex_attr_comb); + Rz_SEXP_to_attr_comb(vertex_attr_comb, &c_vertex_attr_comb); IGRAPH_FINALLY(igraph_attribute_combination_destroy, &c_vertex_attr_comb); /* Call igraph */ IGRAPH_R_CHECK(igraph_contract_vertices(&c_graph, &c_mapping, &c_vertex_attr_comb)); /* Convert output */ - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_mapping); @@ -5590,20 +5590,20 @@ SEXP R_igraph_eccentricity_dijkstra(SEXP graph, SEXP weights, SEXP vids, SEXP mo SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); 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); + Rz_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_dijkstra(&c_graph, (Rf_isNull(weights) ? 0 : &c_weights), &c_res, c_vids, c_mode)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -5627,9 +5627,9 @@ SEXP R_igraph_graph_center_dijkstra(SEXP graph, SEXP weights, SEXP mode) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK(igraph_vector_int_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_res); @@ -5638,7 +5638,7 @@ SEXP R_igraph_graph_center_dijkstra(SEXP graph, SEXP weights, SEXP mode) { IGRAPH_R_CHECK(igraph_graph_center_dijkstra(&c_graph, (Rf_isNull(weights) ? 0 : &c_weights), &c_res, c_mode)); /* Convert output */ - PROTECT(res=R_igraph_vector_int_to_SEXPp1(&c_res)); + PROTECT(res=Ry_igraph_vector_int_to_SEXPp1(&c_res)); igraph_vector_int_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -5660,9 +5660,9 @@ SEXP R_igraph_radius_dijkstra(SEXP graph, SEXP weights, SEXP mode) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ @@ -5695,7 +5695,7 @@ SEXP R_igraph_pseudo_diameter(SEXP graph, SEXP start_vid, SEXP directed, SEXP un SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_start_vid = (igraph_integer_t) REAL(start_vid)[0]; c_from=0; c_to=0; @@ -5747,9 +5747,9 @@ SEXP R_igraph_pseudo_diameter_dijkstra(SEXP graph, SEXP weights, SEXP start_vid, SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } c_start_vid = (igraph_integer_t) REAL(start_vid)[0]; c_from=0; @@ -5796,19 +5796,19 @@ SEXP R_igraph_diversity(SEXP graph, SEXP weights, SEXP vids) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); 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); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); /* Call igraph */ IGRAPH_R_CHECK(igraph_diversity(&c_graph, (Rf_isNull(weights) ? 0 : &c_weights), &c_res, c_vids)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -5837,9 +5837,9 @@ SEXP R_igraph_random_walk(SEXP graph, SEXP weights, SEXP start, SEXP mode, SEXP SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertices, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertices); @@ -5856,10 +5856,10 @@ SEXP R_igraph_random_walk(SEXP graph, SEXP weights, SEXP start, SEXP mode, SEXP /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(vertices=R_igraph_vector_int_to_SEXPp1(&c_vertices)); + PROTECT(vertices=Ry_igraph_vector_int_to_SEXPp1(&c_vertices)); igraph_vector_int_destroy(&c_vertices); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edges=R_igraph_vector_int_to_SEXPp1(&c_edges)); + PROTECT(edges=Ry_igraph_vector_int_to_SEXPp1(&c_edges)); igraph_vector_int_destroy(&c_edges); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, vertices); @@ -5886,9 +5886,9 @@ SEXP R_igraph_global_efficiency(SEXP graph, SEXP weights, SEXP directed) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; @@ -5919,13 +5919,13 @@ SEXP R_igraph_local_efficiency(SEXP graph, SEXP vids, SEXP weights, SEXP directe SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); 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); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; @@ -5934,7 +5934,7 @@ SEXP R_igraph_local_efficiency(SEXP graph, SEXP vids, SEXP weights, SEXP directe IGRAPH_R_CHECK(igraph_local_efficiency(&c_graph, &c_res, c_vids, (Rf_isNull(weights) ? 0 : &c_weights), c_directed, c_mode)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -5959,9 +5959,9 @@ SEXP R_igraph_average_local_efficiency(SEXP graph, SEXP weights, SEXP directed, SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; @@ -5989,13 +5989,13 @@ SEXP R_igraph_transitive_closure_dag(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ IGRAPH_R_CHECK(igraph_transitive_closure_dag(&c_graph, &c_closure)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_closure); - PROTECT(closure=R_igraph_to_SEXP(&c_closure)); + PROTECT(closure=Ry_igraph_to_SEXP(&c_closure)); IGRAPH_I_DESTROY(&c_closure); IGRAPH_FINALLY_CLEAN(1); r_result = closure; @@ -6015,13 +6015,13 @@ SEXP R_igraph_transitive_closure(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ IGRAPH_R_CHECK(igraph_transitive_closure(&c_graph, &c_closure)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_closure); - PROTECT(closure=R_igraph_to_SEXP(&c_closure)); + PROTECT(closure=Ry_igraph_to_SEXP(&c_closure)); IGRAPH_I_DESTROY(&c_closure); IGRAPH_FINALLY_CLEAN(1); r_result = closure; @@ -6041,14 +6041,14 @@ SEXP R_igraph_trussness(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_trussness, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_trussness); /* Call igraph */ IGRAPH_R_CHECK(igraph_trussness(&c_graph, &c_trussness)); /* Convert output */ - PROTECT(trussness=R_igraph_vector_int_to_SEXP(&c_trussness)); + PROTECT(trussness=Ry_igraph_vector_int_to_SEXP(&c_trussness)); igraph_vector_int_destroy(&c_trussness); IGRAPH_FINALLY_CLEAN(1); r_result = trussness; @@ -6070,10 +6070,10 @@ SEXP R_igraph_is_graphical(SEXP out_deg, SEXP in_deg, SEXP allowed_edge_types) { SEXP r_result; /* Convert input */ - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(out_deg, &c_out_deg)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(out_deg, &c_out_deg)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_out_deg); if (!Rf_isNull(in_deg)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(in_deg, &c_in_deg)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(in_deg, &c_in_deg)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_in_deg); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_in_deg, 0)); @@ -6113,7 +6113,7 @@ SEXP R_igraph_bfs_simple(SEXP graph, SEXP root, SEXP mode) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_root = (igraph_integer_t) REAL(root)[0]; c_mode = (igraph_neimode_t) Rf_asInteger(mode); IGRAPH_R_CHECK(igraph_vector_int_init(&c_order, 0)); @@ -6128,13 +6128,13 @@ SEXP R_igraph_bfs_simple(SEXP graph, SEXP root, SEXP mode) { /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(order=R_igraph_vector_int_to_SEXPp1(&c_order)); + PROTECT(order=Ry_igraph_vector_int_to_SEXPp1(&c_order)); igraph_vector_int_destroy(&c_order); IGRAPH_FINALLY_CLEAN(1); - PROTECT(layers=R_igraph_vector_int_to_SEXP(&c_layers)); + PROTECT(layers=Ry_igraph_vector_int_to_SEXP(&c_layers)); igraph_vector_int_destroy(&c_layers); IGRAPH_FINALLY_CLEAN(1); - PROTECT(parents=R_igraph_vector_int_to_SEXP(&c_parents)); + PROTECT(parents=Ry_igraph_vector_int_to_SEXP(&c_parents)); igraph_vector_int_destroy(&c_parents); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, order); @@ -6168,8 +6168,8 @@ SEXP R_igraph_bipartite_projection_size(SEXP graph, SEXP types) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - R_SEXP_to_vector_bool(types, &c_types); + Rz_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_vector_bool(types, &c_types); c_vcount1=0; c_ecount1=0; c_vcount2=0; @@ -6216,8 +6216,8 @@ SEXP R_igraph_create_bipartite(SEXP types, SEXP edges, SEXP directed) { SEXP r_result; /* Convert input */ - R_SEXP_to_vector_bool(types, &c_types); - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(edges, &c_edges)); + Rz_SEXP_to_vector_bool(types, &c_types); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(edges, &c_edges)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edges); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; @@ -6226,7 +6226,7 @@ SEXP R_igraph_create_bipartite(SEXP types, SEXP edges, SEXP directed) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_edges); @@ -6255,7 +6255,7 @@ SEXP R_igraph_biadjacency(SEXP incidence, SEXP directed, SEXP mode, SEXP multipl /* Convert input */ IGRAPH_R_CHECK(igraph_vector_bool_init(&c_types, 0)); IGRAPH_FINALLY(igraph_vector_bool_destroy, &c_types); - R_SEXP_to_matrix(incidence, &c_incidence); + Rz_SEXP_to_matrix(incidence, &c_incidence); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; c_mode = (igraph_neimode_t) Rf_asInteger(mode); @@ -6268,10 +6268,10 @@ SEXP R_igraph_biadjacency(SEXP incidence, SEXP directed, SEXP mode, SEXP multipl PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); - PROTECT(types=R_igraph_vector_bool_to_SEXP(&c_types)); + PROTECT(types=Ry_igraph_vector_bool_to_SEXP(&c_types)); igraph_vector_bool_destroy(&c_types); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, graph); @@ -6301,8 +6301,8 @@ SEXP R_igraph_get_biadjacency(SEXP graph, SEXP types) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - R_SEXP_to_vector_bool(types, &c_types); + Rz_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_vector_bool(types, &c_types); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); IGRAPH_R_CHECK(igraph_vector_int_init(&c_row_ids, 0)); @@ -6315,13 +6315,13 @@ SEXP R_igraph_get_biadjacency(SEXP graph, SEXP types) { /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); - PROTECT(row_ids=R_igraph_vector_int_to_SEXPp1(&c_row_ids)); + PROTECT(row_ids=Ry_igraph_vector_int_to_SEXPp1(&c_row_ids)); igraph_vector_int_destroy(&c_row_ids); IGRAPH_FINALLY_CLEAN(1); - PROTECT(col_ids=R_igraph_vector_int_to_SEXPp1(&c_col_ids)); + PROTECT(col_ids=Ry_igraph_vector_int_to_SEXPp1(&c_col_ids)); igraph_vector_int_destroy(&c_col_ids); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, res); @@ -6350,7 +6350,7 @@ SEXP R_igraph_is_bipartite(SEXP graph) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_bool_init(&c_type, 0)); IGRAPH_FINALLY(igraph_vector_bool_destroy, &c_type); /* Call igraph */ @@ -6361,7 +6361,7 @@ SEXP R_igraph_is_bipartite(SEXP graph) { PROTECT(r_names=NEW_CHARACTER(2)); PROTECT(res=NEW_LOGICAL(1)); LOGICAL(res)[0]=c_res; - PROTECT(type=R_igraph_vector_bool_to_SEXP(&c_type)); + PROTECT(type=Ry_igraph_vector_bool_to_SEXP(&c_type)); igraph_vector_bool_destroy(&c_type); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, res); @@ -6410,10 +6410,10 @@ SEXP R_igraph_bipartite_game_gnp(SEXP n1, SEXP n2, SEXP p, SEXP directed, SEXP m PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); - PROTECT(types=R_igraph_vector_bool_to_SEXP(&c_types)); + PROTECT(types=Ry_igraph_vector_bool_to_SEXP(&c_types)); igraph_vector_bool_destroy(&c_types); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, graph); @@ -6462,10 +6462,10 @@ SEXP R_igraph_bipartite_game_gnm(SEXP n1, SEXP n2, SEXP m, SEXP directed, SEXP m PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); - PROTECT(types=R_igraph_vector_bool_to_SEXP(&c_types)); + PROTECT(types=Ry_igraph_vector_bool_to_SEXP(&c_types)); igraph_vector_bool_destroy(&c_types); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, graph); @@ -6493,19 +6493,19 @@ SEXP R_igraph_get_laplacian(SEXP graph, SEXP mode, SEXP normalization, SEXP weig SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); c_mode = (igraph_neimode_t) Rf_asInteger(mode); c_normalization = (igraph_laplacian_normalization_t) Rf_asInteger(normalization); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_get_laplacian(&c_graph, &c_res, c_mode, c_normalization, (Rf_isNull(weights) ? 0 : &c_weights))); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -6528,19 +6528,19 @@ SEXP R_igraph_get_laplacian_sparse(SEXP graph, SEXP mode, SEXP normalization, SE SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_sparsemat_init(&c_sparseres, 0, 0, 0)); IGRAPH_FINALLY(igraph_sparsemat_destroy, &c_sparseres); c_mode = (igraph_neimode_t) Rf_asInteger(mode); c_normalization = (igraph_laplacian_normalization_t) Rf_asInteger(normalization); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_get_laplacian_sparse(&c_graph, &c_sparseres, c_mode, c_normalization, (Rf_isNull(weights) ? 0 : &c_weights))); /* Convert output */ - PROTECT(sparseres=R_igraph_sparsemat_to_SEXP(&c_sparseres)); + PROTECT(sparseres=Ry_igraph_sparsemat_to_SEXP(&c_sparseres)); igraph_sparsemat_destroy(&c_sparseres); IGRAPH_FINALLY_CLEAN(1); r_result = sparseres; @@ -6565,7 +6565,7 @@ SEXP R_igraph_connected_components(SEXP graph, SEXP mode) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_membership, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_membership); IGRAPH_R_CHECK(igraph_vector_int_init(&c_csize, 0)); @@ -6578,10 +6578,10 @@ SEXP R_igraph_connected_components(SEXP graph, SEXP mode) { /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(membership=R_igraph_vector_int_to_SEXP(&c_membership)); + PROTECT(membership=Ry_igraph_vector_int_to_SEXP(&c_membership)); igraph_vector_int_destroy(&c_membership); IGRAPH_FINALLY_CLEAN(1); - PROTECT(csize=R_igraph_vector_int_to_SEXP(&c_csize)); + PROTECT(csize=Ry_igraph_vector_int_to_SEXP(&c_csize)); igraph_vector_int_destroy(&c_csize); IGRAPH_FINALLY_CLEAN(1); PROTECT(no=NEW_NUMERIC(1)); @@ -6611,7 +6611,7 @@ SEXP R_igraph_is_connected(SEXP graph, SEXP mode) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_mode = (igraph_connectedness_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_is_connected(&c_graph, &c_res, c_mode)); @@ -6636,14 +6636,14 @@ SEXP R_igraph_articulation_points(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_res); /* Call igraph */ IGRAPH_R_CHECK(igraph_articulation_points(&c_graph, &c_res)); /* Convert output */ - PROTECT(res=R_igraph_vector_int_to_SEXPp1(&c_res)); + PROTECT(res=Ry_igraph_vector_int_to_SEXPp1(&c_res)); igraph_vector_int_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -6671,7 +6671,7 @@ SEXP R_igraph_biconnected_components(SEXP graph) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_no=0; IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_tree_edges, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_tree_edges); @@ -6689,16 +6689,16 @@ SEXP R_igraph_biconnected_components(SEXP graph) { PROTECT(r_names=NEW_CHARACTER(5)); PROTECT(no=NEW_NUMERIC(1)); REAL(no)[0]=(double) c_no; - PROTECT(tree_edges=R_igraph_vector_int_list_to_SEXPp1(&c_tree_edges)); + PROTECT(tree_edges=Ry_igraph_vector_int_list_to_SEXPp1(&c_tree_edges)); igraph_vector_int_list_destroy(&c_tree_edges); IGRAPH_FINALLY_CLEAN(1); - PROTECT(component_edges=R_igraph_vector_int_list_to_SEXPp1(&c_component_edges)); + PROTECT(component_edges=Ry_igraph_vector_int_list_to_SEXPp1(&c_component_edges)); igraph_vector_int_list_destroy(&c_component_edges); IGRAPH_FINALLY_CLEAN(1); - PROTECT(components=R_igraph_vector_int_list_to_SEXPp1(&c_components)); + PROTECT(components=Ry_igraph_vector_int_list_to_SEXPp1(&c_components)); igraph_vector_int_list_destroy(&c_components); IGRAPH_FINALLY_CLEAN(1); - PROTECT(articulation_points=R_igraph_vector_int_to_SEXPp1(&c_articulation_points)); + PROTECT(articulation_points=Ry_igraph_vector_int_to_SEXPp1(&c_articulation_points)); igraph_vector_int_destroy(&c_articulation_points); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, no); @@ -6729,14 +6729,14 @@ SEXP R_igraph_bridges(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_res); /* Call igraph */ IGRAPH_R_CHECK(igraph_bridges(&c_graph, &c_res)); /* Convert output */ - PROTECT(res=R_igraph_vector_int_to_SEXPp1(&c_res)); + PROTECT(res=Ry_igraph_vector_int_to_SEXPp1(&c_res)); igraph_vector_int_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -6756,7 +6756,7 @@ SEXP R_igraph_is_biconnected(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ IGRAPH_R_CHECK(igraph_is_biconnected(&c_graph, &c_res)); @@ -6781,7 +6781,7 @@ SEXP R_igraph_count_reachable(SEXP graph, SEXP mode) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_counts, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_counts); c_mode = (igraph_neimode_t) Rf_asInteger(mode); @@ -6789,7 +6789,7 @@ SEXP R_igraph_count_reachable(SEXP graph, SEXP mode) { IGRAPH_R_CHECK(igraph_count_reachable(&c_graph, &c_counts, c_mode)); /* Convert output */ - PROTECT(counts=R_igraph_vector_int_to_SEXP(&c_counts)); + PROTECT(counts=Ry_igraph_vector_int_to_SEXP(&c_counts)); igraph_vector_int_destroy(&c_counts); IGRAPH_FINALLY_CLEAN(1); r_result = counts; @@ -6812,13 +6812,13 @@ SEXP R_igraph_bond_percolation(SEXP graph, SEXP edge_order) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_giant_size, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_giant_size); IGRAPH_R_CHECK(igraph_vector_int_init(&c_vetex_count, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vetex_count); if (!Rf_isNull(edge_order)) { - R_SEXP_to_vector_int_copy(edge_order, &c_edge_order); + Rz_SEXP_to_vector_int_copy(edge_order, &c_edge_order); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_order); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_order, 0)); @@ -6830,10 +6830,10 @@ SEXP R_igraph_bond_percolation(SEXP graph, SEXP edge_order) { /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(giant_size=R_igraph_vector_int_to_SEXP(&c_giant_size)); + PROTECT(giant_size=Ry_igraph_vector_int_to_SEXP(&c_giant_size)); igraph_vector_int_destroy(&c_giant_size); IGRAPH_FINALLY_CLEAN(1); - PROTECT(vetex_count=R_igraph_vector_int_to_SEXP(&c_vetex_count)); + PROTECT(vetex_count=Ry_igraph_vector_int_to_SEXP(&c_vetex_count)); igraph_vector_int_destroy(&c_vetex_count); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_edge_order); @@ -6863,13 +6863,13 @@ SEXP R_igraph_site_percolation(SEXP graph, SEXP vertex_order) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_giant_size, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_giant_size); IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_count, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_count); if (!Rf_isNull(vertex_order)) { - R_SEXP_to_vector_int_copy(vertex_order, &c_vertex_order); + Rz_SEXP_to_vector_int_copy(vertex_order, &c_vertex_order); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_order); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_order, 0)); @@ -6881,10 +6881,10 @@ SEXP R_igraph_site_percolation(SEXP graph, SEXP vertex_order) { /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(giant_size=R_igraph_vector_int_to_SEXP(&c_giant_size)); + PROTECT(giant_size=Ry_igraph_vector_int_to_SEXP(&c_giant_size)); igraph_vector_int_destroy(&c_giant_size); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edge_count=R_igraph_vector_int_to_SEXP(&c_edge_count)); + PROTECT(edge_count=Ry_igraph_vector_int_to_SEXP(&c_edge_count)); igraph_vector_int_destroy(&c_edge_count); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vertex_order); @@ -6913,7 +6913,7 @@ SEXP R_igraph_edgelist_percolation(SEXP edges) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_vector_int_copy(edges, &c_edges); + Rz_SEXP_to_vector_int_copy(edges, &c_edges); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edges); IGRAPH_R_CHECK(igraph_vector_int_init(&c_giant_size, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_giant_size); @@ -6927,10 +6927,10 @@ SEXP R_igraph_edgelist_percolation(SEXP edges) { PROTECT(r_names=NEW_CHARACTER(2)); igraph_vector_int_destroy(&c_edges); IGRAPH_FINALLY_CLEAN(1); - PROTECT(giant_size=R_igraph_vector_int_to_SEXP(&c_giant_size)); + PROTECT(giant_size=Ry_igraph_vector_int_to_SEXP(&c_giant_size)); igraph_vector_int_destroy(&c_giant_size); IGRAPH_FINALLY_CLEAN(1); - PROTECT(vertex_count=R_igraph_vector_int_to_SEXP(&c_vertex_count)); + PROTECT(vertex_count=Ry_igraph_vector_int_to_SEXP(&c_vertex_count)); igraph_vector_int_destroy(&c_vertex_count); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, giant_size); @@ -6957,9 +6957,9 @@ SEXP R_igraph_is_clique(SEXP graph, SEXP candidate, SEXP directed) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); igraph_vector_int_t c_candidate_data; - R_SEXP_to_igraph_vs(candidate, &c_graph, &c_candidate, &c_candidate_data); + Rz_SEXP_to_igraph_vs(candidate, &c_graph, &c_candidate, &c_candidate_data); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; /* Call igraph */ @@ -6989,7 +6989,7 @@ SEXP R_igraph_cliques(SEXP graph, SEXP min_size, SEXP max_size) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_res); IGRAPH_R_CHECK_INT(min_size); @@ -7000,7 +7000,7 @@ SEXP R_igraph_cliques(SEXP graph, SEXP min_size, SEXP max_size) { IGRAPH_R_CHECK(igraph_cliques(&c_graph, &c_res, c_min_size, c_max_size)); /* Convert output */ - PROTECT(res=R_igraph_vector_int_list_to_SEXPp1(&c_res)); + PROTECT(res=Ry_igraph_vector_int_list_to_SEXPp1(&c_res)); igraph_vector_int_list_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7022,7 +7022,7 @@ SEXP R_igraph_clique_size_hist(SEXP graph, SEXP min_size, SEXP max_size) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_hist, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_hist); IGRAPH_R_CHECK_INT(min_size); @@ -7033,7 +7033,7 @@ SEXP R_igraph_clique_size_hist(SEXP graph, SEXP min_size, SEXP max_size) { IGRAPH_R_CHECK(igraph_clique_size_hist(&c_graph, &c_hist, c_min_size, c_max_size)); /* Convert output */ - PROTECT(hist=R_igraph_vector_to_SEXP(&c_hist)); + PROTECT(hist=Ry_igraph_vector_to_SEXP(&c_hist)); igraph_vector_destroy(&c_hist); IGRAPH_FINALLY_CLEAN(1); r_result = hist; @@ -7053,14 +7053,14 @@ SEXP R_igraph_largest_cliques(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_res); /* Call igraph */ IGRAPH_R_CHECK(igraph_largest_cliques(&c_graph, &c_res)); /* Convert output */ - PROTECT(res=R_igraph_vector_int_list_to_SEXPp1(&c_res)); + PROTECT(res=Ry_igraph_vector_int_list_to_SEXPp1(&c_res)); igraph_vector_int_list_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7082,7 +7082,7 @@ SEXP R_igraph_maximal_cliques_count(SEXP graph, SEXP min_size, SEXP max_size) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_no=0; IGRAPH_R_CHECK_INT(min_size); c_min_size = (igraph_integer_t) REAL(min_size)[0]; @@ -7113,7 +7113,7 @@ SEXP R_igraph_maximal_cliques_hist(SEXP graph, SEXP min_size, SEXP max_size) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_hist, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_hist); IGRAPH_R_CHECK_INT(min_size); @@ -7124,7 +7124,7 @@ SEXP R_igraph_maximal_cliques_hist(SEXP graph, SEXP min_size, SEXP max_size) { IGRAPH_R_CHECK(igraph_maximal_cliques_hist(&c_graph, &c_hist, c_min_size, c_max_size)); /* Convert output */ - PROTECT(hist=R_igraph_vector_to_SEXP(&c_hist)); + PROTECT(hist=Ry_igraph_vector_to_SEXP(&c_hist)); igraph_vector_destroy(&c_hist); IGRAPH_FINALLY_CLEAN(1); r_result = hist; @@ -7144,7 +7144,7 @@ SEXP R_igraph_clique_number(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_no=0; /* Call igraph */ IGRAPH_R_CHECK(igraph_clique_number(&c_graph, &c_no)); @@ -7173,9 +7173,9 @@ SEXP R_igraph_weighted_cliques(SEXP graph, SEXP vertex_weights, SEXP min_weight, SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(vertex_weights)) { - R_SEXP_to_vector(vertex_weights, &c_vertex_weights); + Rz_SEXP_to_vector(vertex_weights, &c_vertex_weights); } IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_res); @@ -7189,7 +7189,7 @@ SEXP R_igraph_weighted_cliques(SEXP graph, SEXP vertex_weights, SEXP min_weight, IGRAPH_R_CHECK(igraph_weighted_cliques(&c_graph, (Rf_isNull(vertex_weights) ? 0 : &c_vertex_weights), &c_res, c_min_weight, c_max_weight, c_maximal)); /* Convert output */ - PROTECT(res=R_igraph_vector_int_list_to_SEXPp1(&c_res)); + PROTECT(res=Ry_igraph_vector_int_list_to_SEXPp1(&c_res)); igraph_vector_int_list_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7210,9 +7210,9 @@ SEXP R_igraph_largest_weighted_cliques(SEXP graph, SEXP vertex_weights) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(vertex_weights)) { - R_SEXP_to_vector(vertex_weights, &c_vertex_weights); + Rz_SEXP_to_vector(vertex_weights, &c_vertex_weights); } IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_res); @@ -7220,7 +7220,7 @@ SEXP R_igraph_largest_weighted_cliques(SEXP graph, SEXP vertex_weights) { IGRAPH_R_CHECK(igraph_largest_weighted_cliques(&c_graph, (Rf_isNull(vertex_weights) ? 0 : &c_vertex_weights), &c_res)); /* Convert output */ - PROTECT(res=R_igraph_vector_int_list_to_SEXPp1(&c_res)); + PROTECT(res=Ry_igraph_vector_int_list_to_SEXPp1(&c_res)); igraph_vector_int_list_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7241,9 +7241,9 @@ SEXP R_igraph_weighted_clique_number(SEXP graph, SEXP vertex_weights) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(vertex_weights)) { - R_SEXP_to_vector(vertex_weights, &c_vertex_weights); + Rz_SEXP_to_vector(vertex_weights, &c_vertex_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_weighted_clique_number(&c_graph, (Rf_isNull(vertex_weights) ? 0 : &c_vertex_weights), &c_res)); @@ -7269,9 +7269,9 @@ SEXP R_igraph_is_independent_vertex_set(SEXP graph, SEXP candidate) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); igraph_vector_int_t c_candidate_data; - R_SEXP_to_igraph_vs(candidate, &c_graph, &c_candidate, &c_candidate_data); + Rz_SEXP_to_igraph_vs(candidate, &c_graph, &c_candidate, &c_candidate_data); /* Call igraph */ IGRAPH_R_CHECK(igraph_is_independent_vertex_set(&c_graph, c_candidate, &c_res)); @@ -7297,14 +7297,14 @@ SEXP R_igraph_largest_independent_vertex_sets(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_res); /* Call igraph */ IGRAPH_R_CHECK(igraph_largest_independent_vertex_sets(&c_graph, &c_res)); /* Convert output */ - PROTECT(res=R_igraph_vector_int_list_to_SEXPp1(&c_res)); + PROTECT(res=Ry_igraph_vector_int_list_to_SEXPp1(&c_res)); igraph_vector_int_list_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7324,14 +7324,14 @@ SEXP R_igraph_maximal_independent_vertex_sets(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_res); /* Call igraph */ IGRAPH_R_CHECK(igraph_maximal_independent_vertex_sets(&c_graph, &c_res)); /* Convert output */ - PROTECT(res=R_igraph_vector_int_list_to_SEXPp1(&c_res)); + PROTECT(res=Ry_igraph_vector_int_list_to_SEXPp1(&c_res)); igraph_vector_int_list_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7351,7 +7351,7 @@ SEXP R_igraph_independence_number(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_no=0; /* Call igraph */ IGRAPH_R_CHECK(igraph_independence_number(&c_graph, &c_no)); @@ -7376,14 +7376,14 @@ SEXP R_igraph_layout_random(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); /* Call igraph */ IGRAPH_R_CHECK(igraph_layout_random(&c_graph, &c_res)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7404,16 +7404,16 @@ SEXP R_igraph_layout_circle(SEXP graph, SEXP order) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); igraph_vector_int_t c_order_data; - R_SEXP_to_igraph_vs(order, &c_graph, &c_order, &c_order_data); + Rz_SEXP_to_igraph_vs(order, &c_graph, &c_order, &c_order_data); /* Call igraph */ IGRAPH_R_CHECK(igraph_layout_circle(&c_graph, &c_res, c_order)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_order_data); @@ -7437,12 +7437,12 @@ SEXP R_igraph_layout_star(SEXP graph, SEXP center, SEXP order) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); c_center = (igraph_integer_t) REAL(center)[0]; if (!Rf_isNull(order)) { - R_SEXP_to_vector_int_copy(order, &c_order); + Rz_SEXP_to_vector_int_copy(order, &c_order); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_order); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_order, 0)); @@ -7452,7 +7452,7 @@ SEXP R_igraph_layout_star(SEXP graph, SEXP center, SEXP order) { IGRAPH_R_CHECK(igraph_layout_star(&c_graph, &c_res, c_center, (Rf_isNull(order) ? 0 : &c_order))); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_order); @@ -7475,7 +7475,7 @@ SEXP R_igraph_layout_grid(SEXP graph, SEXP width) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); IGRAPH_R_CHECK_INT(width); @@ -7484,7 +7484,7 @@ SEXP R_igraph_layout_grid(SEXP graph, SEXP width) { IGRAPH_R_CHECK(igraph_layout_grid(&c_graph, &c_res, c_width)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7506,7 +7506,7 @@ SEXP R_igraph_layout_grid_3d(SEXP graph, SEXP width, SEXP height) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); IGRAPH_R_CHECK_INT(width); @@ -7517,7 +7517,7 @@ SEXP R_igraph_layout_grid_3d(SEXP graph, SEXP width, SEXP height) { IGRAPH_R_CHECK(igraph_layout_grid_3d(&c_graph, &c_res, c_width, c_height)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7539,7 +7539,7 @@ SEXP R_igraph_roots_for_tree_layout(SEXP graph, SEXP mode, SEXP heuristic) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_mode = (igraph_neimode_t) Rf_asInteger(mode); IGRAPH_R_CHECK(igraph_vector_int_init(&c_roots, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_roots); @@ -7548,7 +7548,7 @@ SEXP R_igraph_roots_for_tree_layout(SEXP graph, SEXP mode, SEXP heuristic) { IGRAPH_R_CHECK(igraph_roots_for_tree_layout(&c_graph, c_mode, &c_roots, c_heuristic)); /* Convert output */ - PROTECT(roots=R_igraph_vector_int_to_SEXPp1(&c_roots)); + PROTECT(roots=Ry_igraph_vector_int_to_SEXPp1(&c_roots)); igraph_vector_int_destroy(&c_roots); IGRAPH_FINALLY_CLEAN(1); r_result = roots; @@ -7568,14 +7568,14 @@ SEXP R_igraph_layout_random_3d(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); /* Call igraph */ IGRAPH_R_CHECK(igraph_layout_random_3d(&c_graph, &c_res)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7595,14 +7595,14 @@ SEXP R_igraph_layout_sphere(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); /* Call igraph */ IGRAPH_R_CHECK(igraph_layout_sphere(&c_graph, &c_res)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7624,20 +7624,20 @@ SEXP R_igraph_layout_drl(SEXP graph, SEXP res, SEXP use_seed, SEXP options, SEXP SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - IGRAPH_R_CHECK(R_SEXP_to_igraph_matrix_copy(res, &c_res)); + Rz_SEXP_to_igraph(graph, &c_graph); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_matrix_copy(res, &c_res)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); IGRAPH_R_CHECK_BOOL(use_seed); c_use_seed = LOGICAL(use_seed)[0]; - R_SEXP_to_igraph_layout_drl_options(options, &c_options); + Rz_SEXP_to_igraph_layout_drl_options(options, &c_options); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_layout_drl(&c_graph, &c_res, c_use_seed, &c_options, (Rf_isNull(weights) ? 0 : &c_weights))); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7659,20 +7659,20 @@ SEXP R_igraph_layout_drl_3d(SEXP graph, SEXP res, SEXP use_seed, SEXP options, S SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - IGRAPH_R_CHECK(R_SEXP_to_igraph_matrix_copy(res, &c_res)); + Rz_SEXP_to_igraph(graph, &c_graph); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_matrix_copy(res, &c_res)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); IGRAPH_R_CHECK_BOOL(use_seed); c_use_seed = LOGICAL(use_seed)[0]; - R_SEXP_to_igraph_layout_drl_options(options, &c_options); + Rz_SEXP_to_igraph_layout_drl_options(options, &c_options); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_layout_drl_3d(&c_graph, &c_res, c_use_seed, &c_options, (Rf_isNull(weights) ? 0 : &c_weights))); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7701,13 +7701,13 @@ SEXP R_igraph_layout_sugiyama(SEXP graph, SEXP layers, SEXP hgap, SEXP vgap, SEX SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); IGRAPH_R_CHECK(igraph_vector_int_init(&c_extd_to_orig_eids, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_extd_to_orig_eids); if (!Rf_isNull(layers)) { - R_SEXP_to_vector_int_copy(layers, &c_layers); + Rz_SEXP_to_vector_int_copy(layers, &c_layers); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_layers); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_layers, 0)); @@ -7720,7 +7720,7 @@ SEXP R_igraph_layout_sugiyama(SEXP graph, SEXP layers, SEXP hgap, SEXP vgap, SEX IGRAPH_R_CHECK_INT(maxiter); c_maxiter = (igraph_integer_t) REAL(maxiter)[0]; if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_layout_sugiyama(&c_graph, &c_res, &c_extd_graph, &c_extd_to_orig_eids, (Rf_isNull(layers) ? 0 : &c_layers), c_hgap, c_vgap, c_maxiter, (Rf_isNull(weights) ? 0 : &c_weights))); @@ -7728,14 +7728,14 @@ SEXP R_igraph_layout_sugiyama(SEXP graph, SEXP layers, SEXP hgap, SEXP vgap, SEX /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); IGRAPH_FINALLY(igraph_destroy, &c_extd_graph); - PROTECT(extd_graph=R_igraph_to_SEXP(&c_extd_graph)); + PROTECT(extd_graph=Ry_igraph_to_SEXP(&c_extd_graph)); IGRAPH_I_DESTROY(&c_extd_graph); IGRAPH_FINALLY_CLEAN(1); - PROTECT(extd_to_orig_eids=R_igraph_vector_int_to_SEXPp1(&c_extd_to_orig_eids)); + PROTECT(extd_to_orig_eids=Ry_igraph_vector_int_to_SEXPp1(&c_extd_to_orig_eids)); igraph_vector_int_destroy(&c_extd_to_orig_eids); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_layers); @@ -7766,11 +7766,11 @@ SEXP R_igraph_layout_mds(SEXP graph, SEXP dist, SEXP dim) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); if (!Rf_isNull(dist)) { - R_SEXP_to_matrix(dist, &c_dist); + Rz_SEXP_to_matrix(dist, &c_dist); } IGRAPH_R_CHECK_INT(dim); c_dim = (igraph_integer_t) REAL(dim)[0]; @@ -7778,7 +7778,7 @@ SEXP R_igraph_layout_mds(SEXP graph, SEXP dist, SEXP dim) { IGRAPH_R_CHECK(igraph_layout_mds(&c_graph, &c_res, (Rf_isNull(dist) ? 0 : &c_dist), c_dim)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7802,8 +7802,8 @@ SEXP R_igraph_layout_bipartite(SEXP graph, SEXP types, SEXP hgap, SEXP vgap, SEX SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - R_SEXP_to_vector_bool(types, &c_types); + Rz_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_vector_bool(types, &c_types); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); IGRAPH_R_CHECK_REAL(hgap); @@ -7816,7 +7816,7 @@ SEXP R_igraph_layout_bipartite(SEXP graph, SEXP types, SEXP hgap, SEXP vgap, SEX IGRAPH_R_CHECK(igraph_layout_bipartite(&c_graph, &c_types, &c_res, c_hgap, c_vgap, c_maxiter)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7840,8 +7840,8 @@ SEXP R_igraph_layout_gem(SEXP graph, SEXP res, SEXP use_seed, SEXP maxiter, SEXP SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - IGRAPH_R_CHECK(R_SEXP_to_igraph_matrix_copy(res, &c_res)); + Rz_SEXP_to_igraph(graph, &c_graph); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_matrix_copy(res, &c_res)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); IGRAPH_R_CHECK_BOOL(use_seed); c_use_seed = LOGICAL(use_seed)[0]; @@ -7857,7 +7857,7 @@ SEXP R_igraph_layout_gem(SEXP graph, SEXP res, SEXP use_seed, SEXP maxiter, SEXP IGRAPH_R_CHECK(igraph_layout_gem(&c_graph, &c_res, c_use_seed, c_maxiter, c_temp_max, c_temp_min, c_temp_init)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7885,8 +7885,8 @@ SEXP R_igraph_layout_davidson_harel(SEXP graph, SEXP res, SEXP use_seed, SEXP ma SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - IGRAPH_R_CHECK(R_SEXP_to_igraph_matrix_copy(res, &c_res)); + Rz_SEXP_to_igraph(graph, &c_graph); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_matrix_copy(res, &c_res)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); IGRAPH_R_CHECK_BOOL(use_seed); c_use_seed = LOGICAL(use_seed)[0]; @@ -7910,7 +7910,7 @@ SEXP R_igraph_layout_davidson_harel(SEXP graph, SEXP res, SEXP use_seed, SEXP ma IGRAPH_R_CHECK(igraph_layout_davidson_harel(&c_graph, &c_res, c_use_seed, c_maxiter, c_fineiter, c_cool_fact, c_weight_node_dist, c_weight_border, c_weight_edge_lengths, c_weight_edge_crossings, c_weight_node_edge_dist)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7934,13 +7934,13 @@ SEXP R_igraph_layout_umap(SEXP graph, SEXP res, SEXP use_seed, SEXP distances, S SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - IGRAPH_R_CHECK(R_SEXP_to_igraph_matrix_copy(res, &c_res)); + Rz_SEXP_to_igraph(graph, &c_graph); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_matrix_copy(res, &c_res)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); IGRAPH_R_CHECK_BOOL(use_seed); c_use_seed = LOGICAL(use_seed)[0]; if (!Rf_isNull(distances)) { - R_SEXP_to_vector(distances, &c_distances); + Rz_SEXP_to_vector(distances, &c_distances); } IGRAPH_R_CHECK_REAL(min_dist); c_min_dist = REAL(min_dist)[0]; @@ -7952,7 +7952,7 @@ SEXP R_igraph_layout_umap(SEXP graph, SEXP res, SEXP use_seed, SEXP distances, S IGRAPH_R_CHECK(igraph_layout_umap(&c_graph, &c_res, c_use_seed, (Rf_isNull(distances) ? 0 : &c_distances), c_min_dist, c_epochs, c_distances_are_weights)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -7976,13 +7976,13 @@ SEXP R_igraph_layout_umap_3d(SEXP graph, SEXP res, SEXP use_seed, SEXP distances SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - IGRAPH_R_CHECK(R_SEXP_to_igraph_matrix_copy(res, &c_res)); + Rz_SEXP_to_igraph(graph, &c_graph); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_matrix_copy(res, &c_res)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); IGRAPH_R_CHECK_BOOL(use_seed); c_use_seed = LOGICAL(use_seed)[0]; if (!Rf_isNull(distances)) { - R_SEXP_to_vector(distances, &c_distances); + Rz_SEXP_to_vector(distances, &c_distances); } IGRAPH_R_CHECK_REAL(min_dist); c_min_dist = REAL(min_dist)[0]; @@ -7994,7 +7994,7 @@ SEXP R_igraph_layout_umap_3d(SEXP graph, SEXP res, SEXP use_seed, SEXP distances IGRAPH_R_CHECK(igraph_layout_umap_3d(&c_graph, &c_res, c_use_seed, (Rf_isNull(distances) ? 0 : &c_distances), c_min_dist, c_epochs, c_distances_are_weights)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -8014,15 +8014,15 @@ SEXP R_igraph_layout_umap_compute_weights(SEXP graph, SEXP distances, SEXP weigh SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - R_SEXP_to_vector(distances, &c_distances); - IGRAPH_R_CHECK(R_SEXP_to_vector_copy(weights, &c_weights)); + Rz_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_vector(distances, &c_distances); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_copy(weights, &c_weights)); IGRAPH_FINALLY(igraph_vector_destroy, &c_weights); /* Call igraph */ IGRAPH_R_CHECK(igraph_layout_umap_compute_weights(&c_graph, &c_distances, &c_weights)); /* Convert output */ - PROTECT(weights=R_igraph_vector_to_SEXP(&c_weights)); + PROTECT(weights=Ry_igraph_vector_to_SEXP(&c_weights)); igraph_vector_destroy(&c_weights); IGRAPH_FINALLY_CLEAN(1); r_result = weights; @@ -8041,14 +8041,14 @@ SEXP R_igraph_layout_align(SEXP graph, SEXP layout) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - IGRAPH_R_CHECK(R_SEXP_to_igraph_matrix_copy(layout, &c_layout)); + Rz_SEXP_to_igraph(graph, &c_graph); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_matrix_copy(layout, &c_layout)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_layout); /* Call igraph */ IGRAPH_R_CHECK(igraph_layout_align(&c_graph, &c_layout)); /* Convert output */ - PROTECT(layout=R_igraph_matrix_to_SEXP(&c_layout)); + PROTECT(layout=Ry_igraph_matrix_to_SEXP(&c_layout)); igraph_matrix_destroy(&c_layout); IGRAPH_FINALLY_CLEAN(1); r_result = layout; @@ -8069,16 +8069,16 @@ SEXP R_igraph_cocitation(SEXP graph, SEXP vids) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); igraph_vector_int_t c_vids_data; - R_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); /* Call igraph */ IGRAPH_R_CHECK(igraph_cocitation(&c_graph, &c_res, c_vids)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -8101,16 +8101,16 @@ SEXP R_igraph_bibcoupling(SEXP graph, SEXP vids) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); igraph_vector_int_t c_vids_data; - R_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); /* Call igraph */ IGRAPH_R_CHECK(igraph_bibcoupling(&c_graph, &c_res, c_vids)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -8135,11 +8135,11 @@ SEXP R_igraph_similarity_dice(SEXP graph, SEXP vids, SEXP mode, SEXP loops) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); igraph_vector_int_t c_vids_data; - R_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); c_mode = (igraph_neimode_t) Rf_asInteger(mode); IGRAPH_R_CHECK_BOOL(loops); c_loops = LOGICAL(loops)[0]; @@ -8147,7 +8147,7 @@ SEXP R_igraph_similarity_dice(SEXP graph, SEXP vids, SEXP mode, SEXP loops) { IGRAPH_R_CHECK(igraph_similarity_dice(&c_graph, &c_res, c_vids, c_mode, c_loops)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -8172,11 +8172,11 @@ SEXP R_igraph_similarity_dice_es(SEXP graph, SEXP es, SEXP mode, SEXP loops) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); igraph_vector_int_t c_es_data; - IGRAPH_R_CHECK(R_SEXP_to_igraph_es(es, &c_graph, &c_es, &c_es_data)); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_es(es, &c_graph, &c_es, &c_es_data)); c_mode = (igraph_neimode_t) Rf_asInteger(mode); IGRAPH_R_CHECK_BOOL(loops); c_loops = LOGICAL(loops)[0]; @@ -8184,7 +8184,7 @@ SEXP R_igraph_similarity_dice_es(SEXP graph, SEXP es, SEXP mode, SEXP loops) { IGRAPH_R_CHECK(igraph_similarity_dice_es(&c_graph, &c_res, c_es, c_mode, c_loops)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_es_data); @@ -8209,10 +8209,10 @@ SEXP R_igraph_similarity_dice_pairs(SEXP graph, SEXP pairs, SEXP mode, SEXP loop SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); - R_SEXP_to_vector_int_copy(pairs, &c_pairs); + Rz_SEXP_to_vector_int_copy(pairs, &c_pairs); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_pairs); c_mode = (igraph_neimode_t) Rf_asInteger(mode); IGRAPH_R_CHECK_BOOL(loops); @@ -8221,7 +8221,7 @@ SEXP R_igraph_similarity_dice_pairs(SEXP graph, SEXP pairs, SEXP mode, SEXP loop IGRAPH_R_CHECK(igraph_similarity_dice_pairs(&c_graph, &c_res, &c_pairs, c_mode, c_loops)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_pairs); @@ -8245,17 +8245,17 @@ SEXP R_igraph_similarity_inverse_log_weighted(SEXP graph, SEXP vids, SEXP mode) SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); igraph_vector_int_t c_vids_data; - R_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); + Rz_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_similarity_inverse_log_weighted(&c_graph, &c_res, c_vids, c_mode)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -8280,11 +8280,11 @@ SEXP R_igraph_similarity_jaccard(SEXP graph, SEXP vids, SEXP mode, SEXP loops) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); igraph_vector_int_t c_vids_data; - R_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); c_mode = (igraph_neimode_t) Rf_asInteger(mode); IGRAPH_R_CHECK_BOOL(loops); c_loops = LOGICAL(loops)[0]; @@ -8292,7 +8292,7 @@ SEXP R_igraph_similarity_jaccard(SEXP graph, SEXP vids, SEXP mode, SEXP loops) { IGRAPH_R_CHECK(igraph_similarity_jaccard(&c_graph, &c_res, c_vids, c_mode, c_loops)); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -8317,11 +8317,11 @@ SEXP R_igraph_similarity_jaccard_es(SEXP graph, SEXP es, SEXP mode, SEXP loops) SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); igraph_vector_int_t c_es_data; - IGRAPH_R_CHECK(R_SEXP_to_igraph_es(es, &c_graph, &c_es, &c_es_data)); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_es(es, &c_graph, &c_es, &c_es_data)); c_mode = (igraph_neimode_t) Rf_asInteger(mode); IGRAPH_R_CHECK_BOOL(loops); c_loops = LOGICAL(loops)[0]; @@ -8329,7 +8329,7 @@ SEXP R_igraph_similarity_jaccard_es(SEXP graph, SEXP es, SEXP mode, SEXP loops) IGRAPH_R_CHECK(igraph_similarity_jaccard_es(&c_graph, &c_res, c_es, c_mode, c_loops)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_es_data); @@ -8354,10 +8354,10 @@ SEXP R_igraph_similarity_jaccard_pairs(SEXP graph, SEXP pairs, SEXP mode, SEXP l SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); - R_SEXP_to_vector_int_copy(pairs, &c_pairs); + Rz_SEXP_to_vector_int_copy(pairs, &c_pairs); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_pairs); c_mode = (igraph_neimode_t) Rf_asInteger(mode); IGRAPH_R_CHECK_BOOL(loops); @@ -8366,7 +8366,7 @@ SEXP R_igraph_similarity_jaccard_pairs(SEXP graph, SEXP pairs, SEXP mode, SEXP l IGRAPH_R_CHECK(igraph_similarity_jaccard_pairs(&c_graph, &c_res, &c_pairs, c_mode, c_loops)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_pairs); @@ -8390,9 +8390,9 @@ SEXP R_igraph_compare_communities(SEXP comm1, SEXP comm2, SEXP method) { SEXP r_result; /* Convert input */ - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(comm1, &c_comm1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(comm1, &c_comm1)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_comm1); - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(comm2, &c_comm2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(comm2, &c_comm2)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_comm2); c_method = (igraph_community_comparison_t) Rf_asInteger(method); /* Call igraph */ @@ -8426,11 +8426,11 @@ SEXP R_igraph_modularity(SEXP graph, SEXP membership, SEXP weights, SEXP resolut SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(membership, &c_membership)); + Rz_SEXP_to_igraph(graph, &c_graph); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(membership, &c_membership)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_membership); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK_REAL(resolution); c_resolution = REAL(resolution)[0]; @@ -8464,9 +8464,9 @@ SEXP R_igraph_modularity_matrix(SEXP graph, SEXP weights, SEXP resolution, SEXP SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK_REAL(resolution); c_resolution = REAL(resolution)[0]; @@ -8478,7 +8478,7 @@ SEXP R_igraph_modularity_matrix(SEXP graph, SEXP weights, SEXP resolution, SEXP IGRAPH_R_CHECK(igraph_modularity_matrix(&c_graph, (Rf_isNull(weights) ? 0 : &c_weights), c_resolution, &c_modmat, c_directed)); /* Convert output */ - PROTECT(modmat=R_igraph_matrix_to_SEXP(&c_modmat)); + PROTECT(modmat=Ry_igraph_matrix_to_SEXP(&c_modmat)); igraph_matrix_destroy(&c_modmat); IGRAPH_FINALLY_CLEAN(1); r_result = modmat; @@ -8499,7 +8499,7 @@ SEXP R_igraph_community_fluid_communities(SEXP graph, SEXP no_of_communities) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK_INT(no_of_communities); c_no_of_communities = (igraph_integer_t) REAL(no_of_communities)[0]; IGRAPH_R_CHECK(igraph_vector_int_init(&c_membership, 0)); @@ -8508,7 +8508,7 @@ SEXP R_igraph_community_fluid_communities(SEXP graph, SEXP no_of_communities) { IGRAPH_R_CHECK(igraph_community_fluid_communities(&c_graph, c_no_of_communities, &c_membership)); /* Convert output */ - PROTECT(membership=R_igraph_vector_int_to_SEXP(&c_membership)); + PROTECT(membership=Ry_igraph_vector_int_to_SEXP(&c_membership)); igraph_vector_int_destroy(&c_membership); IGRAPH_FINALLY_CLEAN(1); r_result = membership; @@ -8532,28 +8532,28 @@ SEXP R_igraph_community_label_propagation(SEXP graph, SEXP mode, SEXP weights, S SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_membership, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_membership); c_mode = (igraph_neimode_t) Rf_asInteger(mode); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } if (!Rf_isNull(initial)) { - R_SEXP_to_vector_int_copy(initial, &c_initial); + Rz_SEXP_to_vector_int_copy(initial, &c_initial); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_initial); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_initial, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_initial); } if (!Rf_isNull(fixed)) { - R_SEXP_to_vector_bool(fixed, &c_fixed); + Rz_SEXP_to_vector_bool(fixed, &c_fixed); } /* Call igraph */ IGRAPH_R_CHECK(igraph_community_label_propagation(&c_graph, &c_membership, c_mode, (Rf_isNull(weights) ? 0 : &c_weights), (Rf_isNull(initial) ? 0 : &c_initial), (Rf_isNull(fixed) ? 0 : &c_fixed))); /* Convert output */ - PROTECT(membership=R_igraph_vector_int_to_SEXP(&c_membership)); + PROTECT(membership=Ry_igraph_vector_int_to_SEXP(&c_membership)); igraph_vector_int_destroy(&c_membership); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_initial); @@ -8581,9 +8581,9 @@ SEXP R_igraph_community_multilevel(SEXP graph, SEXP weights, SEXP resolution) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK_REAL(resolution); c_resolution = REAL(resolution)[0]; @@ -8599,13 +8599,13 @@ SEXP R_igraph_community_multilevel(SEXP graph, SEXP weights, SEXP resolution) { /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(membership=R_igraph_vector_int_to_SEXP(&c_membership)); + PROTECT(membership=Ry_igraph_vector_int_to_SEXP(&c_membership)); igraph_vector_int_destroy(&c_membership); IGRAPH_FINALLY_CLEAN(1); - PROTECT(memberships=R_igraph_matrix_int_to_SEXP(&c_memberships)); + PROTECT(memberships=Ry_igraph_matrix_int_to_SEXP(&c_memberships)); igraph_matrix_int_destroy(&c_memberships); IGRAPH_FINALLY_CLEAN(1); - PROTECT(modularity=R_igraph_vector_to_SEXP(&c_modularity)); + PROTECT(modularity=Ry_igraph_vector_to_SEXP(&c_modularity)); igraph_vector_destroy(&c_modularity); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, membership); @@ -8635,11 +8635,11 @@ SEXP R_igraph_community_optimal_modularity(SEXP graph, SEXP weights) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_membership, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_membership); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_community_optimal_modularity(&c_graph, &c_modularity, &c_membership, (Rf_isNull(weights) ? 0 : &c_weights))); @@ -8649,7 +8649,7 @@ SEXP R_igraph_community_optimal_modularity(SEXP graph, SEXP weights) { PROTECT(r_names=NEW_CHARACTER(2)); PROTECT(modularity=NEW_NUMERIC(1)); REAL(modularity)[0]=c_modularity; - PROTECT(membership=R_igraph_vector_int_to_SEXP(&c_membership)); + PROTECT(membership=Ry_igraph_vector_int_to_SEXP(&c_membership)); igraph_vector_int_destroy(&c_membership); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, modularity); @@ -8683,12 +8683,12 @@ SEXP R_igraph_community_leiden(SEXP graph, SEXP weights, SEXP vertex_weights, SE SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } if (!Rf_isNull(vertex_weights)) { - R_SEXP_to_vector(vertex_weights, &c_vertex_weights); + Rz_SEXP_to_vector(vertex_weights, &c_vertex_weights); } IGRAPH_R_CHECK_REAL(resolution); c_resolution = REAL(resolution)[0]; @@ -8699,7 +8699,7 @@ SEXP R_igraph_community_leiden(SEXP graph, SEXP weights, SEXP vertex_weights, SE IGRAPH_R_CHECK_INT(n_iterations); c_n_iterations = (igraph_integer_t) REAL(n_iterations)[0]; if (!Rf_isNull(membership)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(membership, &c_membership)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(membership, &c_membership)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_membership); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_membership, 0)); @@ -8712,7 +8712,7 @@ SEXP R_igraph_community_leiden(SEXP graph, SEXP weights, SEXP vertex_weights, SE /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(membership=R_igraph_vector_int_to_SEXP(&c_membership)); + PROTECT(membership=Ry_igraph_vector_int_to_SEXP(&c_membership)); igraph_vector_int_destroy(&c_membership); IGRAPH_FINALLY_CLEAN(1); PROTECT(nb_clusters=NEW_NUMERIC(1)); @@ -8746,9 +8746,9 @@ SEXP R_igraph_split_join_distance(SEXP comm1, SEXP comm2) { SEXP r_result, r_names; /* Convert input */ - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(comm1, &c_comm1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(comm1, &c_comm1)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_comm1); - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(comm2, &c_comm2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(comm2, &c_comm2)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_comm2); c_distance12=0; c_distance21=0; @@ -8793,12 +8793,12 @@ SEXP R_igraph_community_infomap(SEXP graph, SEXP e_weights, SEXP v_weights, SEXP SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(e_weights)) { - R_SEXP_to_vector(e_weights, &c_e_weights); + Rz_SEXP_to_vector(e_weights, &c_e_weights); } if (!Rf_isNull(v_weights)) { - R_SEXP_to_vector(v_weights, &c_v_weights); + Rz_SEXP_to_vector(v_weights, &c_v_weights); } IGRAPH_R_CHECK_INT(nb_trials); c_nb_trials = (igraph_integer_t) REAL(nb_trials)[0]; @@ -8810,7 +8810,7 @@ SEXP R_igraph_community_infomap(SEXP graph, SEXP e_weights, SEXP v_weights, SEXP /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(membership=R_igraph_vector_int_to_SEXP(&c_membership)); + PROTECT(membership=Ry_igraph_vector_int_to_SEXP(&c_membership)); igraph_vector_int_destroy(&c_membership); IGRAPH_FINALLY_CLEAN(1); PROTECT(codelength=NEW_NUMERIC(1)); @@ -8840,9 +8840,9 @@ SEXP R_igraph_graphlets_candidate_basis(SEXP graph, SEXP weights) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_cliques, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_cliques); @@ -8854,10 +8854,10 @@ SEXP R_igraph_graphlets_candidate_basis(SEXP graph, SEXP weights) { /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(cliques=R_igraph_vector_int_list_to_SEXPp1(&c_cliques)); + PROTECT(cliques=Ry_igraph_vector_int_list_to_SEXPp1(&c_cliques)); igraph_vector_int_list_destroy(&c_cliques); IGRAPH_FINALLY_CLEAN(1); - PROTECT(thresholds=R_igraph_vector_to_SEXP(&c_thresholds)); + PROTECT(thresholds=Ry_igraph_vector_to_SEXP(&c_thresholds)); igraph_vector_destroy(&c_thresholds); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, cliques); @@ -8885,13 +8885,13 @@ SEXP R_igraph_graphlets_project(SEXP graph, SEXP weights, SEXP cliques, SEXP Muc SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } - IGRAPH_R_CHECK(R_igraph_SEXP_to_vector_int_list(cliques, &c_cliques)); + IGRAPH_R_CHECK(Ry_igraph_SEXP_to_vector_int_list(cliques, &c_cliques)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_cliques); - IGRAPH_R_CHECK(R_SEXP_to_vector_copy(Muc, &c_Muc)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_copy(Muc, &c_Muc)); IGRAPH_FINALLY(igraph_vector_destroy, &c_Muc); IGRAPH_R_CHECK_BOOL(startMu); c_startMu = LOGICAL(startMu)[0]; @@ -8903,7 +8903,7 @@ SEXP R_igraph_graphlets_project(SEXP graph, SEXP weights, SEXP cliques, SEXP Muc /* Convert output */ igraph_vector_int_list_destroy(&c_cliques); IGRAPH_FINALLY_CLEAN(1); - PROTECT(Muc=R_igraph_vector_to_SEXP(&c_Muc)); + PROTECT(Muc=Ry_igraph_vector_to_SEXP(&c_Muc)); igraph_vector_destroy(&c_Muc); IGRAPH_FINALLY_CLEAN(1); r_result = Muc; @@ -8924,8 +8924,8 @@ SEXP R_igraph_hrg_fit(SEXP graph, SEXP hrg, SEXP start, SEXP steps) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - IGRAPH_R_CHECK(R_SEXP_to_hrg_copy(hrg, &c_hrg)); + Rz_SEXP_to_igraph(graph, &c_graph); + IGRAPH_R_CHECK(Rz_SEXP_to_hrg_copy(hrg, &c_hrg)); IGRAPH_FINALLY(igraph_hrg_destroy, &c_hrg); IGRAPH_R_CHECK_BOOL(start); c_start = LOGICAL(start)[0]; @@ -8935,7 +8935,7 @@ SEXP R_igraph_hrg_fit(SEXP graph, SEXP hrg, SEXP start, SEXP steps) { IGRAPH_R_CHECK(igraph_hrg_fit(&c_graph, &c_hrg, c_start, c_steps)); /* Convert output */ - PROTECT(hrg=R_igraph_hrg_to_SEXP(&c_hrg)); + PROTECT(hrg=Ry_igraph_hrg_to_SEXP(&c_hrg)); igraph_hrg_destroy(&c_hrg); IGRAPH_FINALLY_CLEAN(1); r_result = hrg; @@ -8955,7 +8955,7 @@ SEXP R_igraph_hrg_sample(SEXP hrg) { SEXP r_result; /* Convert input */ - IGRAPH_R_CHECK(R_SEXP_to_hrg_copy(hrg, &c_hrg)); + IGRAPH_R_CHECK(Rz_SEXP_to_hrg_copy(hrg, &c_hrg)); IGRAPH_FINALLY(igraph_hrg_destroy, &c_hrg); /* Call igraph */ IGRAPH_R_CHECK(igraph_hrg_sample(&c_hrg, &c_sample)); @@ -8964,7 +8964,7 @@ SEXP R_igraph_hrg_sample(SEXP hrg) { igraph_hrg_destroy(&c_hrg); IGRAPH_FINALLY_CLEAN(1); IGRAPH_FINALLY(igraph_destroy, &c_sample); - PROTECT(sample=R_igraph_to_SEXP(&c_sample)); + PROTECT(sample=Ry_igraph_to_SEXP(&c_sample)); IGRAPH_I_DESTROY(&c_sample); IGRAPH_FINALLY_CLEAN(1); r_result = sample; @@ -8985,7 +8985,7 @@ SEXP R_igraph_hrg_sample_many(SEXP hrg, SEXP num_samples) { SEXP r_result; /* Convert input */ - IGRAPH_R_CHECK(R_SEXP_to_hrg_copy(hrg, &c_hrg)); + IGRAPH_R_CHECK(Rz_SEXP_to_hrg_copy(hrg, &c_hrg)); IGRAPH_FINALLY(igraph_hrg_destroy, &c_hrg); IGRAPH_R_CHECK(igraph_graph_list_init(&c_samples, 0)); IGRAPH_FINALLY(igraph_graph_list_destroy, &c_samples); @@ -8997,7 +8997,7 @@ SEXP R_igraph_hrg_sample_many(SEXP hrg, SEXP num_samples) { /* Convert output */ igraph_hrg_destroy(&c_hrg); IGRAPH_FINALLY_CLEAN(1); - PROTECT(samples=R_igraph_graphlist_to_SEXP(&c_samples)); + PROTECT(samples=Ry_igraph_graphlist_to_SEXP(&c_samples)); IGRAPH_FREE(c_samples.stor_begin); IGRAPH_FINALLY_CLEAN(1); r_result = samples; @@ -9017,14 +9017,14 @@ SEXP R_igraph_hrg_game(SEXP hrg) { SEXP r_result; /* Convert input */ - IGRAPH_R_CHECK(R_SEXP_to_hrg_copy(hrg, &c_hrg)); + IGRAPH_R_CHECK(Rz_SEXP_to_hrg_copy(hrg, &c_hrg)); IGRAPH_FINALLY(igraph_hrg_destroy, &c_hrg); /* Call igraph */ IGRAPH_R_CHECK(igraph_hrg_game(&c_graph, &c_hrg)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_hrg_destroy(&c_hrg); @@ -9051,12 +9051,12 @@ SEXP R_igraph_hrg_consensus(SEXP graph, SEXP hrg, SEXP start, SEXP num_samples) SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_parents, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_parents); IGRAPH_R_CHECK(igraph_vector_init(&c_weights, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_weights); - IGRAPH_R_CHECK(R_SEXP_to_hrg_copy(hrg, &c_hrg)); + IGRAPH_R_CHECK(Rz_SEXP_to_hrg_copy(hrg, &c_hrg)); IGRAPH_FINALLY(igraph_hrg_destroy, &c_hrg); IGRAPH_R_CHECK_BOOL(start); c_start = LOGICAL(start)[0]; @@ -9068,13 +9068,13 @@ SEXP R_igraph_hrg_consensus(SEXP graph, SEXP hrg, SEXP start, SEXP num_samples) /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(parents=R_igraph_vector_int_to_SEXP(&c_parents)); + PROTECT(parents=Ry_igraph_vector_int_to_SEXP(&c_parents)); igraph_vector_int_destroy(&c_parents); IGRAPH_FINALLY_CLEAN(1); - PROTECT(weights=R_igraph_vector_to_SEXP(&c_weights)); + PROTECT(weights=Ry_igraph_vector_to_SEXP(&c_weights)); igraph_vector_destroy(&c_weights); IGRAPH_FINALLY_CLEAN(1); - PROTECT(hrg=R_igraph_hrg_to_SEXP(&c_hrg)); + PROTECT(hrg=Ry_igraph_hrg_to_SEXP(&c_hrg)); igraph_hrg_destroy(&c_hrg); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, parents); @@ -9107,12 +9107,12 @@ SEXP R_igraph_hrg_predict(SEXP graph, SEXP hrg, SEXP start, SEXP num_samples, SE SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_edges, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edges); IGRAPH_R_CHECK(igraph_vector_init(&c_prob, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_prob); - IGRAPH_R_CHECK(R_SEXP_to_hrg_copy(hrg, &c_hrg)); + IGRAPH_R_CHECK(Rz_SEXP_to_hrg_copy(hrg, &c_hrg)); IGRAPH_FINALLY(igraph_hrg_destroy, &c_hrg); IGRAPH_R_CHECK_BOOL(start); c_start = LOGICAL(start)[0]; @@ -9126,13 +9126,13 @@ SEXP R_igraph_hrg_predict(SEXP graph, SEXP hrg, SEXP start, SEXP num_samples, SE /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(edges=R_igraph_vector_int_to_SEXPp1(&c_edges)); + PROTECT(edges=Ry_igraph_vector_int_to_SEXPp1(&c_edges)); igraph_vector_int_destroy(&c_edges); IGRAPH_FINALLY_CLEAN(1); - PROTECT(prob=R_igraph_vector_to_SEXP(&c_prob)); + PROTECT(prob=Ry_igraph_vector_to_SEXP(&c_prob)); igraph_vector_destroy(&c_prob); IGRAPH_FINALLY_CLEAN(1); - PROTECT(hrg=R_igraph_hrg_to_SEXP(&c_hrg)); + PROTECT(hrg=Ry_igraph_hrg_to_SEXP(&c_hrg)); igraph_hrg_destroy(&c_hrg); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, edges); @@ -9162,13 +9162,13 @@ SEXP R_igraph_hrg_create(SEXP graph, SEXP prob) { /* Convert input */ IGRAPH_R_CHECK(igraph_hrg_init(&c_hrg, 0)); IGRAPH_FINALLY(igraph_hrg_destroy, &c_hrg); - R_SEXP_to_igraph(graph, &c_graph); - R_SEXP_to_vector(prob, &c_prob); + Rz_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_vector(prob, &c_prob); /* Call igraph */ IGRAPH_R_CHECK(igraph_hrg_create(&c_hrg, &c_graph, &c_prob)); /* Convert output */ - PROTECT(hrg=R_igraph_hrg_to_SEXP(&c_hrg)); + PROTECT(hrg=Ry_igraph_hrg_to_SEXP(&c_hrg)); igraph_hrg_destroy(&c_hrg); IGRAPH_FINALLY_CLEAN(1); r_result = hrg; @@ -9187,7 +9187,7 @@ SEXP R_igraph_hrg_resize(SEXP hrg, SEXP newsize) { SEXP r_result; /* Convert input */ - IGRAPH_R_CHECK(R_SEXP_to_hrg_copy(hrg, &c_hrg)); + IGRAPH_R_CHECK(Rz_SEXP_to_hrg_copy(hrg, &c_hrg)); IGRAPH_FINALLY(igraph_hrg_destroy, &c_hrg); IGRAPH_R_CHECK_INT(newsize); c_newsize = (igraph_integer_t) REAL(newsize)[0]; @@ -9195,7 +9195,7 @@ SEXP R_igraph_hrg_resize(SEXP hrg, SEXP newsize) { IGRAPH_R_CHECK(igraph_hrg_resize(&c_hrg, c_newsize)); /* Convert output */ - PROTECT(hrg=R_igraph_hrg_to_SEXP(&c_hrg)); + PROTECT(hrg=Ry_igraph_hrg_to_SEXP(&c_hrg)); igraph_hrg_destroy(&c_hrg); IGRAPH_FINALLY_CLEAN(1); r_result = hrg; @@ -9213,7 +9213,7 @@ SEXP R_igraph_hrg_size(SEXP hrg) { igraph_integer_t c_result; SEXP r_result; /* Convert input */ - IGRAPH_R_CHECK(R_SEXP_to_hrg_copy(hrg, &c_hrg)); + IGRAPH_R_CHECK(Rz_SEXP_to_hrg_copy(hrg, &c_hrg)); IGRAPH_FINALLY(igraph_hrg_destroy, &c_hrg); /* Call igraph */ c_result=igraph_hrg_size(&c_hrg); @@ -9241,7 +9241,7 @@ SEXP R_igraph_from_hrg_dendrogram(SEXP hrg) { SEXP r_result, r_names; /* Convert input */ - IGRAPH_R_CHECK(R_SEXP_to_hrg_copy(hrg, &c_hrg)); + IGRAPH_R_CHECK(Rz_SEXP_to_hrg_copy(hrg, &c_hrg)); IGRAPH_FINALLY(igraph_hrg_destroy, &c_hrg); IGRAPH_R_CHECK(igraph_vector_init(&c_prob, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_prob); @@ -9252,12 +9252,12 @@ SEXP R_igraph_from_hrg_dendrogram(SEXP hrg) { PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_hrg_destroy(&c_hrg); IGRAPH_FINALLY_CLEAN(1); - PROTECT(prob=R_igraph_vector_to_SEXP(&c_prob)); + PROTECT(prob=Ry_igraph_vector_to_SEXP(&c_prob)); igraph_vector_destroy(&c_prob); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, graph); @@ -9285,19 +9285,19 @@ SEXP R_igraph_get_adjacency_sparse(SEXP graph, SEXP type, SEXP weights, SEXP loo SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_sparsemat_init(&c_sparsemat, 0, 0, 0)); IGRAPH_FINALLY(igraph_sparsemat_destroy, &c_sparsemat); c_type = (igraph_get_adjacency_t) Rf_asInteger(type); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } c_loops = (igraph_loops_t) Rf_asInteger(loops); /* Call igraph */ IGRAPH_R_CHECK(igraph_get_adjacency_sparse(&c_graph, &c_sparsemat, c_type, (Rf_isNull(weights) ? 0 : &c_weights), c_loops)); /* Convert output */ - PROTECT(sparsemat=R_igraph_sparsemat_to_SEXP(&c_sparsemat)); + PROTECT(sparsemat=Ry_igraph_sparsemat_to_SEXP(&c_sparsemat)); igraph_sparsemat_destroy(&c_sparsemat); IGRAPH_FINALLY_CLEAN(1); r_result = sparsemat; @@ -9318,7 +9318,7 @@ SEXP R_igraph_get_edgelist(SEXP graph, SEXP bycol) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_res); IGRAPH_R_CHECK_BOOL(bycol); @@ -9327,7 +9327,7 @@ SEXP R_igraph_get_edgelist(SEXP graph, SEXP bycol) { IGRAPH_R_CHECK(igraph_get_edgelist(&c_graph, &c_res, c_bycol)); /* Convert output */ - PROTECT(res=R_igraph_vector_int_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_int_to_SEXP(&c_res)); igraph_vector_int_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -9349,19 +9349,19 @@ SEXP R_igraph_get_stochastic(SEXP graph, SEXP column_wise, SEXP weights) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_matrix_init(&c_res, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &c_res); IGRAPH_R_CHECK_BOOL(column_wise); c_column_wise = LOGICAL(column_wise)[0]; if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_get_stochastic(&c_graph, &c_res, c_column_wise, (Rf_isNull(weights) ? 0 : &c_weights))); /* Convert output */ - PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_matrix_to_SEXP(&c_res)); igraph_matrix_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -9383,19 +9383,19 @@ SEXP R_igraph_get_stochastic_sparse(SEXP graph, SEXP column_wise, SEXP weights) SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_sparsemat_init(&c_sparsemat, 0, 0, 0)); IGRAPH_FINALLY(igraph_sparsemat_destroy, &c_sparsemat); IGRAPH_R_CHECK_BOOL(column_wise); c_column_wise = LOGICAL(column_wise)[0]; if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_get_stochastic_sparse(&c_graph, &c_sparsemat, c_column_wise, (Rf_isNull(weights) ? 0 : &c_weights))); /* Convert output */ - PROTECT(sparsemat=R_igraph_sparsemat_to_SEXP(&c_sparsemat)); + PROTECT(sparsemat=Ry_igraph_sparsemat_to_SEXP(&c_sparsemat)); igraph_sparsemat_destroy(&c_sparsemat); IGRAPH_FINALLY_CLEAN(1); r_result = sparsemat; @@ -9414,14 +9414,14 @@ SEXP R_igraph_to_directed(SEXP graph, SEXP mode) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph_copy(graph, &c_graph); + Rz_SEXP_to_igraph_copy(graph, &c_graph); IGRAPH_FINALLY(igraph_destroy, &c_graph); c_mode = (igraph_to_directed_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_to_directed(&c_graph, c_mode)); /* Convert output */ - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -9441,16 +9441,16 @@ SEXP R_igraph_to_undirected(SEXP graph, SEXP mode, SEXP edge_attr_comb) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph_copy(graph, &c_graph); + Rz_SEXP_to_igraph_copy(graph, &c_graph); IGRAPH_FINALLY(igraph_destroy, &c_graph); c_mode = (igraph_to_undirected_t) Rf_asInteger(mode); - R_SEXP_to_attr_comb(edge_attr_comb, &c_edge_attr_comb); + Rz_SEXP_to_attr_comb(edge_attr_comb, &c_edge_attr_comb); IGRAPH_FINALLY(igraph_attribute_combination_destroy, &c_edge_attr_comb); /* Call igraph */ IGRAPH_R_CHECK(igraph_to_undirected(&c_graph, c_mode, &c_edge_attr_comb)); /* Convert output */ - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_attribute_combination_destroy(&c_edge_attr_comb); @@ -9472,14 +9472,14 @@ SEXP R_igraph_read_graph_pajek(SEXP instream) { SEXP r_result; /* Convert input */ - c_instream = R_igraph_fopen_read(instream); + c_instream = Ry_igraph_fopen_read(instream); IGRAPH_FINALLY(fclose, c_instream); /* Call igraph */ IGRAPH_R_CHECK(igraph_read_graph_pajek(&c_graph, c_instream)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -9500,7 +9500,7 @@ SEXP R_igraph_read_graph_graphml(SEXP instream, SEXP index) { SEXP r_result; /* Convert input */ - c_instream = R_igraph_fopen_read(instream); + c_instream = Ry_igraph_fopen_read(instream); IGRAPH_FINALLY(fclose, c_instream); IGRAPH_R_CHECK_INT(index); c_index = (igraph_integer_t) REAL(index)[0]; @@ -9509,7 +9509,7 @@ SEXP R_igraph_read_graph_graphml(SEXP instream, SEXP index) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -9530,7 +9530,7 @@ SEXP R_igraph_read_graph_graphdb(SEXP instream, SEXP directed) { SEXP r_result; /* Convert input */ - c_instream = R_igraph_fopen_read(instream); + c_instream = Ry_igraph_fopen_read(instream); IGRAPH_FINALLY(fclose, c_instream); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; @@ -9539,7 +9539,7 @@ SEXP R_igraph_read_graph_graphdb(SEXP instream, SEXP directed) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -9559,14 +9559,14 @@ SEXP R_igraph_read_graph_gml(SEXP instream) { SEXP r_result; /* Convert input */ - c_instream = R_igraph_fopen_read(instream); + c_instream = Ry_igraph_fopen_read(instream); IGRAPH_FINALLY(fclose, c_instream); /* Call igraph */ IGRAPH_R_CHECK(igraph_read_graph_gml(&c_graph, c_instream)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -9587,7 +9587,7 @@ SEXP R_igraph_read_graph_dl(SEXP instream, SEXP directed) { SEXP r_result; /* Convert input */ - c_instream = R_igraph_fopen_read(instream); + c_instream = Ry_igraph_fopen_read(instream); IGRAPH_FINALLY(fclose, c_instream); IGRAPH_R_CHECK_BOOL(directed); c_directed = LOGICAL(directed)[0]; @@ -9596,7 +9596,7 @@ SEXP R_igraph_read_graph_dl(SEXP instream, SEXP directed) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -9614,8 +9614,8 @@ SEXP R_igraph_write_graph_edgelist(SEXP graph, SEXP outstream) { FILE* c_outstream; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - c_outstream = R_igraph_fopen_write(outstream); + Rz_SEXP_to_igraph(graph, &c_graph); + c_outstream = Ry_igraph_fopen_write(outstream); IGRAPH_FINALLY(fclose, c_outstream); /* Call igraph */ IGRAPH_R_CHECK(igraph_write_graph_edgelist(&c_graph, c_outstream)); @@ -9638,8 +9638,8 @@ SEXP R_igraph_write_graph_leda(SEXP graph, SEXP outstream, SEXP names, SEXP weig const char* c_weights; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - c_outstream = R_igraph_fopen_write(outstream); + Rz_SEXP_to_igraph(graph, &c_graph); + c_outstream = Ry_igraph_fopen_write(outstream); IGRAPH_FINALLY(fclose, c_outstream); c_names = Rf_translateCharUTF8(STRING_ELT(names, 0)); c_weights = Rf_translateCharUTF8(STRING_ELT(weights, 0)); @@ -9663,8 +9663,8 @@ SEXP R_igraph_write_graph_graphml(SEXP graph, SEXP outstream, SEXP prefixattr) { igraph_bool_t c_prefixattr; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - c_outstream = R_igraph_fopen_write(outstream); + Rz_SEXP_to_igraph(graph, &c_graph); + c_outstream = Ry_igraph_fopen_write(outstream); IGRAPH_FINALLY(fclose, c_outstream); IGRAPH_R_CHECK_BOOL(prefixattr); c_prefixattr = LOGICAL(prefixattr)[0]; @@ -9687,8 +9687,8 @@ SEXP R_igraph_write_graph_pajek(SEXP graph, SEXP outstream) { FILE* c_outstream; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - c_outstream = R_igraph_fopen_write(outstream); + Rz_SEXP_to_igraph(graph, &c_graph); + c_outstream = Ry_igraph_fopen_write(outstream); IGRAPH_FINALLY(fclose, c_outstream); /* Call igraph */ IGRAPH_R_CHECK(igraph_write_graph_pajek(&c_graph, c_outstream)); @@ -9712,11 +9712,11 @@ SEXP R_igraph_write_graph_gml(SEXP graph, SEXP outstream, SEXP options, SEXP id, const char* c_creator; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - c_outstream = R_igraph_fopen_write(outstream); + Rz_SEXP_to_igraph(graph, &c_graph); + c_outstream = Ry_igraph_fopen_write(outstream); IGRAPH_FINALLY(fclose, c_outstream); c_options = (igraph_write_gml_sw_t) Rf_asInteger(options); - R_SEXP_to_vector(id, &c_id); + Rz_SEXP_to_vector(id, &c_id); if (!Rf_isNull(creator)) { c_creator = Rf_translateCharUTF8(STRING_ELT(creator, 0)); } @@ -9739,8 +9739,8 @@ SEXP R_igraph_write_graph_dot(SEXP graph, SEXP outstream) { FILE* c_outstream; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - c_outstream = R_igraph_fopen_write(outstream); + Rz_SEXP_to_igraph(graph, &c_graph); + c_outstream = Ry_igraph_fopen_write(outstream); IGRAPH_FINALLY(fclose, c_outstream); /* Call igraph */ IGRAPH_R_CHECK(igraph_write_graph_dot(&c_graph, c_outstream)); @@ -9765,19 +9765,19 @@ SEXP R_igraph_motifs_randesu(SEXP graph, SEXP size, SEXP cut_prob) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_hist, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_hist); IGRAPH_R_CHECK_INT(size); c_size = (igraph_integer_t) REAL(size)[0]; if (!Rf_isNull(cut_prob)) { - R_SEXP_to_vector(cut_prob, &c_cut_prob); + Rz_SEXP_to_vector(cut_prob, &c_cut_prob); } /* Call igraph */ IGRAPH_R_CHECK(igraph_motifs_randesu(&c_graph, &c_hist, c_size, (Rf_isNull(cut_prob) ? 0 : &c_cut_prob))); /* Convert output */ - PROTECT(hist=R_igraph_vector_to_SEXP(&c_hist)); + PROTECT(hist=Ry_igraph_vector_to_SEXP(&c_hist)); igraph_vector_destroy(&c_hist); IGRAPH_FINALLY_CLEAN(1); r_result = hist; @@ -9801,17 +9801,17 @@ SEXP R_igraph_motifs_randesu_estimate(SEXP graph, SEXP size, SEXP cut_prob, SEXP SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_est=0; IGRAPH_R_CHECK_INT(size); c_size = (igraph_integer_t) REAL(size)[0]; if (!Rf_isNull(cut_prob)) { - R_SEXP_to_vector(cut_prob, &c_cut_prob); + Rz_SEXP_to_vector(cut_prob, &c_cut_prob); } IGRAPH_R_CHECK_INT(sample_size); c_sample_size = (igraph_integer_t) REAL(sample_size)[0]; if (!Rf_isNull(sample)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(sample, &c_sample)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(sample, &c_sample)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_sample); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_sample, 0)); @@ -9844,12 +9844,12 @@ SEXP R_igraph_motifs_randesu_no(SEXP graph, SEXP size, SEXP cut_prob) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_no=0; IGRAPH_R_CHECK_INT(size); c_size = (igraph_integer_t) REAL(size)[0]; if (!Rf_isNull(cut_prob)) { - R_SEXP_to_vector(cut_prob, &c_cut_prob); + Rz_SEXP_to_vector(cut_prob, &c_cut_prob); } /* Call igraph */ IGRAPH_R_CHECK(igraph_motifs_randesu_no(&c_graph, &c_no, c_size, (Rf_isNull(cut_prob) ? 0 : &c_cut_prob))); @@ -9878,7 +9878,7 @@ SEXP R_igraph_dyad_census(SEXP graph) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ IGRAPH_R_CHECK(igraph_dyad_census(&c_graph, &c_mut, &c_asym, &c_null)); @@ -9915,14 +9915,14 @@ SEXP R_igraph_triad_census(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); /* Call igraph */ IGRAPH_R_CHECK(igraph_triad_census(&c_graph, &c_res)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -9943,16 +9943,16 @@ SEXP R_igraph_count_adjacent_triangles(SEXP graph, SEXP vids) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); 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); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); /* Call igraph */ IGRAPH_R_CHECK(igraph_count_adjacent_triangles(&c_graph, &c_res, c_vids)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); @@ -9974,7 +9974,7 @@ SEXP R_igraph_count_triangles(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ IGRAPH_R_CHECK(igraph_count_triangles(&c_graph, &c_res)); @@ -10000,18 +10000,18 @@ SEXP R_igraph_local_scan_0(SEXP graph, SEXP weights, SEXP mode) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_local_scan_0(&c_graph, &c_res, (Rf_isNull(weights) ? 0 : &c_weights), c_mode)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -10034,19 +10034,19 @@ SEXP R_igraph_local_scan_0_them(SEXP us, SEXP them, SEXP weights_them, SEXP mode SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(us, &c_us); - R_SEXP_to_igraph(them, &c_them); + Rz_SEXP_to_igraph(us, &c_us); + Rz_SEXP_to_igraph(them, &c_them); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); if (!Rf_isNull(weights_them)) { - R_SEXP_to_vector(weights_them, &c_weights_them); + Rz_SEXP_to_vector(weights_them, &c_weights_them); } c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_local_scan_0_them(&c_us, &c_them, &c_res, (Rf_isNull(weights_them) ? 0 : &c_weights_them), c_mode)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -10068,18 +10068,18 @@ SEXP R_igraph_local_scan_1_ecount(SEXP graph, SEXP weights, SEXP mode) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_local_scan_1_ecount(&c_graph, &c_res, (Rf_isNull(weights) ? 0 : &c_weights), c_mode)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -10102,19 +10102,19 @@ SEXP R_igraph_local_scan_1_ecount_them(SEXP us, SEXP them, SEXP weights_them, SE SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(us, &c_us); - R_SEXP_to_igraph(them, &c_them); + Rz_SEXP_to_igraph(us, &c_us); + Rz_SEXP_to_igraph(them, &c_them); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); if (!Rf_isNull(weights_them)) { - R_SEXP_to_vector(weights_them, &c_weights_them); + Rz_SEXP_to_vector(weights_them, &c_weights_them); } c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_local_scan_1_ecount_them(&c_us, &c_them, &c_res, (Rf_isNull(weights_them) ? 0 : &c_weights_them), c_mode)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -10137,20 +10137,20 @@ SEXP R_igraph_local_scan_k_ecount(SEXP graph, SEXP k, SEXP weights, SEXP mode) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK_INT(k); c_k = (igraph_integer_t) REAL(k)[0]; IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_local_scan_k_ecount(&c_graph, c_k, &c_res, (Rf_isNull(weights) ? 0 : &c_weights), c_mode)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -10174,21 +10174,21 @@ SEXP R_igraph_local_scan_k_ecount_them(SEXP us, SEXP them, SEXP k, SEXP weights_ SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(us, &c_us); - R_SEXP_to_igraph(them, &c_them); + Rz_SEXP_to_igraph(us, &c_us); + Rz_SEXP_to_igraph(them, &c_them); IGRAPH_R_CHECK_INT(k); c_k = (igraph_integer_t) REAL(k)[0]; IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); if (!Rf_isNull(weights_them)) { - R_SEXP_to_vector(weights_them, &c_weights_them); + Rz_SEXP_to_vector(weights_them, &c_weights_them); } c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_local_scan_k_ecount_them(&c_us, &c_them, c_k, &c_res, (Rf_isNull(weights_them) ? 0 : &c_weights_them), c_mode)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -10210,19 +10210,19 @@ SEXP R_igraph_local_scan_neighborhood_ecount(SEXP graph, SEXP weights, SEXP neig SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } - IGRAPH_R_CHECK(R_igraph_SEXP_to_vector_int_list(neighborhoods, &c_neighborhoods)); + IGRAPH_R_CHECK(Ry_igraph_SEXP_to_vector_int_list(neighborhoods, &c_neighborhoods)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_neighborhoods); /* Call igraph */ IGRAPH_R_CHECK(igraph_local_scan_neighborhood_ecount(&c_graph, &c_res, (Rf_isNull(weights) ? 0 : &c_weights), &c_neighborhoods)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_list_destroy(&c_neighborhoods); @@ -10246,19 +10246,19 @@ SEXP R_igraph_local_scan_subset_ecount(SEXP graph, SEXP weights, SEXP subsets) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } - IGRAPH_R_CHECK(R_igraph_SEXP_to_vector_int_list(subsets, &c_subsets)); + IGRAPH_R_CHECK(Ry_igraph_SEXP_to_vector_int_list(subsets, &c_subsets)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_subsets); /* Call igraph */ IGRAPH_R_CHECK(igraph_local_scan_subset_ecount(&c_graph, &c_res, (Rf_isNull(weights) ? 0 : &c_weights), &c_subsets)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_list_destroy(&c_subsets); @@ -10280,14 +10280,14 @@ SEXP R_igraph_list_triangles(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_res); /* Call igraph */ IGRAPH_R_CHECK(igraph_list_triangles(&c_graph, &c_res)); /* Convert output */ - PROTECT(res=R_igraph_vector_int_to_SEXPp1(&c_res)); + PROTECT(res=Ry_igraph_vector_int_to_SEXPp1(&c_res)); igraph_vector_int_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -10308,14 +10308,14 @@ SEXP R_igraph_disjoint_union(SEXP left, SEXP right) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(left, &c_left); - R_SEXP_to_igraph(right, &c_right); + Rz_SEXP_to_igraph(left, &c_left); + Rz_SEXP_to_igraph(right, &c_right); /* Call igraph */ IGRAPH_R_CHECK(igraph_disjoint_union(&c_res, &c_left, &c_right)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_res); - PROTECT(res=R_igraph_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_to_SEXP(&c_res)); IGRAPH_I_DESTROY(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -10336,14 +10336,14 @@ SEXP R_igraph_join(SEXP left, SEXP right) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(left, &c_left); - R_SEXP_to_igraph(right, &c_right); + Rz_SEXP_to_igraph(left, &c_left); + Rz_SEXP_to_igraph(right, &c_right); /* Call igraph */ IGRAPH_R_CHECK(igraph_join(&c_res, &c_left, &c_right)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_res); - PROTECT(res=R_igraph_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_to_SEXP(&c_res)); IGRAPH_I_DESTROY(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -10368,8 +10368,8 @@ SEXP R_igraph_union(SEXP left, SEXP right) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(left, &c_left); - R_SEXP_to_igraph(right, &c_right); + Rz_SEXP_to_igraph(left, &c_left); + Rz_SEXP_to_igraph(right, &c_right); IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_map_left, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_map_left); IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_map_right, 0)); @@ -10381,13 +10381,13 @@ SEXP R_igraph_union(SEXP left, SEXP right) { PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); IGRAPH_FINALLY(igraph_destroy, &c_res); - PROTECT(res=R_igraph_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_to_SEXP(&c_res)); IGRAPH_I_DESTROY(&c_res); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edge_map_left=R_igraph_vector_int_to_SEXPp1(&c_edge_map_left)); + PROTECT(edge_map_left=Ry_igraph_vector_int_to_SEXPp1(&c_edge_map_left)); igraph_vector_int_destroy(&c_edge_map_left); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edge_map_right=R_igraph_vector_int_to_SEXPp1(&c_edge_map_right)); + PROTECT(edge_map_right=Ry_igraph_vector_int_to_SEXPp1(&c_edge_map_right)); igraph_vector_int_destroy(&c_edge_map_right); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, res); @@ -10419,8 +10419,8 @@ SEXP R_igraph_intersection(SEXP left, SEXP right) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(left, &c_left); - R_SEXP_to_igraph(right, &c_right); + Rz_SEXP_to_igraph(left, &c_left); + Rz_SEXP_to_igraph(right, &c_right); IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_map_left, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_map_left); IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_map_right, 0)); @@ -10432,13 +10432,13 @@ SEXP R_igraph_intersection(SEXP left, SEXP right) { PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); IGRAPH_FINALLY(igraph_destroy, &c_res); - PROTECT(res=R_igraph_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_to_SEXP(&c_res)); IGRAPH_I_DESTROY(&c_res); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edge_map_left=R_igraph_vector_int_to_SEXPp1(&c_edge_map_left)); + PROTECT(edge_map_left=Ry_igraph_vector_int_to_SEXPp1(&c_edge_map_left)); igraph_vector_int_destroy(&c_edge_map_left); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edge_map_right=R_igraph_vector_int_to_SEXPp1(&c_edge_map_right)); + PROTECT(edge_map_right=Ry_igraph_vector_int_to_SEXPp1(&c_edge_map_right)); igraph_vector_int_destroy(&c_edge_map_right); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, res); @@ -10466,14 +10466,14 @@ SEXP R_igraph_difference(SEXP orig, SEXP sub) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(orig, &c_orig); - R_SEXP_to_igraph(sub, &c_sub); + Rz_SEXP_to_igraph(orig, &c_orig); + Rz_SEXP_to_igraph(sub, &c_sub); /* Call igraph */ IGRAPH_R_CHECK(igraph_difference(&c_res, &c_orig, &c_sub)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_res); - PROTECT(res=R_igraph_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_to_SEXP(&c_res)); IGRAPH_I_DESTROY(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -10494,7 +10494,7 @@ SEXP R_igraph_complementer(SEXP graph, SEXP loops) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK_BOOL(loops); c_loops = LOGICAL(loops)[0]; /* Call igraph */ @@ -10502,7 +10502,7 @@ SEXP R_igraph_complementer(SEXP graph, SEXP loops) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_res); - PROTECT(res=R_igraph_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_to_SEXP(&c_res)); IGRAPH_I_DESTROY(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -10527,8 +10527,8 @@ SEXP R_igraph_compose(SEXP g1, SEXP g2) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(g1, &c_g1); - R_SEXP_to_igraph(g2, &c_g2); + Rz_SEXP_to_igraph(g1, &c_g1); + Rz_SEXP_to_igraph(g2, &c_g2); IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_map1, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_map1); IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_map2, 0)); @@ -10540,13 +10540,13 @@ SEXP R_igraph_compose(SEXP g1, SEXP g2) { PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); IGRAPH_FINALLY(igraph_destroy, &c_res); - PROTECT(res=R_igraph_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_to_SEXP(&c_res)); IGRAPH_I_DESTROY(&c_res); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edge_map1=R_igraph_vector_int_to_SEXPp1(&c_edge_map1)); + PROTECT(edge_map1=Ry_igraph_vector_int_to_SEXPp1(&c_edge_map1)); igraph_vector_int_destroy(&c_edge_map1); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edge_map2=R_igraph_vector_int_to_SEXPp1(&c_edge_map2)); + PROTECT(edge_map2=Ry_igraph_vector_int_to_SEXPp1(&c_edge_map2)); igraph_vector_int_destroy(&c_edge_map2); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, res); @@ -10579,9 +10579,9 @@ SEXP R_igraph_induced_subgraph_map(SEXP graph, SEXP vids, SEXP impl) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); igraph_vector_int_t c_vids_data; - R_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); + Rz_SEXP_to_igraph_vs(vids, &c_graph, &c_vids, &c_vids_data); c_impl = (igraph_subgraph_implementation_t) Rf_asInteger(impl); IGRAPH_R_CHECK(igraph_vector_int_init(&c_map, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_map); @@ -10594,15 +10594,15 @@ SEXP R_igraph_induced_subgraph_map(SEXP graph, SEXP vids, SEXP impl) { PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); IGRAPH_FINALLY(igraph_destroy, &c_res); - PROTECT(res=R_igraph_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_to_SEXP(&c_res)); IGRAPH_I_DESTROY(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_vids_data); igraph_vs_destroy(&c_vids); - PROTECT(map=R_igraph_vector_int_to_SEXPp1(&c_map)); + PROTECT(map=Ry_igraph_vector_int_to_SEXPp1(&c_map)); igraph_vector_int_destroy(&c_map); IGRAPH_FINALLY_CLEAN(1); - PROTECT(invmap=R_igraph_vector_int_to_SEXPp1(&c_invmap)); + PROTECT(invmap=Ry_igraph_vector_int_to_SEXPp1(&c_invmap)); igraph_vector_int_destroy(&c_invmap); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, res); @@ -10630,7 +10630,7 @@ SEXP R_igraph_mycielskian(SEXP graph, SEXP k) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK_INT(k); c_k = (igraph_integer_t) REAL(k)[0]; /* Call igraph */ @@ -10638,7 +10638,7 @@ SEXP R_igraph_mycielskian(SEXP graph, SEXP k) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_res); - PROTECT(res=R_igraph_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_to_SEXP(&c_res)); IGRAPH_I_DESTROY(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -10660,15 +10660,15 @@ SEXP R_igraph_product(SEXP g1, SEXP g2, SEXP type) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(g1, &c_g1); - R_SEXP_to_igraph(g2, &c_g2); + Rz_SEXP_to_igraph(g1, &c_g1); + Rz_SEXP_to_igraph(g2, &c_g2); c_type = (igraph_product_t) Rf_asInteger(type); /* Call igraph */ IGRAPH_R_CHECK(igraph_product(&c_res, &c_g1, &c_g2, c_type)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_res); - PROTECT(res=R_igraph_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_to_SEXP(&c_res)); IGRAPH_I_DESTROY(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -10690,15 +10690,15 @@ SEXP R_igraph_rooted_product(SEXP g1, SEXP g2, SEXP root) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(g1, &c_g1); - R_SEXP_to_igraph(g2, &c_g2); + Rz_SEXP_to_igraph(g1, &c_g1); + Rz_SEXP_to_igraph(g2, &c_g2); c_root = (igraph_integer_t) REAL(root)[0]; /* Call igraph */ IGRAPH_R_CHECK(igraph_rooted_product(&c_res, &c_g1, &c_g2, c_root)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_res); - PROTECT(res=R_igraph_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_to_SEXP(&c_res)); IGRAPH_I_DESTROY(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -10721,11 +10721,11 @@ SEXP R_igraph_gomory_hu_tree(SEXP graph, SEXP capacity) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_flows, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_flows); if (!Rf_isNull(capacity)) { - R_SEXP_to_vector(capacity, &c_capacity); + Rz_SEXP_to_vector(capacity, &c_capacity); } /* Call igraph */ IGRAPH_R_CHECK(igraph_gomory_hu_tree(&c_graph, &c_tree, &c_flows, (Rf_isNull(capacity) ? 0 : &c_capacity))); @@ -10734,10 +10734,10 @@ SEXP R_igraph_gomory_hu_tree(SEXP graph, SEXP capacity) { PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); IGRAPH_FINALLY(igraph_destroy, &c_tree); - PROTECT(tree=R_igraph_to_SEXP(&c_tree)); + PROTECT(tree=Ry_igraph_to_SEXP(&c_tree)); IGRAPH_I_DESTROY(&c_tree); IGRAPH_FINALLY_CLEAN(1); - PROTECT(flows=R_igraph_vector_to_SEXP(&c_flows)); + PROTECT(flows=Ry_igraph_vector_to_SEXP(&c_flows)); igraph_vector_destroy(&c_flows); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, tree); @@ -10775,7 +10775,7 @@ SEXP R_igraph_maxflow(SEXP graph, SEXP source, SEXP target, SEXP capacity) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_flow, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_flow); IGRAPH_R_CHECK(igraph_vector_int_init(&c_cut, 0)); @@ -10787,7 +10787,7 @@ SEXP R_igraph_maxflow(SEXP graph, SEXP source, SEXP target, SEXP capacity) { c_source = (igraph_integer_t) REAL(source)[0]; c_target = (igraph_integer_t) REAL(target)[0]; if (!Rf_isNull(capacity)) { - R_SEXP_to_vector(capacity, &c_capacity); + Rz_SEXP_to_vector(capacity, &c_capacity); } /* Call igraph */ IGRAPH_R_CHECK(igraph_maxflow(&c_graph, &c_value, &c_flow, &c_cut, &c_partition1, &c_partition2, c_source, c_target, (Rf_isNull(capacity) ? 0 : &c_capacity), &c_stats)); @@ -10797,19 +10797,19 @@ SEXP R_igraph_maxflow(SEXP graph, SEXP source, SEXP target, SEXP capacity) { PROTECT(r_names=NEW_CHARACTER(6)); PROTECT(value=NEW_NUMERIC(1)); REAL(value)[0]=c_value; - PROTECT(flow=R_igraph_vector_to_SEXP(&c_flow)); + PROTECT(flow=Ry_igraph_vector_to_SEXP(&c_flow)); igraph_vector_destroy(&c_flow); IGRAPH_FINALLY_CLEAN(1); - PROTECT(cut=R_igraph_vector_int_to_SEXPp1(&c_cut)); + PROTECT(cut=Ry_igraph_vector_int_to_SEXPp1(&c_cut)); igraph_vector_int_destroy(&c_cut); IGRAPH_FINALLY_CLEAN(1); - PROTECT(partition1=R_igraph_vector_int_to_SEXPp1(&c_partition1)); + PROTECT(partition1=Ry_igraph_vector_int_to_SEXPp1(&c_partition1)); igraph_vector_int_destroy(&c_partition1); IGRAPH_FINALLY_CLEAN(1); - PROTECT(partition2=R_igraph_vector_int_to_SEXPp1(&c_partition2)); + PROTECT(partition2=Ry_igraph_vector_int_to_SEXPp1(&c_partition2)); igraph_vector_int_destroy(&c_partition2); IGRAPH_FINALLY_CLEAN(1); - PROTECT(stats=R_igraph_maxflow_stats_to_SEXP(&c_stats)); + PROTECT(stats=Ry_igraph_maxflow_stats_to_SEXP(&c_stats)); SET_VECTOR_ELT(r_result, 0, value); SET_VECTOR_ELT(r_result, 1, flow); SET_VECTOR_ELT(r_result, 2, cut); @@ -10847,7 +10847,7 @@ SEXP R_igraph_mincut(SEXP graph, SEXP capacity) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_partition1, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_partition1); IGRAPH_R_CHECK(igraph_vector_int_init(&c_partition2, 0)); @@ -10855,7 +10855,7 @@ SEXP R_igraph_mincut(SEXP graph, SEXP capacity) { IGRAPH_R_CHECK(igraph_vector_int_init(&c_cut, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_cut); if (!Rf_isNull(capacity)) { - R_SEXP_to_vector(capacity, &c_capacity); + Rz_SEXP_to_vector(capacity, &c_capacity); } /* Call igraph */ IGRAPH_R_CHECK(igraph_mincut(&c_graph, &c_value, &c_partition1, &c_partition2, &c_cut, (Rf_isNull(capacity) ? 0 : &c_capacity))); @@ -10865,13 +10865,13 @@ SEXP R_igraph_mincut(SEXP graph, SEXP capacity) { PROTECT(r_names=NEW_CHARACTER(4)); PROTECT(value=NEW_NUMERIC(1)); REAL(value)[0]=c_value; - PROTECT(partition1=R_igraph_vector_int_to_SEXPp1(&c_partition1)); + PROTECT(partition1=Ry_igraph_vector_int_to_SEXPp1(&c_partition1)); igraph_vector_int_destroy(&c_partition1); IGRAPH_FINALLY_CLEAN(1); - PROTECT(partition2=R_igraph_vector_int_to_SEXPp1(&c_partition2)); + PROTECT(partition2=Ry_igraph_vector_int_to_SEXPp1(&c_partition2)); igraph_vector_int_destroy(&c_partition2); IGRAPH_FINALLY_CLEAN(1); - PROTECT(cut=R_igraph_vector_int_to_SEXPp1(&c_cut)); + PROTECT(cut=Ry_igraph_vector_int_to_SEXPp1(&c_cut)); igraph_vector_int_destroy(&c_cut); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, value); @@ -10901,9 +10901,9 @@ SEXP R_igraph_mincut_value(SEXP graph, SEXP capacity) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(capacity)) { - R_SEXP_to_vector(capacity, &c_capacity); + Rz_SEXP_to_vector(capacity, &c_capacity); } /* Call igraph */ IGRAPH_R_CHECK(igraph_mincut_value(&c_graph, &c_res, (Rf_isNull(capacity) ? 0 : &c_capacity))); @@ -10932,12 +10932,12 @@ SEXP R_igraph_residual_graph(SEXP graph, SEXP capacity, SEXP flow) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - R_SEXP_to_vector(capacity, &c_capacity); + Rz_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_vector(capacity, &c_capacity); IGRAPH_R_CHECK(igraph_vector_init(&c_residual_capacity, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_residual_capacity); residual_capacity=R_GlobalEnv; /* hack to have a non-NULL value */ - R_SEXP_to_vector(flow, &c_flow); + Rz_SEXP_to_vector(flow, &c_flow); /* Call igraph */ IGRAPH_R_CHECK(igraph_residual_graph(&c_graph, &c_capacity, &c_residual, &c_residual_capacity, &c_flow)); @@ -10945,10 +10945,10 @@ SEXP R_igraph_residual_graph(SEXP graph, SEXP capacity, SEXP flow) { PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); IGRAPH_FINALLY(igraph_destroy, &c_residual); - PROTECT(residual=R_igraph_to_SEXP(&c_residual)); + PROTECT(residual=Ry_igraph_to_SEXP(&c_residual)); IGRAPH_I_DESTROY(&c_residual); IGRAPH_FINALLY_CLEAN(1); - PROTECT(residual_capacity=R_igraph_0orvector_to_SEXP(&c_residual_capacity)); + PROTECT(residual_capacity=Ry_igraph_0orvector_to_SEXP(&c_residual_capacity)); igraph_vector_destroy(&c_residual_capacity); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, residual); @@ -10975,15 +10975,15 @@ SEXP R_igraph_reverse_residual_graph(SEXP graph, SEXP capacity, SEXP flow) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - R_SEXP_to_vector(capacity, &c_capacity); - R_SEXP_to_vector(flow, &c_flow); + Rz_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_vector(capacity, &c_capacity); + Rz_SEXP_to_vector(flow, &c_flow); /* Call igraph */ IGRAPH_R_CHECK(igraph_reverse_residual_graph(&c_graph, &c_capacity, &c_residual, &c_flow)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_residual); - PROTECT(residual=R_igraph_to_SEXP(&c_residual)); + PROTECT(residual=Ry_igraph_to_SEXP(&c_residual)); IGRAPH_I_DESTROY(&c_residual); IGRAPH_FINALLY_CLEAN(1); r_result = residual; @@ -11012,7 +11012,7 @@ SEXP R_igraph_st_mincut(SEXP graph, SEXP source, SEXP target, SEXP capacity) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_cut, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_cut); IGRAPH_R_CHECK(igraph_vector_int_init(&c_partition1, 0)); @@ -11022,7 +11022,7 @@ SEXP R_igraph_st_mincut(SEXP graph, SEXP source, SEXP target, SEXP capacity) { c_source = (igraph_integer_t) REAL(source)[0]; c_target = (igraph_integer_t) REAL(target)[0]; if (!Rf_isNull(capacity)) { - R_SEXP_to_vector(capacity, &c_capacity); + Rz_SEXP_to_vector(capacity, &c_capacity); } /* Call igraph */ IGRAPH_R_CHECK(igraph_st_mincut(&c_graph, &c_value, &c_cut, &c_partition1, &c_partition2, c_source, c_target, (Rf_isNull(capacity) ? 0 : &c_capacity))); @@ -11032,13 +11032,13 @@ SEXP R_igraph_st_mincut(SEXP graph, SEXP source, SEXP target, SEXP capacity) { PROTECT(r_names=NEW_CHARACTER(4)); PROTECT(value=NEW_NUMERIC(1)); REAL(value)[0]=c_value; - PROTECT(cut=R_igraph_vector_int_to_SEXPp1(&c_cut)); + PROTECT(cut=Ry_igraph_vector_int_to_SEXPp1(&c_cut)); igraph_vector_int_destroy(&c_cut); IGRAPH_FINALLY_CLEAN(1); - PROTECT(partition1=R_igraph_vector_int_to_SEXPp1(&c_partition1)); + PROTECT(partition1=Ry_igraph_vector_int_to_SEXPp1(&c_partition1)); igraph_vector_int_destroy(&c_partition1); IGRAPH_FINALLY_CLEAN(1); - PROTECT(partition2=R_igraph_vector_int_to_SEXPp1(&c_partition2)); + PROTECT(partition2=Ry_igraph_vector_int_to_SEXPp1(&c_partition2)); igraph_vector_int_destroy(&c_partition2); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, value); @@ -11068,7 +11068,7 @@ SEXP R_igraph_vertex_connectivity(SEXP graph, SEXP checks) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_res=0; IGRAPH_R_CHECK_BOOL(checks); c_checks = LOGICAL(checks)[0]; @@ -11096,7 +11096,7 @@ SEXP R_igraph_edge_connectivity(SEXP graph, SEXP checks) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_res=0; IGRAPH_R_CHECK_BOOL(checks); c_checks = LOGICAL(checks)[0]; @@ -11124,7 +11124,7 @@ SEXP R_igraph_adhesion(SEXP graph, SEXP checks) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_res=0; IGRAPH_R_CHECK_BOOL(checks); c_checks = LOGICAL(checks)[0]; @@ -11152,7 +11152,7 @@ SEXP R_igraph_cohesion(SEXP graph, SEXP checks) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_res=0; IGRAPH_R_CHECK_BOOL(checks); c_checks = LOGICAL(checks)[0]; @@ -11185,7 +11185,7 @@ SEXP R_igraph_dominator_tree(SEXP graph, SEXP root, SEXP mode) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_root = (igraph_integer_t) REAL(root)[0]; IGRAPH_R_CHECK(igraph_vector_int_init(&c_dom, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_dom); @@ -11198,14 +11198,14 @@ SEXP R_igraph_dominator_tree(SEXP graph, SEXP root, SEXP mode) { /* Convert output */ PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); - PROTECT(dom=R_igraph_vector_int_to_SEXPp1(&c_dom)); + PROTECT(dom=Ry_igraph_vector_int_to_SEXPp1(&c_dom)); igraph_vector_int_destroy(&c_dom); IGRAPH_FINALLY_CLEAN(1); IGRAPH_FINALLY(igraph_destroy, &c_domtree); - PROTECT(domtree=R_igraph_to_SEXP(&c_domtree)); + PROTECT(domtree=Ry_igraph_to_SEXP(&c_domtree)); IGRAPH_I_DESTROY(&c_domtree); IGRAPH_FINALLY_CLEAN(1); - PROTECT(leftout=R_igraph_vector_int_to_SEXPp1(&c_leftout)); + PROTECT(leftout=Ry_igraph_vector_int_to_SEXPp1(&c_leftout)); igraph_vector_int_destroy(&c_leftout); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, dom); @@ -11236,7 +11236,7 @@ SEXP R_igraph_all_st_cuts(SEXP graph, SEXP source, SEXP target) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_cuts, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_cuts); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_partition1s, 0)); @@ -11249,10 +11249,10 @@ SEXP R_igraph_all_st_cuts(SEXP graph, SEXP source, SEXP target) { /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(cuts=R_igraph_vector_int_list_to_SEXPp1(&c_cuts)); + PROTECT(cuts=Ry_igraph_vector_int_list_to_SEXPp1(&c_cuts)); igraph_vector_int_list_destroy(&c_cuts); IGRAPH_FINALLY_CLEAN(1); - PROTECT(partition1s=R_igraph_vector_int_list_to_SEXPp1(&c_partition1s)); + PROTECT(partition1s=Ry_igraph_vector_int_list_to_SEXPp1(&c_partition1s)); igraph_vector_int_list_destroy(&c_partition1s); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, cuts); @@ -11284,7 +11284,7 @@ SEXP R_igraph_all_st_mincuts(SEXP graph, SEXP source, SEXP target, SEXP capacity SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_cuts, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_cuts); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_partition1s, 0)); @@ -11292,7 +11292,7 @@ SEXP R_igraph_all_st_mincuts(SEXP graph, SEXP source, SEXP target, SEXP capacity c_source = (igraph_integer_t) REAL(source)[0]; c_target = (igraph_integer_t) REAL(target)[0]; if (!Rf_isNull(capacity)) { - R_SEXP_to_vector(capacity, &c_capacity); + Rz_SEXP_to_vector(capacity, &c_capacity); } /* Call igraph */ IGRAPH_R_CHECK(igraph_all_st_mincuts(&c_graph, &c_value, &c_cuts, &c_partition1s, c_source, c_target, (Rf_isNull(capacity) ? 0 : &c_capacity))); @@ -11302,10 +11302,10 @@ SEXP R_igraph_all_st_mincuts(SEXP graph, SEXP source, SEXP target, SEXP capacity PROTECT(r_names=NEW_CHARACTER(3)); PROTECT(value=NEW_NUMERIC(1)); REAL(value)[0]=c_value; - PROTECT(cuts=R_igraph_vector_int_list_to_SEXPp1(&c_cuts)); + PROTECT(cuts=Ry_igraph_vector_int_list_to_SEXPp1(&c_cuts)); igraph_vector_int_list_destroy(&c_cuts); IGRAPH_FINALLY_CLEAN(1); - PROTECT(partition1s=R_igraph_vector_int_list_to_SEXPp1(&c_partition1s)); + PROTECT(partition1s=Ry_igraph_vector_int_list_to_SEXPp1(&c_partition1s)); igraph_vector_int_list_destroy(&c_partition1s); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, value); @@ -11334,7 +11334,7 @@ SEXP R_igraph_even_tarjan_reduction(SEXP graph) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_init(&c_capacity, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_capacity); capacity=R_GlobalEnv; /* hack to have a non-NULL value */ @@ -11345,10 +11345,10 @@ SEXP R_igraph_even_tarjan_reduction(SEXP graph) { PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); IGRAPH_FINALLY(igraph_destroy, &c_graphbar); - PROTECT(graphbar=R_igraph_to_SEXP(&c_graphbar)); + PROTECT(graphbar=Ry_igraph_to_SEXP(&c_graphbar)); IGRAPH_I_DESTROY(&c_graphbar); IGRAPH_FINALLY_CLEAN(1); - PROTECT(capacity=R_igraph_0orvector_to_SEXP(&c_capacity)); + PROTECT(capacity=Ry_igraph_0orvector_to_SEXP(&c_capacity)); igraph_vector_destroy(&c_capacity); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, graphbar); @@ -11374,9 +11374,9 @@ SEXP R_igraph_is_separator(SEXP graph, SEXP candidate) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); igraph_vector_int_t c_candidate_data; - R_SEXP_to_igraph_vs(candidate, &c_graph, &c_candidate, &c_candidate_data); + Rz_SEXP_to_igraph_vs(candidate, &c_graph, &c_candidate, &c_candidate_data); /* Call igraph */ IGRAPH_R_CHECK(igraph_is_separator(&c_graph, c_candidate, &c_res)); @@ -11403,9 +11403,9 @@ SEXP R_igraph_is_minimal_separator(SEXP graph, SEXP candidate) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); igraph_vector_int_t c_candidate_data; - R_SEXP_to_igraph_vs(candidate, &c_graph, &c_candidate, &c_candidate_data); + Rz_SEXP_to_igraph_vs(candidate, &c_graph, &c_candidate, &c_candidate_data); /* Call igraph */ IGRAPH_R_CHECK(igraph_is_minimal_separator(&c_graph, c_candidate, &c_res)); @@ -11431,14 +11431,14 @@ SEXP R_igraph_all_minimal_st_separators(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_separators, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_separators); /* Call igraph */ IGRAPH_R_CHECK(igraph_all_minimal_st_separators(&c_graph, &c_separators)); /* Convert output */ - PROTECT(separators=R_igraph_vector_int_list_to_SEXPp1(&c_separators)); + PROTECT(separators=Ry_igraph_vector_int_list_to_SEXPp1(&c_separators)); igraph_vector_int_list_destroy(&c_separators); IGRAPH_FINALLY_CLEAN(1); r_result = separators; @@ -11458,14 +11458,14 @@ SEXP R_igraph_minimum_size_separators(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_separators, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_separators); /* Call igraph */ IGRAPH_R_CHECK(igraph_minimum_size_separators(&c_graph, &c_separators)); /* Convert output */ - PROTECT(separators=R_igraph_vector_int_list_to_SEXPp1(&c_separators)); + PROTECT(separators=Ry_igraph_vector_int_list_to_SEXPp1(&c_separators)); igraph_vector_int_list_destroy(&c_separators); IGRAPH_FINALLY_CLEAN(1); r_result = separators; @@ -11491,7 +11491,7 @@ SEXP R_igraph_cohesive_blocks(SEXP graph) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_blocks, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_blocks); IGRAPH_R_CHECK(igraph_vector_int_init(&c_cohesion, 0)); @@ -11504,17 +11504,17 @@ SEXP R_igraph_cohesive_blocks(SEXP graph) { /* Convert output */ PROTECT(r_result=NEW_LIST(4)); PROTECT(r_names=NEW_CHARACTER(4)); - PROTECT(blocks=R_igraph_vector_int_list_to_SEXPp1(&c_blocks)); + PROTECT(blocks=Ry_igraph_vector_int_list_to_SEXPp1(&c_blocks)); igraph_vector_int_list_destroy(&c_blocks); IGRAPH_FINALLY_CLEAN(1); - PROTECT(cohesion=R_igraph_vector_int_to_SEXP(&c_cohesion)); + PROTECT(cohesion=Ry_igraph_vector_int_to_SEXP(&c_cohesion)); igraph_vector_int_destroy(&c_cohesion); IGRAPH_FINALLY_CLEAN(1); - PROTECT(parent=R_igraph_vector_int_to_SEXPp1(&c_parent)); + PROTECT(parent=Ry_igraph_vector_int_to_SEXPp1(&c_parent)); igraph_vector_int_destroy(&c_parent); IGRAPH_FINALLY_CLEAN(1); IGRAPH_FINALLY(igraph_destroy, &c_blockTree); - PROTECT(blockTree=R_igraph_to_SEXP(&c_blockTree)); + PROTECT(blockTree=Ry_igraph_to_SEXP(&c_blockTree)); IGRAPH_I_DESTROY(&c_blockTree); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, blocks); @@ -11544,7 +11544,7 @@ SEXP R_igraph_coreness(SEXP graph, SEXP mode) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_cores, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_cores); c_mode = (igraph_neimode_t) Rf_asInteger(mode); @@ -11552,7 +11552,7 @@ SEXP R_igraph_coreness(SEXP graph, SEXP mode) { IGRAPH_R_CHECK(igraph_coreness(&c_graph, &c_cores, c_mode)); /* Convert output */ - PROTECT(cores=R_igraph_vector_int_to_SEXP(&c_cores)); + PROTECT(cores=Ry_igraph_vector_int_to_SEXP(&c_cores)); igraph_vector_int_destroy(&c_cores); IGRAPH_FINALLY_CLEAN(1); r_result = cores; @@ -11572,7 +11572,7 @@ SEXP R_igraph_isoclass(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_isoclass=0; /* Call igraph */ IGRAPH_R_CHECK(igraph_isoclass(&c_graph, &c_isoclass)); @@ -11598,8 +11598,8 @@ SEXP R_igraph_isomorphic(SEXP graph1, SEXP graph2) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph1, &c_graph1); - R_SEXP_to_igraph(graph2, &c_graph2); + Rz_SEXP_to_igraph(graph1, &c_graph1); + Rz_SEXP_to_igraph(graph2, &c_graph2); /* Call igraph */ IGRAPH_R_CHECK(igraph_isomorphic(&c_graph1, &c_graph2, &c_iso)); @@ -11624,8 +11624,8 @@ SEXP R_igraph_isoclass_subgraph(SEXP graph, SEXP vids) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(vids, &c_vids)); + Rz_SEXP_to_igraph(graph, &c_graph); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(vids, &c_vids)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vids); c_isoclass=0; /* Call igraph */ @@ -11666,7 +11666,7 @@ SEXP R_igraph_isoclass_create(SEXP size, SEXP number, SEXP directed) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -11698,28 +11698,28 @@ SEXP R_igraph_isomorphic_vf2(SEXP graph1, SEXP graph2, SEXP vertex_color1, SEXP SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph1, &c_graph1); - R_SEXP_to_igraph(graph2, &c_graph2); + Rz_SEXP_to_igraph(graph1, &c_graph1); + Rz_SEXP_to_igraph(graph2, &c_graph2); if (!Rf_isNull(vertex_color1)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(vertex_color1, &c_vertex_color1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(vertex_color1, &c_vertex_color1)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_color1, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_color1); if (!Rf_isNull(vertex_color2)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(vertex_color2, &c_vertex_color2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(vertex_color2, &c_vertex_color2)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_color2, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_color2); if (!Rf_isNull(edge_color1)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(edge_color1, &c_edge_color1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(edge_color1, &c_edge_color1)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_color1, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_color1); if (!Rf_isNull(edge_color2)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(edge_color2, &c_edge_color2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(edge_color2, &c_edge_color2)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_color2, 0)); } @@ -11744,10 +11744,10 @@ SEXP R_igraph_isomorphic_vf2(SEXP graph1, SEXP graph2, SEXP vertex_color1, SEXP IGRAPH_FINALLY_CLEAN(1); PROTECT(iso=NEW_LOGICAL(1)); LOGICAL(iso)[0]=c_iso; - PROTECT(map12=R_igraph_vector_int_to_SEXPp1(&c_map12)); + PROTECT(map12=Ry_igraph_vector_int_to_SEXPp1(&c_map12)); igraph_vector_int_destroy(&c_map12); IGRAPH_FINALLY_CLEAN(1); - PROTECT(map21=R_igraph_vector_int_to_SEXPp1(&c_map21)); + PROTECT(map21=Ry_igraph_vector_int_to_SEXPp1(&c_map21)); igraph_vector_int_destroy(&c_map21); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, iso); @@ -11785,28 +11785,28 @@ SEXP R_igraph_get_isomorphisms_vf2_callback(SEXP graph1, SEXP graph2, SEXP verte SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph1, &c_graph1); - R_SEXP_to_igraph(graph2, &c_graph2); + Rz_SEXP_to_igraph(graph1, &c_graph1); + Rz_SEXP_to_igraph(graph2, &c_graph2); if (!Rf_isNull(vertex_color1)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(vertex_color1, &c_vertex_color1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(vertex_color1, &c_vertex_color1)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_color1, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_color1); if (!Rf_isNull(vertex_color2)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(vertex_color2, &c_vertex_color2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(vertex_color2, &c_vertex_color2)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_color2, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_color2); if (!Rf_isNull(edge_color1)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(edge_color1, &c_edge_color1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(edge_color1, &c_edge_color1)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_color1, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_color1); if (!Rf_isNull(edge_color2)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(edge_color2, &c_edge_color2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(edge_color2, &c_edge_color2)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_color2, 0)); } @@ -11829,10 +11829,10 @@ SEXP R_igraph_get_isomorphisms_vf2_callback(SEXP graph1, SEXP graph2, SEXP verte IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_edge_color2); IGRAPH_FINALLY_CLEAN(1); - PROTECT(map12=R_igraph_vector_int_to_SEXPp1(&c_map12)); + PROTECT(map12=Ry_igraph_vector_int_to_SEXPp1(&c_map12)); igraph_vector_int_destroy(&c_map12); IGRAPH_FINALLY_CLEAN(1); - PROTECT(map21=R_igraph_vector_int_to_SEXPp1(&c_map21)); + PROTECT(map21=Ry_igraph_vector_int_to_SEXPp1(&c_map21)); igraph_vector_int_destroy(&c_map21); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, map12); @@ -11865,28 +11865,28 @@ SEXP R_igraph_count_isomorphisms_vf2(SEXP graph1, SEXP graph2, SEXP vertex_color SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph1, &c_graph1); - R_SEXP_to_igraph(graph2, &c_graph2); + Rz_SEXP_to_igraph(graph1, &c_graph1); + Rz_SEXP_to_igraph(graph2, &c_graph2); if (!Rf_isNull(vertex_color1)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(vertex_color1, &c_vertex_color1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(vertex_color1, &c_vertex_color1)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_color1, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_color1); if (!Rf_isNull(vertex_color2)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(vertex_color2, &c_vertex_color2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(vertex_color2, &c_vertex_color2)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_color2, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_color2); if (!Rf_isNull(edge_color1)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(edge_color1, &c_edge_color1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(edge_color1, &c_edge_color1)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_color1, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_color1); if (!Rf_isNull(edge_color2)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(edge_color2, &c_edge_color2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(edge_color2, &c_edge_color2)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_color2, 0)); } @@ -11931,28 +11931,28 @@ SEXP R_igraph_get_isomorphisms_vf2(SEXP graph1, SEXP graph2, SEXP vertex_color1, SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph1, &c_graph1); - R_SEXP_to_igraph(graph2, &c_graph2); + Rz_SEXP_to_igraph(graph1, &c_graph1); + Rz_SEXP_to_igraph(graph2, &c_graph2); if (!Rf_isNull(vertex_color1)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(vertex_color1, &c_vertex_color1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(vertex_color1, &c_vertex_color1)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_color1, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_color1); if (!Rf_isNull(vertex_color2)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(vertex_color2, &c_vertex_color2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(vertex_color2, &c_vertex_color2)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_color2, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_color2); if (!Rf_isNull(edge_color1)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(edge_color1, &c_edge_color1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(edge_color1, &c_edge_color1)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_color1, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_color1); if (!Rf_isNull(edge_color2)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(edge_color2, &c_edge_color2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(edge_color2, &c_edge_color2)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_color2, 0)); } @@ -11971,7 +11971,7 @@ SEXP R_igraph_get_isomorphisms_vf2(SEXP graph1, SEXP graph2, SEXP vertex_color1, IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_edge_color2); IGRAPH_FINALLY_CLEAN(1); - PROTECT(maps=R_igraph_vector_int_list_to_SEXP(&c_maps)); + PROTECT(maps=Ry_igraph_vector_int_list_to_SEXP(&c_maps)); igraph_vector_int_list_destroy(&c_maps); IGRAPH_FINALLY_CLEAN(1); r_result = maps; @@ -11992,8 +11992,8 @@ SEXP R_igraph_subisomorphic(SEXP graph1, SEXP graph2) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph1, &c_graph1); - R_SEXP_to_igraph(graph2, &c_graph2); + Rz_SEXP_to_igraph(graph1, &c_graph1); + Rz_SEXP_to_igraph(graph2, &c_graph2); /* Call igraph */ IGRAPH_R_CHECK(igraph_subisomorphic(&c_graph1, &c_graph2, &c_iso)); @@ -12029,28 +12029,28 @@ SEXP R_igraph_subisomorphic_vf2(SEXP graph1, SEXP graph2, SEXP vertex_color1, SE SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph1, &c_graph1); - R_SEXP_to_igraph(graph2, &c_graph2); + Rz_SEXP_to_igraph(graph1, &c_graph1); + Rz_SEXP_to_igraph(graph2, &c_graph2); if (!Rf_isNull(vertex_color1)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(vertex_color1, &c_vertex_color1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(vertex_color1, &c_vertex_color1)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_color1, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_color1); if (!Rf_isNull(vertex_color2)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(vertex_color2, &c_vertex_color2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(vertex_color2, &c_vertex_color2)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_color2, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_color2); if (!Rf_isNull(edge_color1)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(edge_color1, &c_edge_color1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(edge_color1, &c_edge_color1)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_color1, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_color1); if (!Rf_isNull(edge_color2)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(edge_color2, &c_edge_color2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(edge_color2, &c_edge_color2)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_color2, 0)); } @@ -12075,10 +12075,10 @@ SEXP R_igraph_subisomorphic_vf2(SEXP graph1, SEXP graph2, SEXP vertex_color1, SE IGRAPH_FINALLY_CLEAN(1); PROTECT(iso=NEW_LOGICAL(1)); LOGICAL(iso)[0]=c_iso; - PROTECT(map12=R_igraph_vector_int_to_SEXPp1(&c_map12)); + PROTECT(map12=Ry_igraph_vector_int_to_SEXPp1(&c_map12)); igraph_vector_int_destroy(&c_map12); IGRAPH_FINALLY_CLEAN(1); - PROTECT(map21=R_igraph_vector_int_to_SEXPp1(&c_map21)); + PROTECT(map21=Ry_igraph_vector_int_to_SEXPp1(&c_map21)); igraph_vector_int_destroy(&c_map21); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, iso); @@ -12113,28 +12113,28 @@ SEXP R_igraph_count_subisomorphisms_vf2(SEXP graph1, SEXP graph2, SEXP vertex_co SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph1, &c_graph1); - R_SEXP_to_igraph(graph2, &c_graph2); + Rz_SEXP_to_igraph(graph1, &c_graph1); + Rz_SEXP_to_igraph(graph2, &c_graph2); if (!Rf_isNull(vertex_color1)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(vertex_color1, &c_vertex_color1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(vertex_color1, &c_vertex_color1)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_color1, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_color1); if (!Rf_isNull(vertex_color2)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(vertex_color2, &c_vertex_color2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(vertex_color2, &c_vertex_color2)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_color2, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_color2); if (!Rf_isNull(edge_color1)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(edge_color1, &c_edge_color1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(edge_color1, &c_edge_color1)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_color1, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_color1); if (!Rf_isNull(edge_color2)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(edge_color2, &c_edge_color2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(edge_color2, &c_edge_color2)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_color2, 0)); } @@ -12179,28 +12179,28 @@ SEXP R_igraph_get_subisomorphisms_vf2(SEXP graph1, SEXP graph2, SEXP vertex_colo SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph1, &c_graph1); - R_SEXP_to_igraph(graph2, &c_graph2); + Rz_SEXP_to_igraph(graph1, &c_graph1); + Rz_SEXP_to_igraph(graph2, &c_graph2); if (!Rf_isNull(vertex_color1)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(vertex_color1, &c_vertex_color1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(vertex_color1, &c_vertex_color1)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_color1, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_color1); if (!Rf_isNull(vertex_color2)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(vertex_color2, &c_vertex_color2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(vertex_color2, &c_vertex_color2)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_color2, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_color2); if (!Rf_isNull(edge_color1)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(edge_color1, &c_edge_color1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(edge_color1, &c_edge_color1)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_color1, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_color1); if (!Rf_isNull(edge_color2)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(edge_color2, &c_edge_color2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(edge_color2, &c_edge_color2)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_color2, 0)); } @@ -12219,7 +12219,7 @@ SEXP R_igraph_get_subisomorphisms_vf2(SEXP graph1, SEXP graph2, SEXP vertex_colo IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_edge_color2); IGRAPH_FINALLY_CLEAN(1); - PROTECT(maps=R_igraph_vector_int_list_to_SEXP(&c_maps)); + PROTECT(maps=Ry_igraph_vector_int_list_to_SEXP(&c_maps)); igraph_vector_int_list_destroy(&c_maps); IGRAPH_FINALLY_CLEAN(1); r_result = maps; @@ -12243,9 +12243,9 @@ SEXP R_igraph_canonical_permutation(SEXP graph, SEXP colors, SEXP sh) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(colors)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(colors, &c_colors)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(colors, &c_colors)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_colors, 0)); } @@ -12261,10 +12261,10 @@ SEXP R_igraph_canonical_permutation(SEXP graph, SEXP colors, SEXP sh) { PROTECT(r_names=NEW_CHARACTER(2)); igraph_vector_int_destroy(&c_colors); IGRAPH_FINALLY_CLEAN(1); - PROTECT(labeling=R_igraph_vector_int_to_SEXPp1(&c_labeling)); + PROTECT(labeling=Ry_igraph_vector_int_to_SEXPp1(&c_labeling)); igraph_vector_int_destroy(&c_labeling); IGRAPH_FINALLY_CLEAN(1); - PROTECT(info=R_igraph_bliss_info_to_SEXP(&c_info)); + PROTECT(info=Ry_igraph_bliss_info_to_SEXP(&c_info)); if (c_info.group_size) { free(c_info.group_size); } SET_VECTOR_ELT(r_result, 0, labeling); SET_VECTOR_ELT(r_result, 1, info); @@ -12289,15 +12289,15 @@ SEXP R_igraph_permute_vertices(SEXP graph, SEXP permutation) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - R_SEXP_to_vector_int_copy(permutation, &c_permutation); + Rz_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_vector_int_copy(permutation, &c_permutation); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_permutation); /* Call igraph */ IGRAPH_R_CHECK(igraph_permute_vertices(&c_graph, &c_res, &c_permutation)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_res); - PROTECT(res=R_igraph_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_to_SEXP(&c_res)); IGRAPH_I_DESTROY(&c_res); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_permutation); @@ -12331,16 +12331,16 @@ SEXP R_igraph_isomorphic_bliss(SEXP graph1, SEXP graph2, SEXP colors1, SEXP colo SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph1, &c_graph1); - R_SEXP_to_igraph(graph2, &c_graph2); + Rz_SEXP_to_igraph(graph1, &c_graph1); + Rz_SEXP_to_igraph(graph2, &c_graph2); if (!Rf_isNull(colors1)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(colors1, &c_colors1)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(colors1, &c_colors1)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_colors1, 0)); } IGRAPH_FINALLY(igraph_vector_int_destroy, &c_colors1); if (!Rf_isNull(colors2)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(colors2, &c_colors2)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(colors2, &c_colors2)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_colors2, 0)); } @@ -12362,15 +12362,15 @@ SEXP R_igraph_isomorphic_bliss(SEXP graph1, SEXP graph2, SEXP colors1, SEXP colo IGRAPH_FINALLY_CLEAN(1); PROTECT(iso=NEW_LOGICAL(1)); LOGICAL(iso)[0]=c_iso; - PROTECT(map12=R_igraph_vector_int_to_SEXPp1(&c_map12)); + PROTECT(map12=Ry_igraph_vector_int_to_SEXPp1(&c_map12)); igraph_vector_int_destroy(&c_map12); IGRAPH_FINALLY_CLEAN(1); - PROTECT(map21=R_igraph_vector_int_to_SEXPp1(&c_map21)); + PROTECT(map21=Ry_igraph_vector_int_to_SEXPp1(&c_map21)); igraph_vector_int_destroy(&c_map21); IGRAPH_FINALLY_CLEAN(1); - PROTECT(info1=R_igraph_bliss_info_to_SEXP(&c_info1)); + PROTECT(info1=Ry_igraph_bliss_info_to_SEXP(&c_info1)); if (c_info1.group_size) { free(c_info1.group_size); } - PROTECT(info2=R_igraph_bliss_info_to_SEXP(&c_info2)); + PROTECT(info2=Ry_igraph_bliss_info_to_SEXP(&c_info2)); if (c_info2.group_size) { free(c_info2.group_size); } SET_VECTOR_ELT(r_result, 0, iso); SET_VECTOR_ELT(r_result, 1, map12); @@ -12402,9 +12402,9 @@ SEXP R_igraph_count_automorphisms(SEXP graph, SEXP colors, SEXP sh) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(colors)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(colors, &c_colors)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(colors, &c_colors)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_colors, 0)); } @@ -12416,7 +12416,7 @@ SEXP R_igraph_count_automorphisms(SEXP graph, SEXP colors, SEXP sh) { /* Convert output */ igraph_vector_int_destroy(&c_colors); IGRAPH_FINALLY_CLEAN(1); - PROTECT(info=R_igraph_bliss_info_to_SEXP(&c_info)); + PROTECT(info=Ry_igraph_bliss_info_to_SEXP(&c_info)); if (c_info.group_size) { free(c_info.group_size); } r_result = info; @@ -12439,9 +12439,9 @@ SEXP R_igraph_automorphism_group(SEXP graph, SEXP colors, SEXP sh) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(colors)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(colors, &c_colors)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(colors, &c_colors)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_colors, 0)); } @@ -12457,10 +12457,10 @@ SEXP R_igraph_automorphism_group(SEXP graph, SEXP colors, SEXP sh) { PROTECT(r_names=NEW_CHARACTER(2)); igraph_vector_int_destroy(&c_colors); IGRAPH_FINALLY_CLEAN(1); - PROTECT(generators=R_igraph_vector_int_list_to_SEXPp1(&c_generators)); + PROTECT(generators=Ry_igraph_vector_int_list_to_SEXPp1(&c_generators)); igraph_vector_int_list_destroy(&c_generators); IGRAPH_FINALLY_CLEAN(1); - PROTECT(info=R_igraph_bliss_info_to_SEXP(&c_info)); + PROTECT(info=Ry_igraph_bliss_info_to_SEXP(&c_info)); if (c_info.group_size) { free(c_info.group_size); } SET_VECTOR_ELT(r_result, 0, generators); SET_VECTOR_ELT(r_result, 1, info); @@ -12488,7 +12488,7 @@ SEXP R_igraph_simplify_and_colorize(SEXP graph) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_color, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_color); IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_color, 0)); @@ -12500,13 +12500,13 @@ SEXP R_igraph_simplify_and_colorize(SEXP graph) { PROTECT(r_result=NEW_LIST(3)); PROTECT(r_names=NEW_CHARACTER(3)); IGRAPH_FINALLY(igraph_destroy, &c_res); - PROTECT(res=R_igraph_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_to_SEXP(&c_res)); IGRAPH_I_DESTROY(&c_res); IGRAPH_FINALLY_CLEAN(1); - PROTECT(vertex_color=R_igraph_vector_int_to_SEXP(&c_vertex_color)); + PROTECT(vertex_color=Ry_igraph_vector_int_to_SEXP(&c_vertex_color)); igraph_vector_int_destroy(&c_vertex_color); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edge_color=R_igraph_vector_int_to_SEXP(&c_edge_color)); + PROTECT(edge_color=Ry_igraph_vector_int_to_SEXP(&c_edge_color)); igraph_vector_int_destroy(&c_edge_color); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, res); @@ -12564,11 +12564,11 @@ SEXP R_igraph_is_matching(SEXP graph, SEXP types, SEXP matching) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(types)) { - R_SEXP_to_vector_bool(types, &c_types); + Rz_SEXP_to_vector_bool(types, &c_types); } - R_SEXP_to_vector_int_copy(matching, &c_matching); + Rz_SEXP_to_vector_int_copy(matching, &c_matching); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_matching); /* Call igraph */ IGRAPH_R_CHECK(igraph_is_matching(&c_graph, (Rf_isNull(types) ? 0 : &c_types), &c_matching, &c_res)); @@ -12597,11 +12597,11 @@ SEXP R_igraph_is_maximal_matching(SEXP graph, SEXP types, SEXP matching) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(types)) { - R_SEXP_to_vector_bool(types, &c_types); + Rz_SEXP_to_vector_bool(types, &c_types); } - R_SEXP_to_vector_int_copy(matching, &c_matching); + Rz_SEXP_to_vector_int_copy(matching, &c_matching); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_matching); /* Call igraph */ IGRAPH_R_CHECK(igraph_is_maximal_matching(&c_graph, (Rf_isNull(types) ? 0 : &c_types), &c_matching, &c_res)); @@ -12635,13 +12635,13 @@ SEXP R_igraph_maximum_bipartite_matching(SEXP graph, SEXP types, SEXP weights, S SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - R_SEXP_to_vector_bool(types, &c_types); + Rz_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_vector_bool(types, &c_types); c_matching_size=0; IGRAPH_R_CHECK(igraph_vector_int_init(&c_matching, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_matching); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } IGRAPH_R_CHECK_REAL(eps); c_eps = REAL(eps)[0]; @@ -12655,7 +12655,7 @@ SEXP R_igraph_maximum_bipartite_matching(SEXP graph, SEXP types, SEXP weights, S REAL(matching_size)[0]=(double) c_matching_size; PROTECT(matching_weight=NEW_NUMERIC(1)); REAL(matching_weight)[0]=c_matching_weight; - PROTECT(matching=R_igraph_vector_int_to_SEXPp1(&c_matching)); + PROTECT(matching=Ry_igraph_vector_int_to_SEXPp1(&c_matching)); igraph_vector_int_destroy(&c_matching); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, matching_size); @@ -12692,10 +12692,10 @@ SEXP R_igraph_eigen_adjacency(SEXP graph, SEXP algorithm, SEXP which, SEXP optio SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_algorithm = (igraph_eigen_algorithm_t) Rf_asInteger(algorithm); - R_SEXP_to_igraph_eigen_which(which, &c_which); - R_SEXP_to_igraph_arpack_options(options, &c_options); + Rz_SEXP_to_igraph_eigen_which(which, &c_which); + Rz_SEXP_to_igraph_arpack_options(options, &c_options); IGRAPH_R_CHECK(igraph_vector_init(&c_values, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_values); IGRAPH_R_CHECK(igraph_matrix_init(&c_vectors, 0, 0)); @@ -12712,17 +12712,17 @@ SEXP R_igraph_eigen_adjacency(SEXP graph, SEXP algorithm, SEXP which, SEXP optio /* Convert output */ PROTECT(r_result=NEW_LIST(5)); PROTECT(r_names=NEW_CHARACTER(5)); - PROTECT(options=Rx_igraph_arpack_options_to_SEXP(&c_options)); - PROTECT(values=R_igraph_vector_to_SEXP(&c_values)); + PROTECT(options=Ry_igraph_arpack_options_to_SEXP(&c_options)); + PROTECT(values=Ry_igraph_vector_to_SEXP(&c_values)); igraph_vector_destroy(&c_values); IGRAPH_FINALLY_CLEAN(1); - PROTECT(vectors=R_igraph_matrix_to_SEXP(&c_vectors)); + PROTECT(vectors=Ry_igraph_matrix_to_SEXP(&c_vectors)); igraph_matrix_destroy(&c_vectors); IGRAPH_FINALLY_CLEAN(1); - PROTECT(cmplxvalues=R_igraph_0orvector_complex_to_SEXP(&c_cmplxvalues)); + PROTECT(cmplxvalues=Ry_igraph_0orvector_complex_to_SEXP(&c_cmplxvalues)); igraph_vector_complex_destroy(&c_cmplxvalues); IGRAPH_FINALLY_CLEAN(1); - PROTECT(cmplxvectors=R_igraph_0ormatrix_complex_to_SEXP(&c_cmplxvectors)); + PROTECT(cmplxvectors=Ry_igraph_0ormatrix_complex_to_SEXP(&c_cmplxvectors)); igraph_matrix_complex_destroy(&c_cmplxvectors); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, options); @@ -12755,7 +12755,7 @@ SEXP R_igraph_power_law_fit(SEXP data, SEXP xmin, SEXP force_continuous) { SEXP r_result; /* Convert input */ - R_SEXP_to_vector(data, &c_data); + Rz_SEXP_to_vector(data, &c_data); IGRAPH_R_CHECK_REAL(xmin); c_xmin = REAL(xmin)[0]; IGRAPH_R_CHECK_BOOL(force_continuous); @@ -12764,7 +12764,7 @@ SEXP R_igraph_power_law_fit(SEXP data, SEXP xmin, SEXP force_continuous) { IGRAPH_R_CHECK(igraph_power_law_fit(&c_data, &c_res, c_xmin, c_force_continuous)); /* Convert output */ - PROTECT(res=R_igraph_plfit_result_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_plfit_result_to_SEXP(&c_res)); r_result = res; UNPROTECT(1); @@ -12785,7 +12785,7 @@ SEXP R_igraph_sir(SEXP graph, SEXP beta, SEXP gamma, SEXP no_sim) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK_REAL(beta); c_beta = REAL(beta)[0]; IGRAPH_R_CHECK_REAL(gamma); @@ -12793,13 +12793,13 @@ SEXP R_igraph_sir(SEXP graph, SEXP beta, SEXP gamma, SEXP no_sim) { IGRAPH_R_CHECK_INT(no_sim); c_no_sim = (igraph_integer_t) REAL(no_sim)[0]; IGRAPH_R_CHECK(igraph_vector_ptr_init(&c_res, 0)); - IGRAPH_FINALLY(R_igraph_sirlist_destroy, &c_res); + IGRAPH_FINALLY(Ry_igraph_sirlist_destroy, &c_res); /* Call igraph */ IGRAPH_R_CHECK(igraph_sir(&c_graph, c_beta, c_gamma, c_no_sim, &c_res)); /* Convert output */ - PROTECT(res=R_igraph_sirlist_to_SEXP(&c_res)); - R_igraph_sirlist_destroy(&c_res); + PROTECT(res=Ry_igraph_sirlist_to_SEXP(&c_res)); + Ry_igraph_sirlist_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -12819,7 +12819,7 @@ SEXP R_igraph_running_mean(SEXP data, SEXP binwidth) { SEXP r_result; /* Convert input */ - R_SEXP_to_vector(data, &c_data); + Rz_SEXP_to_vector(data, &c_data); IGRAPH_R_CHECK(igraph_vector_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &c_res); IGRAPH_R_CHECK_INT(binwidth); @@ -12828,7 +12828,7 @@ SEXP R_igraph_running_mean(SEXP data, SEXP binwidth) { IGRAPH_R_CHECK(igraph_running_mean(&c_data, &c_res, c_binwidth)); /* Convert output */ - PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + PROTECT(res=Ry_igraph_vector_to_SEXP(&c_res)); igraph_vector_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -12850,7 +12850,7 @@ SEXP R_igraph_convex_hull_2d(SEXP data) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_matrix(data, &c_data); + Rz_SEXP_to_matrix(data, &c_data); IGRAPH_R_CHECK(igraph_vector_int_init(&c_resverts, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_resverts); IGRAPH_R_CHECK(igraph_matrix_init(&c_rescoords, 0, 0)); @@ -12861,10 +12861,10 @@ SEXP R_igraph_convex_hull_2d(SEXP data) { /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(resverts=R_igraph_vector_int_to_SEXPp1(&c_resverts)); + PROTECT(resverts=Ry_igraph_vector_int_to_SEXPp1(&c_resverts)); igraph_vector_int_destroy(&c_resverts); IGRAPH_FINALLY_CLEAN(1); - PROTECT(rescoords=R_igraph_matrix_to_SEXP(&c_rescoords)); + PROTECT(rescoords=Ry_igraph_matrix_to_SEXP(&c_rescoords)); igraph_matrix_destroy(&c_rescoords); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, resverts); @@ -12889,7 +12889,7 @@ SEXP R_igraph_dim_select(SEXP sv) { SEXP r_result; /* Convert input */ - R_SEXP_to_vector(sv, &c_sv); + Rz_SEXP_to_vector(sv, &c_sv); c_dim=0; /* Call igraph */ IGRAPH_R_CHECK(igraph_dim_select(&c_sv, &c_dim)); @@ -12915,7 +12915,7 @@ SEXP R_igraph_solve_lsap(SEXP c, SEXP n) { SEXP r_result; /* Convert input */ - R_SEXP_to_matrix(c, &c_c); + Rz_SEXP_to_matrix(c, &c_c); IGRAPH_R_CHECK_INT(n); c_n = (igraph_integer_t) REAL(n)[0]; IGRAPH_R_CHECK(igraph_vector_int_init(&c_p, 0)); @@ -12924,7 +12924,7 @@ SEXP R_igraph_solve_lsap(SEXP c, SEXP n) { IGRAPH_R_CHECK(igraph_solve_lsap(&c_c, c_n, &c_p)); /* Convert output */ - PROTECT(p=R_igraph_vector_int_to_SEXP(&c_p)); + PROTECT(p=Ry_igraph_vector_int_to_SEXP(&c_p)); igraph_vector_int_destroy(&c_p); IGRAPH_FINALLY_CLEAN(1); r_result = p; @@ -12947,7 +12947,7 @@ SEXP R_igraph_find_cycle(SEXP graph, SEXP mode) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertices, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertices); IGRAPH_R_CHECK(igraph_vector_int_init(&c_edges, 0)); @@ -12959,10 +12959,10 @@ SEXP R_igraph_find_cycle(SEXP graph, SEXP mode) { /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(vertices=R_igraph_vector_int_to_SEXPp1(&c_vertices)); + PROTECT(vertices=Ry_igraph_vector_int_to_SEXPp1(&c_vertices)); igraph_vector_int_destroy(&c_vertices); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edges=R_igraph_vector_int_to_SEXPp1(&c_edges)); + PROTECT(edges=Ry_igraph_vector_int_to_SEXPp1(&c_edges)); igraph_vector_int_destroy(&c_edges); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, vertices); @@ -12992,7 +12992,7 @@ SEXP R_igraph_simple_cycles(SEXP graph, SEXP mode, SEXP min_cycle_length, SEXP m SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_vertices, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_vertices); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_edges, 0)); @@ -13008,10 +13008,10 @@ SEXP R_igraph_simple_cycles(SEXP graph, SEXP mode, SEXP min_cycle_length, SEXP m /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(vertices=R_igraph_vector_int_list_to_SEXPp1(&c_vertices)); + PROTECT(vertices=Ry_igraph_vector_int_list_to_SEXPp1(&c_vertices)); igraph_vector_int_list_destroy(&c_vertices); IGRAPH_FINALLY_CLEAN(1); - PROTECT(edges=R_igraph_vector_int_list_to_SEXPp1(&c_edges)); + PROTECT(edges=Ry_igraph_vector_int_list_to_SEXPp1(&c_edges)); igraph_vector_int_list_destroy(&c_edges); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, vertices); @@ -13038,7 +13038,7 @@ SEXP R_igraph_is_eulerian(SEXP graph) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ IGRAPH_R_CHECK(igraph_is_eulerian(&c_graph, &c_has_path, &c_has_cycle)); @@ -13073,7 +13073,7 @@ SEXP R_igraph_eulerian_path(SEXP graph) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_res, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_res); IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_res, 0)); @@ -13084,10 +13084,10 @@ SEXP R_igraph_eulerian_path(SEXP graph) { /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(edge_res=R_igraph_vector_int_to_SEXPp1(&c_edge_res)); + PROTECT(edge_res=Ry_igraph_vector_int_to_SEXPp1(&c_edge_res)); igraph_vector_int_destroy(&c_edge_res); IGRAPH_FINALLY_CLEAN(1); - PROTECT(vertex_res=R_igraph_vector_int_to_SEXPp1(&c_vertex_res)); + PROTECT(vertex_res=Ry_igraph_vector_int_to_SEXPp1(&c_vertex_res)); igraph_vector_int_destroy(&c_vertex_res); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, edge_res); @@ -13114,7 +13114,7 @@ SEXP R_igraph_eulerian_cycle(SEXP graph) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_edge_res, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_res); IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_res, 0)); @@ -13125,10 +13125,10 @@ SEXP R_igraph_eulerian_cycle(SEXP graph) { /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(edge_res=R_igraph_vector_int_to_SEXPp1(&c_edge_res)); + PROTECT(edge_res=Ry_igraph_vector_int_to_SEXPp1(&c_edge_res)); igraph_vector_int_destroy(&c_edge_res); IGRAPH_FINALLY_CLEAN(1); - PROTECT(vertex_res=R_igraph_vector_int_to_SEXPp1(&c_vertex_res)); + PROTECT(vertex_res=Ry_igraph_vector_int_to_SEXPp1(&c_vertex_res)); igraph_vector_int_destroy(&c_vertex_res); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, edge_res); @@ -13156,7 +13156,7 @@ SEXP R_igraph_fundamental_cycles(SEXP graph, SEXP start, SEXP bfs_cutoff, SEXP w SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_basis, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_basis); if (!Rf_isNull(start)) { @@ -13165,13 +13165,13 @@ SEXP R_igraph_fundamental_cycles(SEXP graph, SEXP start, SEXP bfs_cutoff, SEXP w IGRAPH_R_CHECK_INT(bfs_cutoff); c_bfs_cutoff = (igraph_integer_t) REAL(bfs_cutoff)[0]; if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_fundamental_cycles(&c_graph, &c_basis, (Rf_isNull(start) ? 0 : c_start), c_bfs_cutoff, (Rf_isNull(weights) ? 0 : &c_weights))); /* Convert output */ - PROTECT(basis=R_igraph_vector_int_list_to_SEXPp1(&c_basis)); + PROTECT(basis=Ry_igraph_vector_int_list_to_SEXPp1(&c_basis)); igraph_vector_int_list_destroy(&c_basis); IGRAPH_FINALLY_CLEAN(1); r_result = basis; @@ -13195,7 +13195,7 @@ SEXP R_igraph_minimum_cycle_basis(SEXP graph, SEXP bfs_cutoff, SEXP complete, SE SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_list_init(&c_basis, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &c_basis); IGRAPH_R_CHECK_INT(bfs_cutoff); @@ -13205,13 +13205,13 @@ SEXP R_igraph_minimum_cycle_basis(SEXP graph, SEXP bfs_cutoff, SEXP complete, SE IGRAPH_R_CHECK_BOOL(use_cycle_order); c_use_cycle_order = LOGICAL(use_cycle_order)[0]; if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } /* Call igraph */ IGRAPH_R_CHECK(igraph_minimum_cycle_basis(&c_graph, &c_basis, c_bfs_cutoff, c_complete, c_use_cycle_order, (Rf_isNull(weights) ? 0 : &c_weights))); /* Convert output */ - PROTECT(basis=R_igraph_vector_int_list_to_SEXPp1(&c_basis)); + PROTECT(basis=Ry_igraph_vector_int_list_to_SEXPp1(&c_basis)); igraph_vector_int_list_destroy(&c_basis); IGRAPH_FINALLY_CLEAN(1); r_result = basis; @@ -13234,7 +13234,7 @@ SEXP R_igraph_is_tree(SEXP graph, SEXP mode) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_root = -1; c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ @@ -13272,7 +13272,7 @@ SEXP R_igraph_is_forest(SEXP graph, SEXP mode) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_roots, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_roots); c_mode = (igraph_neimode_t) Rf_asInteger(mode); @@ -13284,7 +13284,7 @@ SEXP R_igraph_is_forest(SEXP graph, SEXP mode) { PROTECT(r_names=NEW_CHARACTER(2)); PROTECT(res=NEW_LOGICAL(1)); LOGICAL(res)[0]=c_res; - PROTECT(roots=R_igraph_vector_int_to_SEXPp1(&c_roots)); + PROTECT(roots=Ry_igraph_vector_int_to_SEXPp1(&c_roots)); igraph_vector_int_destroy(&c_roots); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, res); @@ -13309,14 +13309,14 @@ SEXP R_igraph_from_prufer(SEXP prufer) { SEXP r_result; /* Convert input */ - R_SEXP_to_vector_int_copy(prufer, &c_prufer); + Rz_SEXP_to_vector_int_copy(prufer, &c_prufer); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_prufer); /* Call igraph */ IGRAPH_R_CHECK(igraph_from_prufer(&c_graph, &c_prufer)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_prufer); @@ -13338,14 +13338,14 @@ SEXP R_igraph_to_prufer(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_prufer, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_prufer); /* Call igraph */ IGRAPH_R_CHECK(igraph_to_prufer(&c_graph, &c_prufer)); /* Convert output */ - PROTECT(prufer=R_igraph_vector_int_to_SEXPp1(&c_prufer)); + PROTECT(prufer=Ry_igraph_vector_int_to_SEXPp1(&c_prufer)); igraph_vector_int_destroy(&c_prufer); IGRAPH_FINALLY_CLEAN(1); r_result = prufer; @@ -13366,7 +13366,7 @@ SEXP R_igraph_tree_from_parent_vector(SEXP parents, SEXP type) { SEXP r_result; /* Convert input */ - R_SEXP_to_vector_int_copy(parents, &c_parents); + Rz_SEXP_to_vector_int_copy(parents, &c_parents); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_parents); c_type = (igraph_tree_mode_t) Rf_asInteger(type); /* Call igraph */ @@ -13374,7 +13374,7 @@ SEXP R_igraph_tree_from_parent_vector(SEXP parents, SEXP type) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); igraph_vector_int_destroy(&c_parents); @@ -13396,7 +13396,7 @@ SEXP R_igraph_is_complete(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ IGRAPH_R_CHECK(igraph_is_complete(&c_graph, &c_res)); @@ -13420,13 +13420,13 @@ SEXP R_igraph_minimum_spanning_tree_unweighted(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); /* Call igraph */ IGRAPH_R_CHECK(igraph_minimum_spanning_tree_unweighted(&c_graph, &c_mst)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_mst); - PROTECT(mst=R_igraph_to_SEXP(&c_mst)); + PROTECT(mst=Ry_igraph_to_SEXP(&c_mst)); IGRAPH_I_DESTROY(&c_mst); IGRAPH_FINALLY_CLEAN(1); r_result = mst; @@ -13447,14 +13447,14 @@ SEXP R_igraph_minimum_spanning_tree_prim(SEXP graph, SEXP weights) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_vector(weights, &c_weights); /* Call igraph */ IGRAPH_R_CHECK(igraph_minimum_spanning_tree_prim(&c_graph, &c_mst, &c_weights)); /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_mst); - PROTECT(mst=R_igraph_to_SEXP(&c_mst)); + PROTECT(mst=Ry_igraph_to_SEXP(&c_mst)); IGRAPH_I_DESTROY(&c_mst); IGRAPH_FINALLY_CLEAN(1); r_result = mst; @@ -13475,7 +13475,7 @@ SEXP R_igraph_random_spanning_tree(SEXP graph, SEXP vid) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_res, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_res); if (!Rf_isNull(vid)) { @@ -13485,7 +13485,7 @@ SEXP R_igraph_random_spanning_tree(SEXP graph, SEXP vid) { IGRAPH_R_CHECK(igraph_random_spanning_tree(&c_graph, &c_res, (Rf_isNull(vid) ? 0 : c_vid))); /* Convert output */ - PROTECT(res=R_igraph_vector_int_to_SEXPp1(&c_res)); + PROTECT(res=Ry_igraph_vector_int_to_SEXPp1(&c_res)); igraph_vector_int_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); r_result = res; @@ -13517,7 +13517,7 @@ SEXP R_igraph_tree_game(SEXP n, SEXP directed, SEXP method) { /* Convert output */ IGRAPH_FINALLY(igraph_destroy, &c_graph); - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -13538,7 +13538,7 @@ SEXP R_igraph_vertex_coloring_greedy(SEXP graph, SEXP heuristic) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); IGRAPH_R_CHECK(igraph_vector_int_init(&c_colors, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_colors); c_heuristic = (igraph_coloring_greedy_t) Rf_asInteger(heuristic); @@ -13546,7 +13546,7 @@ SEXP R_igraph_vertex_coloring_greedy(SEXP graph, SEXP heuristic) { IGRAPH_R_CHECK(igraph_vertex_coloring_greedy(&c_graph, &c_colors, c_heuristic)); /* Convert output */ - PROTECT(colors=R_igraph_vector_int_to_SEXP(&c_colors)); + PROTECT(colors=Ry_igraph_vector_int_to_SEXP(&c_colors)); igraph_vector_int_destroy(&c_colors); IGRAPH_FINALLY_CLEAN(1); r_result = colors; @@ -13567,9 +13567,9 @@ SEXP R_igraph_is_vertex_coloring(SEXP graph, SEXP types) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(types)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(types, &c_types)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(types, &c_types)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_types, 0)); } @@ -13602,8 +13602,8 @@ SEXP R_igraph_is_bipartite_coloring(SEXP graph, SEXP types) { SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - R_SEXP_to_vector_bool(types, &c_types); + Rz_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_vector_bool(types, &c_types); /* Call igraph */ IGRAPH_R_CHECK(igraph_is_bipartite_coloring(&c_graph, &c_types, &c_res, 0)); @@ -13628,9 +13628,9 @@ SEXP R_igraph_is_edge_coloring(SEXP graph, SEXP types) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(types)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(types, &c_types)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(types, &c_types)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&c_types, 0)); } @@ -13663,18 +13663,18 @@ SEXP R_igraph_deterministic_optimal_imitation(SEXP graph, SEXP vid, SEXP optimal SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_vid = (igraph_integer_t) REAL(vid)[0]; c_optimality = (igraph_optimal_t) Rf_asInteger(optimality); - R_SEXP_to_vector(quantities, &c_quantities); - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(strategies, &c_strategies)); + Rz_SEXP_to_vector(quantities, &c_quantities); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(strategies, &c_strategies)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_strategies); c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_deterministic_optimal_imitation(&c_graph, c_vid, c_optimality, &c_quantities, &c_strategies, c_mode)); /* Convert output */ - PROTECT(strategies=R_igraph_vector_int_to_SEXP(&c_strategies)); + PROTECT(strategies=Ry_igraph_vector_int_to_SEXP(&c_strategies)); igraph_vector_int_destroy(&c_strategies); IGRAPH_FINALLY_CLEAN(1); r_result = strategies; @@ -13696,13 +13696,13 @@ SEXP R_igraph_moran_process(SEXP graph, SEXP weights, SEXP quantities, SEXP stra SEXP r_result, r_names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - R_SEXP_to_vector(weights, &c_weights); + Rz_SEXP_to_vector(weights, &c_weights); } - IGRAPH_R_CHECK(R_SEXP_to_vector_copy(quantities, &c_quantities)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_copy(quantities, &c_quantities)); IGRAPH_FINALLY(igraph_vector_destroy, &c_quantities); - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(strategies, &c_strategies)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(strategies, &c_strategies)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_strategies); c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ @@ -13711,10 +13711,10 @@ SEXP R_igraph_moran_process(SEXP graph, SEXP weights, SEXP quantities, SEXP stra /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(quantities=R_igraph_vector_to_SEXP(&c_quantities)); + PROTECT(quantities=Ry_igraph_vector_to_SEXP(&c_quantities)); igraph_vector_destroy(&c_quantities); IGRAPH_FINALLY_CLEAN(1); - PROTECT(strategies=R_igraph_vector_int_to_SEXP(&c_strategies)); + PROTECT(strategies=Ry_igraph_vector_int_to_SEXP(&c_strategies)); igraph_vector_int_destroy(&c_strategies); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, quantities); @@ -13742,19 +13742,19 @@ SEXP R_igraph_roulette_wheel_imitation(SEXP graph, SEXP vid, SEXP is_local, SEXP SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_vid = (igraph_integer_t) REAL(vid)[0]; IGRAPH_R_CHECK_BOOL(is_local); c_is_local = LOGICAL(is_local)[0]; - R_SEXP_to_vector(quantities, &c_quantities); - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(strategies, &c_strategies)); + Rz_SEXP_to_vector(quantities, &c_quantities); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(strategies, &c_strategies)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_strategies); c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_roulette_wheel_imitation(&c_graph, c_vid, c_is_local, &c_quantities, &c_strategies, c_mode)); /* Convert output */ - PROTECT(strategies=R_igraph_vector_int_to_SEXP(&c_strategies)); + PROTECT(strategies=Ry_igraph_vector_int_to_SEXP(&c_strategies)); igraph_vector_int_destroy(&c_strategies); IGRAPH_FINALLY_CLEAN(1); r_result = strategies; @@ -13777,18 +13777,18 @@ SEXP R_igraph_stochastic_imitation(SEXP graph, SEXP vid, SEXP algo, SEXP quantit SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); c_vid = (igraph_integer_t) REAL(vid)[0]; c_algo = (igraph_imitate_algorithm_t) Rf_asInteger(algo); - R_SEXP_to_vector(quantities, &c_quantities); - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(strategies, &c_strategies)); + Rz_SEXP_to_vector(quantities, &c_quantities); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(strategies, &c_strategies)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_strategies); c_mode = (igraph_neimode_t) Rf_asInteger(mode); /* Call igraph */ IGRAPH_R_CHECK(igraph_stochastic_imitation(&c_graph, c_vid, c_algo, &c_quantities, &c_strategies, c_mode)); /* Convert output */ - PROTECT(strategies=R_igraph_vector_int_to_SEXP(&c_strategies)); + PROTECT(strategies=Ry_igraph_vector_int_to_SEXP(&c_strategies)); igraph_vector_int_destroy(&c_strategies); IGRAPH_FINALLY_CLEAN(1); r_result = strategies; @@ -13806,13 +13806,13 @@ SEXP R_igraph_expand_path_to_pairs(SEXP path) { SEXP r_result; /* Convert input */ - R_SEXP_to_vector_int_copy(path, &c_path); + Rz_SEXP_to_vector_int_copy(path, &c_path); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_path); /* Call igraph */ IGRAPH_R_CHECK(igraph_expand_path_to_pairs(&c_path)); /* Convert output */ - PROTECT(path=R_igraph_vector_int_to_SEXPp1(&c_path)); + PROTECT(path=Ry_igraph_vector_int_to_SEXPp1(&c_path)); igraph_vector_int_destroy(&c_path); IGRAPH_FINALLY_CLEAN(1); r_result = path; @@ -13830,13 +13830,13 @@ SEXP R_igraph_invalidate_cache(SEXP graph) { SEXP r_result; /* Convert input */ - R_SEXP_to_igraph_copy(graph, &c_graph); + Rz_SEXP_to_igraph_copy(graph, &c_graph); IGRAPH_FINALLY(igraph_destroy, &c_graph); /* Call igraph */ igraph_invalidate_cache(&c_graph); /* Convert output */ - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + PROTECT(graph=Ry_igraph_to_SEXP(&c_graph)); IGRAPH_I_DESTROY(&c_graph); IGRAPH_FINALLY_CLEAN(1); r_result = graph; @@ -13859,11 +13859,11 @@ SEXP R_igraph_vertex_path_from_edge_path(SEXP graph, SEXP start, SEXP edge_path, SEXP r_result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(start)) { c_start = (igraph_integer_t) REAL(start)[0]; } - R_SEXP_to_vector_int_copy(edge_path, &c_edge_path); + Rz_SEXP_to_vector_int_copy(edge_path, &c_edge_path); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_path); IGRAPH_R_CHECK(igraph_vector_int_init(&c_vertex_path, 0)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_vertex_path); @@ -13874,7 +13874,7 @@ SEXP R_igraph_vertex_path_from_edge_path(SEXP graph, SEXP start, SEXP edge_path, /* Convert output */ igraph_vector_int_destroy(&c_edge_path); IGRAPH_FINALLY_CLEAN(1); - PROTECT(vertex_path=R_igraph_vector_int_to_SEXPp1(&c_vertex_path)); + PROTECT(vertex_path=Ry_igraph_vector_int_to_SEXPp1(&c_vertex_path)); igraph_vector_int_destroy(&c_vertex_path); IGRAPH_FINALLY_CLEAN(1); r_result = vertex_path; diff --git a/src/rinterface.h b/src/rinterface.h index 580e0d5ae5b..e3b2bb5078a 100644 --- a/src/rinterface.h +++ b/src/rinterface.h @@ -41,83 +41,83 @@ SEXP Rx_igraph_add_env(SEXP graph); -void R_igraph_attribute_clean_preserve_list(void); -void R_igraph_set_in_r_check(bool set); -void R_igraph_error(void); -void R_igraph_warning(void); -void R_igraph_interrupt(void); - -SEXP R_igraph_vector_to_SEXP(const igraph_vector_t *v); -SEXP R_igraph_vector_to_SEXPp1(const igraph_vector_t *v); -SEXP R_igraph_vector_int_to_SEXP(const igraph_vector_int_t *v); -SEXP R_igraph_vector_int_to_SEXPp1(const igraph_vector_int_t *v); -SEXP R_igraph_vector_bool_to_SEXP(const igraph_vector_bool_t *v); -SEXP R_igraph_vector_complex_to_SEXP(const igraph_vector_complex_t* v); -SEXP R_igraph_0orvector_to_SEXP(const igraph_vector_t *v); -SEXP R_igraph_0orvector_to_SEXPp1(const igraph_vector_t *v); -SEXP R_igraph_0orvector_bool_to_SEXP(const igraph_vector_bool_t *v); -SEXP R_igraph_0orvector_complex_to_SEXP(const igraph_vector_complex_t *v); -SEXP R_igraph_matrix_to_SEXP(const igraph_matrix_t *m); -SEXP R_igraph_matrix_int_to_SEXP(const igraph_matrix_int_t *m); -SEXP R_igraph_matrix_complex_to_SEXP(const igraph_matrix_complex_t *m); -SEXP R_igraph_0ormatrix_to_SEXP(const igraph_matrix_t *m); -SEXP R_igraph_0ormatrix_int_to_SEXP(const igraph_matrix_int_t *m); -SEXP R_igraph_0ormatrix_complex_to_SEXP(const igraph_matrix_complex_t *m); -SEXP R_igraph_strvector_to_SEXP(const igraph_strvector_t *m); -SEXP R_igraph_to_SEXP(const igraph_t *graph); -SEXP R_igraph_vector_int_list_to_SEXP(const igraph_vector_int_list_t *list); -SEXP R_igraph_vector_int_list_to_SEXPp1(const igraph_vector_int_list_t *list); -SEXP R_igraph_0orvector_int_list_to_SEXP(const igraph_vector_int_list_t *list); -SEXP R_igraph_matrixlist_to_SEXP(const igraph_matrix_list_t *ptr); -SEXP R_igraph_graphlist_to_SEXP(const igraph_graph_list_t *list); -SEXP R_igraph_hrg_to_SEXP(const igraph_hrg_t *hrg); -SEXP R_igraph_plfit_result_to_SEXP(const igraph_plfit_result_t *plfit); -SEXP R_igraph_sparsemat_to_SEXP(const igraph_sparsemat_t *sp); -SEXP R_igraph_0orsparsemat_to_SEXP(const igraph_sparsemat_t *sp); -SEXP R_igraph_maxflow_stats_to_SEXP(const igraph_maxflow_stats_t *st); -SEXP R_igraph_sirlist_to_SEXP(const igraph_vector_ptr_t *sl); -void R_igraph_sirlist_destroy(igraph_vector_ptr_t *sl); -SEXP Rx_igraph_arpack_options_to_SEXP(const igraph_arpack_options_t *opt); -SEXP R_igraph_bliss_info_to_SEXP(const igraph_bliss_info_t *info); - -igraph_error_t R_igraph_SEXP_to_strvector(SEXP rval, igraph_strvector_t *sv); -igraph_error_t R_igraph_SEXP_to_strvector_copy(SEXP rval, igraph_strvector_t *sv); -void R_SEXP_to_vector(SEXP sv, igraph_vector_t *v); -igraph_error_t R_SEXP_to_vector_copy(SEXP sv, igraph_vector_t *v); -void R_SEXP_to_matrix(SEXP pakl, igraph_matrix_t *akl); -igraph_error_t R_SEXP_to_matrix_int(SEXP pakl, igraph_matrix_int_t *akl); -void R_SEXP_to_matrix_complex(SEXP pakl, igraph_matrix_complex_t *akl); -igraph_error_t R_SEXP_to_igraph_matrix_copy(SEXP pakl, igraph_matrix_t *akl); -igraph_error_t R_SEXP_to_igraph(SEXP graph, igraph_t *res); -igraph_error_t R_SEXP_to_igraph_copy(SEXP graph, igraph_t *res); -igraph_error_t R_SEXP_to_igraph_vs(SEXP rit, igraph_t *graph, igraph_vs_t *it, igraph_vector_int_t *data); -igraph_error_t R_SEXP_to_igraph_es(SEXP rit, igraph_t *graph, igraph_es_t *it, igraph_vector_int_t *data); -igraph_error_t R_SEXP_to_igraph_adjlist(SEXP vectorlist, igraph_adjlist_t *ptr); -void R_igraph_SEXP_to_vector_list(SEXP vectorlist, igraph_vector_list_t *list); -igraph_error_t R_igraph_SEXP_to_vector_int_list(SEXP vectorlist, igraph_vector_int_list_t *list); -void R_igraph_SEXP_to_matrixlist(SEXP matrixlist, igraph_matrix_list_t *list); -void R_SEXP_to_vector_bool(SEXP sv, igraph_vector_bool_t *v); -igraph_error_t R_SEXP_to_vector_bool_copy(SEXP sv, igraph_vector_bool_t *v); -igraph_error_t R_SEXP_to_vector_int_copy(SEXP sv, igraph_vector_int_t *v); -igraph_error_t R_SEXP_to_hrg(SEXP shrg, igraph_hrg_t *hrg); -igraph_error_t R_SEXP_to_hrg_copy(SEXP shrg, igraph_hrg_t *hrg); -void R_SEXP_to_igraph_layout_drl_options(SEXP in, igraph_layout_drl_options_t *opt); -igraph_error_t R_SEXP_to_igraph_eigen_which(SEXP in, igraph_eigen_which_t *out); -void R_SEXP_to_igraph_arpack_options(SEXP in, igraph_arpack_options_t *opt); -igraph_error_t R_SEXP_to_attr_comb(SEXP input, igraph_attribute_combination_t *comb); +void Rx_igraph_attribute_clean_preserve_list(void); +void Rx_igraph_set_in_r_check(bool set); +void Rx_igraph_error(void); +void Rx_igraph_warning(void); +void Rx_igraph_interrupt(void); + +SEXP Ry_igraph_vector_to_SEXP(const igraph_vector_t *v); +SEXP Ry_igraph_vector_to_SEXPp1(const igraph_vector_t *v); +SEXP Ry_igraph_vector_int_to_SEXP(const igraph_vector_int_t *v); +SEXP Ry_igraph_vector_int_to_SEXPp1(const igraph_vector_int_t *v); +SEXP Ry_igraph_vector_bool_to_SEXP(const igraph_vector_bool_t *v); +SEXP Rx_igraph_vector_complex_to_SEXP(const igraph_vector_complex_t* v); +SEXP Ry_igraph_0orvector_to_SEXP(const igraph_vector_t *v); +SEXP Ry_igraph_0orvector_to_SEXPp1(const igraph_vector_t *v); +SEXP Rx_igraph_0orvector_bool_to_SEXP(const igraph_vector_bool_t *v); +SEXP Ry_igraph_0orvector_complex_to_SEXP(const igraph_vector_complex_t *v); +SEXP Ry_igraph_matrix_to_SEXP(const igraph_matrix_t *m); +SEXP Ry_igraph_matrix_int_to_SEXP(const igraph_matrix_int_t *m); +SEXP Rx_igraph_matrix_complex_to_SEXP(const igraph_matrix_complex_t *m); +SEXP Rx_igraph_0ormatrix_to_SEXP(const igraph_matrix_t *m); +SEXP Rx_igraph_0ormatrix_int_to_SEXP(const igraph_matrix_int_t *m); +SEXP Ry_igraph_0ormatrix_complex_to_SEXP(const igraph_matrix_complex_t *m); +SEXP Rx_igraph_strvector_to_SEXP(const igraph_strvector_t *m); +SEXP Ry_igraph_to_SEXP(const igraph_t *graph); +SEXP Ry_igraph_vector_int_list_to_SEXP(const igraph_vector_int_list_t *list); +SEXP Ry_igraph_vector_int_list_to_SEXPp1(const igraph_vector_int_list_t *list); +SEXP Rx_igraph_0orvector_int_list_to_SEXP(const igraph_vector_int_list_t *list); +SEXP Rx_igraph_matrixlist_to_SEXP(const igraph_matrix_list_t *ptr); +SEXP Ry_igraph_graphlist_to_SEXP(const igraph_graph_list_t *list); +SEXP Ry_igraph_hrg_to_SEXP(const igraph_hrg_t *hrg); +SEXP Ry_igraph_plfit_result_to_SEXP(const igraph_plfit_result_t *plfit); +SEXP Ry_igraph_sparsemat_to_SEXP(const igraph_sparsemat_t *sp); +SEXP Rx_igraph_0orsparsemat_to_SEXP(const igraph_sparsemat_t *sp); +SEXP Ry_igraph_maxflow_stats_to_SEXP(const igraph_maxflow_stats_t *st); +SEXP Ry_igraph_sirlist_to_SEXP(const igraph_vector_ptr_t *sl); +void Ry_igraph_sirlist_destroy(igraph_vector_ptr_t *sl); +SEXP Ry_igraph_arpack_options_to_SEXP(const igraph_arpack_options_t *opt); +SEXP Ry_igraph_bliss_info_to_SEXP(const igraph_bliss_info_t *info); + +igraph_error_t Rx_igraph_SEXP_to_strvector(SEXP rval, igraph_strvector_t *sv); +igraph_error_t Rx_igraph_SEXP_to_strvector_copy(SEXP rval, igraph_strvector_t *sv); +void Rz_SEXP_to_vector(SEXP sv, igraph_vector_t *v); +igraph_error_t Rz_SEXP_to_vector_copy(SEXP sv, igraph_vector_t *v); +void Rz_SEXP_to_matrix(SEXP pakl, igraph_matrix_t *akl); +igraph_error_t Rz_SEXP_to_matrix_int(SEXP pakl, igraph_matrix_int_t *akl); +void Rz_SEXP_to_matrix_complex(SEXP pakl, igraph_matrix_complex_t *akl); +igraph_error_t Rz_SEXP_to_igraph_matrix_copy(SEXP pakl, igraph_matrix_t *akl); +igraph_error_t Rz_SEXP_to_igraph(SEXP graph, igraph_t *res); +igraph_error_t Rz_SEXP_to_igraph_copy(SEXP graph, igraph_t *res); +igraph_error_t Rz_SEXP_to_igraph_vs(SEXP rit, igraph_t *graph, igraph_vs_t *it, igraph_vector_int_t *data); +igraph_error_t Rz_SEXP_to_igraph_es(SEXP rit, igraph_t *graph, igraph_es_t *it, igraph_vector_int_t *data); +igraph_error_t Rz_SEXP_to_igraph_adjlist(SEXP vectorlist, igraph_adjlist_t *ptr); +void Ry_igraph_SEXP_to_vector_list(SEXP vectorlist, igraph_vector_list_t *list); +igraph_error_t Ry_igraph_SEXP_to_vector_int_list(SEXP vectorlist, igraph_vector_int_list_t *list); +void Ry_igraph_SEXP_to_matrixlist(SEXP matrixlist, igraph_matrix_list_t *list); +void Rz_SEXP_to_vector_bool(SEXP sv, igraph_vector_bool_t *v); +igraph_error_t Rz_SEXP_to_vector_bool_copy(SEXP sv, igraph_vector_bool_t *v); +igraph_error_t Rz_SEXP_to_vector_int_copy(SEXP sv, igraph_vector_int_t *v); +igraph_error_t Rz_SEXP_to_hrg(SEXP shrg, igraph_hrg_t *hrg); +igraph_error_t Rz_SEXP_to_hrg_copy(SEXP shrg, igraph_hrg_t *hrg); +void Rz_SEXP_to_igraph_layout_drl_options(SEXP in, igraph_layout_drl_options_t *opt); +igraph_error_t Rz_SEXP_to_igraph_eigen_which(SEXP in, igraph_eigen_which_t *out); +void Rz_SEXP_to_igraph_arpack_options(SEXP in, igraph_arpack_options_t *opt); +igraph_error_t Rz_SEXP_to_attr_comb(SEXP input, igraph_attribute_combination_t *comb); /* The following IGRAPH_R_... macros must only be called from top-level C code, * i.e. in C functions which are called from R directly. */ #define IGRAPH_R_CHECK(func) \ do { \ - R_igraph_attribute_clean_preserve_list(); \ - R_igraph_set_in_r_check(true); \ + Rx_igraph_attribute_clean_preserve_list(); \ + Rx_igraph_set_in_r_check(true); \ igraph_error_type_t __c = func; \ - R_igraph_set_in_r_check(false); \ - R_igraph_warning(); \ - if (__c == IGRAPH_INTERRUPTED) { R_igraph_interrupt(); } \ - else if (__c != IGRAPH_SUCCESS) { R_igraph_error(); } \ + Rx_igraph_set_in_r_check(false); \ + Rx_igraph_warning(); \ + if (__c == IGRAPH_INTERRUPTED) { Rx_igraph_interrupt(); } \ + else if (__c != IGRAPH_SUCCESS) { Rx_igraph_error(); } \ } while (0) // This is a variant of IGRAPH_FINALLY that satisfies UBSAN checks. @@ -145,12 +145,12 @@ void igraph_vector_int_list_destroy_pv(void *pv_ptr); void R_check_int_scalar(SEXP value); void R_check_real_scalar(SEXP value); void R_check_bool_scalar(SEXP value); -FILE* R_igraph_fopen_read(SEXP instream); -FILE* R_igraph_fopen_write(SEXP outstream); +FILE* Ry_igraph_fopen_read(SEXP instream); +FILE* Ry_igraph_fopen_write(SEXP outstream); -igraph_error_t R_get_int_scalar(SEXP sexp, R_xlen_t index, igraph_integer_t *res); -igraph_error_t R_get_real_scalar(SEXP sexp, R_xlen_t index, igraph_real_t *res); -igraph_error_t R_get_bool_scalar(SEXP sexp, R_xlen_t index, igraph_bool_t *res); +igraph_error_t Rw_get_int_scalar(SEXP sexp, R_xlen_t index, igraph_integer_t *res); +igraph_error_t Rw_get_real_scalar(SEXP sexp, R_xlen_t index, igraph_real_t *res); +igraph_error_t Rw_get_bool_scalar(SEXP sexp, R_xlen_t index, igraph_bool_t *res); /* Declarations for functions from rinterface.c needed by wrappers in rinterface_extra.c */ SEXP R_igraph_adjacency(SEXP adjmatrix, SEXP mode, SEXP loops); diff --git a/src/rinterface_extra.c b/src/rinterface_extra.c index d0e8d3a3799..20da168786a 100644 --- a/src/rinterface_extra.c +++ b/src/rinterface_extra.c @@ -132,7 +132,7 @@ void igraph_vector_int_list_destroy_pv(void *pv_ptr) igraph_vector_int_list_destroy((igraph_vector_int_list_t*) pv_ptr); } -igraph_error_t R_get_int_scalar(SEXP sexp, R_xlen_t index, igraph_integer_t *res) +igraph_error_t Rw_get_int_scalar(SEXP sexp, R_xlen_t index, igraph_integer_t *res) { if (Rf_xlength(sexp) <= index) { @@ -142,7 +142,7 @@ igraph_error_t R_get_int_scalar(SEXP sexp, R_xlen_t index, igraph_integer_t *res return IGRAPH_SUCCESS; } -igraph_error_t R_get_real_scalar(SEXP sexp, R_xlen_t index, igraph_real_t *res) +igraph_error_t Rw_get_real_scalar(SEXP sexp, R_xlen_t index, igraph_real_t *res) { if (Rf_xlength(sexp) <= index) { @@ -152,7 +152,7 @@ igraph_error_t R_get_real_scalar(SEXP sexp, R_xlen_t index, igraph_real_t *res) return IGRAPH_SUCCESS; } -igraph_error_t R_get_bool_scalar(SEXP sexp, R_xlen_t index, igraph_bool_t *res) +igraph_error_t Rw_get_bool_scalar(SEXP sexp, R_xlen_t index, igraph_bool_t *res) { if (Rf_xlength(sexp) <= index) { @@ -162,7 +162,7 @@ igraph_error_t R_get_bool_scalar(SEXP sexp, R_xlen_t index, igraph_bool_t *res) return IGRAPH_SUCCESS; } -FILE* R_igraph_fopen_read(SEXP instream) { +FILE* Ry_igraph_fopen_read(SEXP instream) { FILE *file; file=fopen(CHAR(STRING_ELT(instream, 0)), "r"); @@ -171,7 +171,7 @@ FILE* R_igraph_fopen_read(SEXP instream) { return file; } -FILE* R_igraph_fopen_write(SEXP outstream) { +FILE* Ry_igraph_fopen_write(SEXP outstream) { FILE *file; file=fopen(CHAR(STRING_ELT(outstream, 0)), "w"); @@ -180,7 +180,7 @@ FILE* R_igraph_fopen_write(SEXP outstream) { return file; } -SEXP R_igraph_i_lang7(SEXP s, SEXP t, SEXP u, SEXP v, SEXP w, SEXP x, SEXP y) +SEXP Rx_igraph_i_lang7(SEXP s, SEXP t, SEXP u, SEXP v, SEXP w, SEXP x, SEXP y) { PROTECT(s); PROTECT(t); @@ -193,7 +193,7 @@ SEXP R_igraph_i_lang7(SEXP s, SEXP t, SEXP u, SEXP v, SEXP w, SEXP x, SEXP y) /* get the list element named str, or return NULL */ /* from the R Manual */ -SEXP R_igraph_getListElement(SEXP list, const char *str) +SEXP Rx_igraph_getListElement(SEXP list, const char *str) { SEXP elmt = R_NilValue, names = Rf_getAttrib(list, R_NamesSymbol); @@ -205,7 +205,7 @@ SEXP R_igraph_getListElement(SEXP list, const char *str) return elmt; } -SEXP R_igraph_c2(SEXP x1, SEXP x2) { +SEXP Rx_igraph_c2(SEXP x1, SEXP x2) { SEXP cc = PROTECT(Rf_install("c")); SEXP lc = PROTECT(Rf_lang3(cc, x1, x2)); SEXP ret = Rf_eval(lc, R_GlobalEnv); @@ -221,9 +221,9 @@ typedef enum { SAFEEVAL_OK = 0, SAFEEVAL_ERROR = 1, SAFEEVAL_INTERRUPTION = 2 -} R_igraph_safe_eval_result_t; +} Rx_igraph_safe_eval_result_t; -R_igraph_safe_eval_result_t R_igraph_safe_eval_classify_result(SEXP result) { +Rx_igraph_safe_eval_result_t Rx_igraph_safe_eval_classify_result(SEXP result) { if (Rf_inherits(result, "condition")) { if (Rf_inherits(result, "error")) { return SAFEEVAL_ERROR; @@ -235,7 +235,7 @@ R_igraph_safe_eval_result_t R_igraph_safe_eval_classify_result(SEXP result) { return SAFEEVAL_OK; } -SEXP R_igraph_safe_eval_in_env(SEXP expr_call, SEXP rho, R_igraph_safe_eval_result_t* result) { +SEXP Rx_igraph_safe_eval_in_env(SEXP expr_call, SEXP rho, Rx_igraph_safe_eval_result_t* result) { /* find `identity` function used to capture errors */ SEXP identity = PROTECT(Rf_install("identity")); SEXP identity_func = PROTECT(Rf_findFun(identity, R_BaseNamespace)); @@ -255,7 +255,7 @@ SEXP R_igraph_safe_eval_in_env(SEXP expr_call, SEXP rho, R_igraph_safe_eval_resu /* did we get an error or an interrupt? */ if (result) { - *result = R_igraph_safe_eval_classify_result(retval); + *result = Rx_igraph_safe_eval_classify_result(retval); } UNPROTECT(5); @@ -263,8 +263,8 @@ SEXP R_igraph_safe_eval_in_env(SEXP expr_call, SEXP rho, R_igraph_safe_eval_resu return retval; } -SEXP R_igraph_handle_safe_eval_result_in_env(SEXP result, SEXP rho) { - switch (R_igraph_safe_eval_classify_result(result)) { +SEXP Rx_igraph_handle_safe_eval_result_in_env(SEXP result, SEXP rho) { + switch (Rx_igraph_safe_eval_classify_result(result)) { case SAFEEVAL_OK: return result; @@ -289,19 +289,19 @@ SEXP R_igraph_handle_safe_eval_result_in_env(SEXP result, SEXP rho) { default: Rf_error( - "Invalid object type returned from R_igraph_safe_eval(). This is a " + "Invalid object type returned from Rx_igraph_safe_eval(). This is a " "bug; please report it to the developers." ); return R_NilValue; } } -SEXP R_igraph_safe_eval(SEXP expr_call, R_igraph_safe_eval_result_t* result) { - return R_igraph_safe_eval_in_env(expr_call, R_GlobalEnv, result); +SEXP Rx_igraph_safe_eval(SEXP expr_call, Rx_igraph_safe_eval_result_t* result) { + return Rx_igraph_safe_eval_in_env(expr_call, R_GlobalEnv, result); } -SEXP R_igraph_handle_safe_eval_result(SEXP result) { - return R_igraph_handle_safe_eval_result_in_env(result, R_GlobalEnv); +SEXP Rx_igraph_handle_safe_eval_result(SEXP result) { + return Rx_igraph_handle_safe_eval_result_in_env(result, R_GlobalEnv); } /****************************************************** @@ -332,7 +332,7 @@ SEXP Rx_igraph_get_attr_mode(SEXP graph, SEXP pwhich) { return result; } -igraph_error_t R_SEXP_to_attr_comb(SEXP input, igraph_attribute_combination_t *comb) { +igraph_error_t Rz_SEXP_to_attr_comb(SEXP input, igraph_attribute_combination_t *comb) { igraph_integer_t n = Rf_xlength(input); IGRAPH_CHECK(igraph_attribute_combination_init(comb)); @@ -366,23 +366,23 @@ igraph_error_t R_SEXP_to_attr_comb(SEXP input, igraph_attribute_combination_t *c return IGRAPH_SUCCESS; } -static SEXP R_igraph_attribute_preserve_list; +static SEXP Rx_igraph_attribute_preserve_list; -SEXP R_igraph_attribute_add_to_preserve_list(SEXP attr) { - if (!R_igraph_attribute_preserve_list) { +SEXP Rx_igraph_attribute_add_to_preserve_list(SEXP attr) { + if (!Rx_igraph_attribute_preserve_list) { // We don't care about freeing this, typically this is just a single node - R_igraph_attribute_preserve_list = Rf_cons(R_NilValue, R_NilValue); - R_PreserveObject(R_igraph_attribute_preserve_list); + Rx_igraph_attribute_preserve_list = Rf_cons(R_NilValue, R_NilValue); + R_PreserveObject(Rx_igraph_attribute_preserve_list); } // Create a new node, add it to the head of the list. - SEXP node = Rf_cons(attr, CDR(R_igraph_attribute_preserve_list)); - SETCDR(R_igraph_attribute_preserve_list, node); + SEXP node = Rf_cons(attr, CDR(Rx_igraph_attribute_preserve_list)); + SETCDR(Rx_igraph_attribute_preserve_list, node); return attr; } -void R_igraph_attribute_clean_preserve_list(void) { - if (R_igraph_attribute_preserve_list) { +void Rx_igraph_attribute_clean_preserve_list(void) { + if (Rx_igraph_attribute_preserve_list) { // Mark the entire list available for garbage collection. // Attributes that have been assigned to an R graph object will remain protected. // Dangling attributes will be GC-ed eventually. @@ -391,18 +391,18 @@ void R_igraph_attribute_clean_preserve_list(void) { // attributes; after such a function returns, we need to keep preserving // all attributes because they may be put into R graph objects // and returned to R. - SETCDR(R_igraph_attribute_preserve_list, R_NilValue); + SETCDR(Rx_igraph_attribute_preserve_list, R_NilValue); } } -igraph_error_t R_igraph_attribute_init(igraph_t *graph, igraph_vector_ptr_t *attr) { +igraph_error_t Rx_igraph_attribute_init(igraph_t *graph, igraph_vector_ptr_t *attr) { SEXP result, names, gal; int px = 0; result=PROTECT(NEW_LIST(4)); // The "preserve list" will be cleared with the next invocation of an igraph function. // Adding to that list ensures that the attributes aren't GC-ed prematurely. - result = R_igraph_attribute_add_to_preserve_list(result); + result = Rx_igraph_attribute_add_to_preserve_list(result); UNPROTECT(1); /* Add dummy vector for compatibility with CRAN versions */ @@ -473,7 +473,7 @@ igraph_error_t R_igraph_attribute_init(igraph_t *graph, igraph_vector_ptr_t *att return 0; } -void R_igraph_attribute_destroy(igraph_t *graph) { +void Rx_igraph_attribute_destroy(igraph_t *graph) { // Owned by the R graph object, will be garbage-collected graph->attr=0; } @@ -484,13 +484,13 @@ void R_igraph_attribute_destroy(igraph_t *graph) { 2) the not-copied attributes will be set up by subsequent calls to permute_vertices and/or permute/edges anyway. */ -igraph_error_t R_igraph_attribute_copy(igraph_t *to, const igraph_t *from, +igraph_error_t Rx_igraph_attribute_copy(igraph_t *to, const igraph_t *from, igraph_bool_t ga, igraph_bool_t va, igraph_bool_t ea) { SEXP fromattr=from->attr; if (ga && va && ea) { to->attr=from->attr; } else { - R_igraph_attribute_init(to,0); /* Sets up many things */ + Rx_igraph_attribute_init(to,0); /* Sets up many things */ SEXP toattr=to->attr; if (ga) { SET_VECTOR_ELT(toattr, 1, Rf_duplicate(VECTOR_ELT(fromattr, 1))); @@ -505,7 +505,7 @@ igraph_error_t R_igraph_attribute_copy(igraph_t *to, const igraph_t *from, return 0; } -SEXP R_igraph_attribute_add_vertices_append1(igraph_vector_ptr_t *nattr, +SEXP Rx_igraph_attribute_add_vertices_append1(igraph_vector_ptr_t *nattr, int j, int nv) { SEXP app = R_NilValue; @@ -546,10 +546,10 @@ SEXP R_igraph_attribute_add_vertices_append1(igraph_vector_ptr_t *nattr, igraph_vector_copy_to(tmprec->value, REAL(app)); break; case IGRAPH_ATTRIBUTE_BOOLEAN: - PROTECT(app=R_igraph_vector_bool_to_SEXP(tmprec->value)); + PROTECT(app=Ry_igraph_vector_bool_to_SEXP(tmprec->value)); break; default: /* IGRAPH_ATTRIBUTE_STRING */ - PROTECT(app=R_igraph_strvector_to_SEXP(tmprec->value)); + PROTECT(app=Rx_igraph_strvector_to_SEXP(tmprec->value)); break; } @@ -557,7 +557,7 @@ SEXP R_igraph_attribute_add_vertices_append1(igraph_vector_ptr_t *nattr, return app; } -void R_igraph_attribute_add_vertices_append(SEXP val, igraph_integer_t nv, +void Rx_igraph_attribute_add_vertices_append(SEXP val, igraph_integer_t nv, igraph_vector_ptr_t *nattr) { SEXP names; igraph_integer_t valno, nattrno; @@ -583,8 +583,8 @@ void R_igraph_attribute_add_vertices_append(SEXP val, igraph_integer_t nv, } if (l) { /* This attribute is present in nattr */ - SEXP app = PROTECT(R_igraph_attribute_add_vertices_append1(nattr, j, nv)); - SEXP newva = PROTECT(R_igraph_c2(oldva, app)); + SEXP app = PROTECT(Rx_igraph_attribute_add_vertices_append1(nattr, j, nv)); + SEXP newva = PROTECT(Rx_igraph_c2(oldva, app)); SET_VECTOR_ELT(val, i, newva); UNPROTECT(2); } else { @@ -596,7 +596,7 @@ void R_igraph_attribute_add_vertices_append(SEXP val, igraph_integer_t nv, SEXP l4 = PROTECT(Rf_lang3(l1, l2, l3)); px++; PROTECT(rep=Rf_eval(l4, R_GlobalEnv)); px++; } - PROTECT(newva=R_igraph_c2(oldva, rep)); + PROTECT(newva=Rx_igraph_c2(oldva, rep)); SET_VECTOR_ELT(val, i, newva); UNPROTECT(1); } @@ -605,15 +605,15 @@ void R_igraph_attribute_add_vertices_append(SEXP val, igraph_integer_t nv, UNPROTECT(px); } -SEXP R_igraph_attribute_add_vertices_dup(SEXP attr) { +SEXP Rx_igraph_attribute_add_vertices_dup(SEXP attr) { SEXP newattr; PROTECT(newattr=Rf_duplicate(attr)); - R_igraph_attribute_add_to_preserve_list(newattr); + Rx_igraph_attribute_add_to_preserve_list(newattr); UNPROTECT(1); return newattr; } -igraph_error_t R_igraph_attribute_add_vertices(igraph_t *graph, igraph_integer_t nv, +igraph_error_t Rx_igraph_attribute_add_vertices(igraph_t *graph, igraph_integer_t nv, igraph_vector_ptr_t *nattr) { SEXP attr=graph->attr; SEXP val, rep=0, names, newnames; @@ -621,7 +621,7 @@ igraph_error_t R_igraph_attribute_add_vertices(igraph_t *graph, igraph_integer_t igraph_integer_t valno, origlen, nattrno, newattrs; int px = 0; - SEXP newattr = PROTECT(R_igraph_attribute_add_vertices_dup(attr)); px++; + SEXP newattr = PROTECT(Rx_igraph_attribute_add_vertices_dup(attr)); px++; attr=graph->attr=newattr; val=VECTOR_ELT(attr, 2); @@ -664,8 +664,8 @@ igraph_error_t R_igraph_attribute_add_vertices(igraph_t *graph, igraph_integer_t SET_VECTOR_ELT(app, i, rep); SET_STRING_ELT(newnames, i, Rf_mkChar(tmp->name)); } - PROTECT(newval=R_igraph_c2(val, app)); - PROTECT(newnames=R_igraph_c2(names, newnames)); + PROTECT(newval=Rx_igraph_c2(val, app)); + PROTECT(newnames=Rx_igraph_c2(names, newnames)); SET_NAMES(newval, newnames); SET_VECTOR_ELT(attr, 2, newval); val=VECTOR_ELT(attr, 2); @@ -675,14 +675,14 @@ igraph_error_t R_igraph_attribute_add_vertices(igraph_t *graph, igraph_integer_t IGRAPH_FINALLY_CLEAN(1); /* news */ /* Now append the new values */ - R_igraph_attribute_add_vertices_append(val, nv, nattr); + Rx_igraph_attribute_add_vertices_append(val, nv, nattr); UNPROTECT(px); return 0; } -/* void R_igraph_attribute_delete_vertices(igraph_t *graph, */ +/* void Rx_igraph_attribute_delete_vertices(igraph_t *graph, */ /* const igraph_vector_t *eidx, */ /* const igraph_vector_t *vidx) { */ /* SEXP attr=graph->attr; */ @@ -740,7 +740,7 @@ igraph_error_t R_igraph_attribute_add_vertices(igraph_t *graph, igraph_integer_t /* } */ /* } */ -igraph_error_t R_igraph_attribute_permute_vertices_same(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_permute_vertices_same(const igraph_t *graph, igraph_t *newgraph, const igraph_vector_int_t *idx) { SEXP attr=newgraph->attr; @@ -751,7 +751,7 @@ igraph_error_t R_igraph_attribute_permute_vertices_same(const igraph_t *graph, int px = 0; SEXP newattr = PROTECT(Rf_duplicate(attr)); - R_igraph_attribute_add_to_preserve_list(newattr); + Rx_igraph_attribute_add_to_preserve_list(newattr); UNPROTECT(1); attr=newgraph->attr=newattr; @@ -783,7 +783,7 @@ igraph_error_t R_igraph_attribute_permute_vertices_same(const igraph_t *graph, return IGRAPH_SUCCESS; } -igraph_error_t R_igraph_attribute_permute_vertices_diff(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_permute_vertices_diff(const igraph_t *graph, igraph_t *newgraph, const igraph_vector_int_t *idx) { SEXP attr=graph->attr; @@ -827,25 +827,25 @@ igraph_error_t R_igraph_attribute_permute_vertices_diff(const igraph_t *graph, return IGRAPH_SUCCESS; } -igraph_error_t R_igraph_attribute_permute_vertices(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_permute_vertices(const igraph_t *graph, igraph_t *newgraph, const igraph_vector_int_t *idx) { if (graph == newgraph) { - return R_igraph_attribute_permute_vertices_same(graph, newgraph, idx); + return Rx_igraph_attribute_permute_vertices_same(graph, newgraph, idx); } else { - return R_igraph_attribute_permute_vertices_diff(graph, newgraph, idx); + return Rx_igraph_attribute_permute_vertices_diff(graph, newgraph, idx); } } -SEXP R_igraph_attribute_add_edges_dup(SEXP attr) { +SEXP Rx_igraph_attribute_add_edges_dup(SEXP attr) { SEXP newattr; PROTECT(newattr=Rf_duplicate(attr)); - R_igraph_attribute_add_to_preserve_list(newattr); + Rx_igraph_attribute_add_to_preserve_list(newattr); UNPROTECT(1); return newattr; } -SEXP R_igraph_attribute_add_edges_append1(igraph_vector_ptr_t *nattr, igraph_integer_t j, +SEXP Rx_igraph_attribute_add_edges_append1(igraph_vector_ptr_t *nattr, igraph_integer_t j, igraph_integer_t ne) { SEXP app = R_NilValue; @@ -886,10 +886,10 @@ SEXP R_igraph_attribute_add_edges_append1(igraph_vector_ptr_t *nattr, igraph_int igraph_vector_copy_to(tmprec->value, REAL(app)); break; case IGRAPH_ATTRIBUTE_BOOLEAN: - PROTECT(app=R_igraph_vector_bool_to_SEXP(tmprec->value)); + PROTECT(app=Ry_igraph_vector_bool_to_SEXP(tmprec->value)); break; default: /* IGRAPH_ATTRIBUTE_STRING */ - PROTECT(app=R_igraph_strvector_to_SEXP(tmprec->value)); + PROTECT(app=Rx_igraph_strvector_to_SEXP(tmprec->value)); break; } @@ -897,7 +897,7 @@ SEXP R_igraph_attribute_add_edges_append1(igraph_vector_ptr_t *nattr, igraph_int return app; } -void R_igraph_attribute_add_edges_append(SEXP eal, +void Rx_igraph_attribute_add_edges_append(SEXP eal, const igraph_vector_int_t *edges, igraph_vector_ptr_t *nattr) { SEXP names; @@ -925,8 +925,8 @@ void R_igraph_attribute_add_edges_append(SEXP eal, } if (l) { /* This attribute is present in nattr */ - SEXP app = PROTECT(R_igraph_attribute_add_edges_append1(nattr, j, ne)); - SEXP newea = PROTECT(R_igraph_c2(oldea, app)); + SEXP app = PROTECT(Rx_igraph_attribute_add_edges_append1(nattr, j, ne)); + SEXP newea = PROTECT(Rx_igraph_c2(oldea, app)); SET_VECTOR_ELT(eal, i, newea); UNPROTECT(2); } else { @@ -938,7 +938,7 @@ void R_igraph_attribute_add_edges_append(SEXP eal, SEXP l4 = PROTECT(Rf_lang3(l1, l2, l3)); px++; PROTECT(rep = Rf_eval(l4, R_GlobalEnv)); px++; } - SEXP newea = PROTECT(R_igraph_c2(oldea, rep)); + SEXP newea = PROTECT(Rx_igraph_c2(oldea, rep)); SET_VECTOR_ELT(eal, i, newea); UNPROTECT(1); } @@ -947,7 +947,7 @@ void R_igraph_attribute_add_edges_append(SEXP eal, UNPROTECT(px); } -igraph_error_t R_igraph_attribute_add_edges(igraph_t *graph, const igraph_vector_int_t *edges, +igraph_error_t Rx_igraph_attribute_add_edges(igraph_t *graph, const igraph_vector_int_t *edges, igraph_vector_ptr_t *nattr) { SEXP attr=graph->attr; SEXP eal, names, newnames; @@ -959,7 +959,7 @@ igraph_error_t R_igraph_attribute_add_edges(igraph_t *graph, const igraph_vector if (igraph_vector_int_init(&news, 0)) Rf_error("Out of memory"); IGRAPH_FINALLY_PV(igraph_vector_int_destroy, &news); - SEXP newattr = PROTECT(R_igraph_attribute_add_edges_dup(attr)); px++; + SEXP newattr = PROTECT(Rx_igraph_attribute_add_edges_dup(attr)); px++; attr=graph->attr=newattr; eal=VECTOR_ELT(attr, 3); @@ -1001,8 +1001,8 @@ igraph_error_t R_igraph_attribute_add_edges(igraph_t *graph, const igraph_vector SET_VECTOR_ELT(app, i, rep); SET_STRING_ELT(newnames, i, Rf_mkChar(tmp->name)); } - PROTECT(neweal=R_igraph_c2(eal, app)); - PROTECT(newnames=R_igraph_c2(names, newnames)); + PROTECT(neweal=Rx_igraph_c2(eal, app)); + PROTECT(newnames=Rx_igraph_c2(names, newnames)); SET_NAMES(neweal, newnames); SET_VECTOR_ELT(attr, 3, neweal); eal=VECTOR_ELT(attr, 3); @@ -1012,14 +1012,14 @@ igraph_error_t R_igraph_attribute_add_edges(igraph_t *graph, const igraph_vector IGRAPH_FINALLY_CLEAN(1); /* Now append the new values */ - R_igraph_attribute_add_edges_append(eal, edges, nattr); + Rx_igraph_attribute_add_edges_append(eal, edges, nattr); UNPROTECT(px); return 0; } -/* void R_igraph_attribute_delete_edges(igraph_t *graph, */ +/* void Rx_igraph_attribute_delete_edges(igraph_t *graph, */ /* const igraph_vector_t *idx) { */ /* SEXP attr=graph->attr; */ /* SEXP eal; */ @@ -1052,7 +1052,7 @@ igraph_error_t R_igraph_attribute_add_edges(igraph_t *graph, const igraph_vector /* } */ /* } */ -igraph_error_t R_igraph_attribute_permute_edges_same(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_permute_edges_same(const igraph_t *graph, igraph_t *newgraph, const igraph_vector_int_t *idx) { @@ -1064,7 +1064,7 @@ igraph_error_t R_igraph_attribute_permute_edges_same(const igraph_t *graph, int px = 0; SEXP newattr=PROTECT(Rf_duplicate(attr)); - R_igraph_attribute_add_to_preserve_list(newattr); + Rx_igraph_attribute_add_to_preserve_list(newattr); UNPROTECT(1); attr=newgraph->attr=newattr; @@ -1096,7 +1096,7 @@ igraph_error_t R_igraph_attribute_permute_edges_same(const igraph_t *graph, return IGRAPH_SUCCESS; } -igraph_error_t R_igraph_attribute_permute_edges_diff(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_permute_edges_diff(const igraph_t *graph, igraph_t *newgraph, const igraph_vector_int_t *idx) { @@ -1141,16 +1141,16 @@ igraph_error_t R_igraph_attribute_permute_edges_diff(const igraph_t *graph, return IGRAPH_SUCCESS; } -igraph_error_t R_igraph_attribute_permute_edges(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_permute_edges(const igraph_t *graph, igraph_t *newgraph, const igraph_vector_int_t *idx) { if (graph==newgraph) { - return R_igraph_attribute_permute_edges_same(graph, newgraph, idx); + return Rx_igraph_attribute_permute_edges_same(graph, newgraph, idx); } else { - return R_igraph_attribute_permute_edges_diff(graph, newgraph, idx); + return Rx_igraph_attribute_permute_edges_diff(graph, newgraph, idx); } } -igraph_error_t R_igraph_attribute_get_info(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_get_info(const igraph_t *graph, igraph_strvector_t *gnames, igraph_vector_int_t *gtypes, igraph_strvector_t *vnames, @@ -1169,7 +1169,7 @@ igraph_error_t R_igraph_attribute_get_info(const igraph_t *graph, if (n) { /* return names */ SEXP names = PROTECT(GET_NAMES(al)); - R_igraph_SEXP_to_strvector_copy(names, n); + Rx_igraph_SEXP_to_strvector_copy(names, n); UNPROTECT(1); } @@ -1193,7 +1193,7 @@ igraph_error_t R_igraph_attribute_get_info(const igraph_t *graph, return 0; } -igraph_bool_t R_igraph_attribute_has_attr(const igraph_t *graph, +igraph_bool_t Rx_igraph_attribute_has_attr(const igraph_t *graph, igraph_attribute_elemtype_t type, const char *name) { igraph_integer_t attrnum; @@ -1214,11 +1214,11 @@ igraph_bool_t R_igraph_attribute_has_attr(const igraph_t *graph, break; } - res=R_igraph_getListElement(VECTOR_ELT(graph->attr, attrnum), name); + res=Rx_igraph_getListElement(VECTOR_ELT(graph->attr, attrnum), name); return res != R_NilValue; } -igraph_error_t R_igraph_attribute_gettype(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_gettype(const igraph_t *graph, igraph_attribute_type_t *type, igraph_attribute_elemtype_t elemtype, const char *name) { @@ -1240,7 +1240,7 @@ igraph_error_t R_igraph_attribute_gettype(const igraph_t *graph, break; } - res=R_igraph_getListElement(VECTOR_ELT(graph->attr, attrnum), name); + res=Rx_igraph_getListElement(VECTOR_ELT(graph->attr, attrnum), name); if (IS_NUMERIC(res) || IS_INTEGER(res)) { *type=IGRAPH_ATTRIBUTE_NUMERIC; } else if (IS_LOGICAL(res)) { @@ -1253,11 +1253,11 @@ igraph_error_t R_igraph_attribute_gettype(const igraph_t *graph, return 0; } -igraph_error_t R_igraph_attribute_get_numeric_graph_attr(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_get_numeric_graph_attr(const igraph_t *graph, const char *name, igraph_vector_t *value) { SEXP gal=VECTOR_ELT(graph->attr, 1); - SEXP ga=R_igraph_getListElement(gal, name); + SEXP ga=Rx_igraph_getListElement(gal, name); if (ga == R_NilValue) { IGRAPH_ERROR("No such attribute", IGRAPH_EINVAL); @@ -1276,11 +1276,11 @@ igraph_error_t R_igraph_attribute_get_numeric_graph_attr(const igraph_t *graph, return 0; } -igraph_error_t R_igraph_attribute_get_bool_graph_attr(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_get_bool_graph_attr(const igraph_t *graph, const char *name, igraph_vector_bool_t *value) { SEXP gal=VECTOR_ELT(graph->attr, 1); - SEXP ga=R_igraph_getListElement(gal, name); + SEXP ga=Rx_igraph_getListElement(gal, name); if (ga == R_NilValue) { IGRAPH_ERROR("No such attribute", IGRAPH_EINVAL); @@ -1295,12 +1295,12 @@ igraph_error_t R_igraph_attribute_get_bool_graph_attr(const igraph_t *graph, return 0; } -igraph_error_t R_igraph_attribute_get_string_graph_attr(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_get_string_graph_attr(const igraph_t *graph, const char *name, igraph_strvector_t *value) { /* TODO: serialization */ SEXP gal=VECTOR_ELT(graph->attr, 1); - SEXP ga=R_igraph_getListElement(gal, name); + SEXP ga=Rx_igraph_getListElement(gal, name); if (ga == R_NilValue) { IGRAPH_ERROR("No such attribute", IGRAPH_EINVAL); @@ -1315,13 +1315,13 @@ igraph_error_t R_igraph_attribute_get_string_graph_attr(const igraph_t *graph, return 0; } -igraph_error_t R_igraph_attribute_get_numeric_vertex_attr(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_get_numeric_vertex_attr(const igraph_t *graph, const char *name, igraph_vs_t vs, igraph_vector_t *value) { /* TODO: serialization */ SEXP val=VECTOR_ELT(graph->attr, 2); - SEXP va=R_igraph_getListElement(val, name); + SEXP va=Rx_igraph_getListElement(val, name); igraph_vector_t newvalue; if (va == R_NilValue) { @@ -1332,7 +1332,7 @@ igraph_error_t R_igraph_attribute_get_numeric_vertex_attr(const igraph_t *graph, } if (igraph_vs_is_all(&vs)) { - R_SEXP_to_vector_copy(AS_NUMERIC(va), &newvalue); + Rz_SEXP_to_vector_copy(AS_NUMERIC(va), &newvalue); igraph_vector_destroy(value); *value=newvalue; } else { @@ -1363,13 +1363,13 @@ igraph_error_t R_igraph_attribute_get_numeric_vertex_attr(const igraph_t *graph, return 0; } -igraph_error_t R_igraph_attribute_get_bool_vertex_attr(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_get_bool_vertex_attr(const igraph_t *graph, const char *name, igraph_vs_t vs, igraph_vector_bool_t *value) { /* TODO: serialization */ SEXP val=VECTOR_ELT(graph->attr, 2); - SEXP va=R_igraph_getListElement(val, name); + SEXP va=Rx_igraph_getListElement(val, name); igraph_vector_bool_t newvalue; if (va == R_NilValue) { @@ -1380,7 +1380,7 @@ igraph_error_t R_igraph_attribute_get_bool_vertex_attr(const igraph_t *graph, } if (igraph_vs_is_all(&vs)) { - R_SEXP_to_vector_bool_copy(va, &newvalue); + Rz_SEXP_to_vector_bool_copy(va, &newvalue); igraph_vector_bool_destroy(value); *value=newvalue; } else { @@ -1402,7 +1402,7 @@ igraph_error_t R_igraph_attribute_get_bool_vertex_attr(const igraph_t *graph, return 0; } -igraph_error_t R_igraph_attribute_get_string_vertex_attr(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_get_string_vertex_attr(const igraph_t *graph, const char *name, igraph_vs_t vs, igraph_strvector_t *value) { @@ -1410,7 +1410,7 @@ igraph_error_t R_igraph_attribute_get_string_vertex_attr(const igraph_t *graph, SEXP val, va; val=VECTOR_ELT(graph->attr, 2); - va=R_igraph_getListElement(val, name); + va=Rx_igraph_getListElement(val, name); if (va == R_NilValue) { IGRAPH_ERROR("No such attribute", IGRAPH_EINVAL); } @@ -1419,7 +1419,7 @@ igraph_error_t R_igraph_attribute_get_string_vertex_attr(const igraph_t *graph, } if (igraph_vs_is_all(&vs)) { - R_igraph_SEXP_to_strvector_copy(va, value); + Rx_igraph_SEXP_to_strvector_copy(va, value); } else { igraph_vit_t it; igraph_integer_t i=0; @@ -1440,13 +1440,13 @@ igraph_error_t R_igraph_attribute_get_string_vertex_attr(const igraph_t *graph, return 0; } -igraph_error_t R_igraph_attribute_get_numeric_edge_attr(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_get_numeric_edge_attr(const igraph_t *graph, const char *name, igraph_es_t es, igraph_vector_t *value) { /* TODO: serialization */ SEXP eal=VECTOR_ELT(graph->attr, 3); - SEXP ea=R_igraph_getListElement(eal, name); + SEXP ea=Rx_igraph_getListElement(eal, name); igraph_vector_t newvalue; if (ea == R_NilValue) { @@ -1457,7 +1457,7 @@ igraph_error_t R_igraph_attribute_get_numeric_edge_attr(const igraph_t *graph, } if (igraph_es_is_all(&es)) { - R_SEXP_to_vector_copy(AS_NUMERIC(ea), &newvalue); + Rz_SEXP_to_vector_copy(AS_NUMERIC(ea), &newvalue); igraph_vector_destroy(value); *value=newvalue; } else { @@ -1488,13 +1488,13 @@ igraph_error_t R_igraph_attribute_get_numeric_edge_attr(const igraph_t *graph, return 0; } -igraph_error_t R_igraph_attribute_get_bool_edge_attr(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_get_bool_edge_attr(const igraph_t *graph, const char *name, igraph_es_t es, igraph_vector_bool_t *value) { /* TODO: serialization */ SEXP eal=VECTOR_ELT(graph->attr, 3); - SEXP ea=R_igraph_getListElement(eal, name); + SEXP ea=Rx_igraph_getListElement(eal, name); igraph_vector_bool_t newvalue; if (ea == R_NilValue) { @@ -1505,7 +1505,7 @@ igraph_error_t R_igraph_attribute_get_bool_edge_attr(const igraph_t *graph, } if (igraph_es_is_all(&es)) { - R_SEXP_to_vector_bool_copy(ea, &newvalue); + Rz_SEXP_to_vector_bool_copy(ea, &newvalue); igraph_vector_bool_destroy(value); *value=newvalue; } else { @@ -1527,13 +1527,13 @@ igraph_error_t R_igraph_attribute_get_bool_edge_attr(const igraph_t *graph, return 0; } -igraph_error_t R_igraph_attribute_get_string_edge_attr(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_get_string_edge_attr(const igraph_t *graph, const char *name, igraph_es_t es, igraph_strvector_t *value) { /* TODO: serialization */ SEXP eal=VECTOR_ELT(graph->attr, 3); - SEXP ea=R_igraph_getListElement(eal, name); + SEXP ea=Rx_igraph_getListElement(eal, name); if (ea == R_NilValue) { IGRAPH_ERROR("No such attribute", IGRAPH_EINVAL); @@ -1543,7 +1543,7 @@ igraph_error_t R_igraph_attribute_get_string_edge_attr(const igraph_t *graph, } if (igraph_es_is_all(&es)) { - R_igraph_SEXP_to_strvector_copy(ea, value); + Rx_igraph_SEXP_to_strvector_copy(ea, value); } else { igraph_eit_t it; igraph_integer_t i=0; @@ -1564,7 +1564,7 @@ igraph_error_t R_igraph_attribute_get_string_edge_attr(const igraph_t *graph, return 0; } -SEXP R_igraph_ac_sum_numeric(SEXP attr, +SEXP Rx_igraph_ac_sum_numeric(SEXP attr, const igraph_vector_int_list_t *merges) { SEXP res; SEXP attr2; @@ -1588,7 +1588,7 @@ SEXP R_igraph_ac_sum_numeric(SEXP attr, return res; } -SEXP R_igraph_ac_prod_numeric(SEXP attr, +SEXP Rx_igraph_ac_prod_numeric(SEXP attr, const igraph_vector_int_list_t *merges) { SEXP res; SEXP attr2; @@ -1612,7 +1612,7 @@ SEXP R_igraph_ac_prod_numeric(SEXP attr, return res; } -SEXP R_igraph_ac_min_numeric(SEXP attr, +SEXP Rx_igraph_ac_min_numeric(SEXP attr, const igraph_vector_int_list_t *merges) { SEXP res; SEXP attr2; @@ -1639,7 +1639,7 @@ SEXP R_igraph_ac_min_numeric(SEXP attr, return res; } -SEXP R_igraph_ac_max_numeric(SEXP attr, +SEXP Rx_igraph_ac_max_numeric(SEXP attr, const igraph_vector_int_list_t *merges) { SEXP res; SEXP attr2; @@ -1666,7 +1666,7 @@ SEXP R_igraph_ac_max_numeric(SEXP attr, return res; } -SEXP R_igraph_ac_random_numeric(SEXP attr, +SEXP Rx_igraph_ac_random_numeric(SEXP attr, const igraph_vector_int_list_t *merges) { SEXP res; SEXP attr2; @@ -1696,7 +1696,7 @@ SEXP R_igraph_ac_random_numeric(SEXP attr, return res; } -SEXP R_igraph_ac_first_numeric(SEXP attr, +SEXP Rx_igraph_ac_first_numeric(SEXP attr, const igraph_vector_int_list_t *merges) { SEXP res; SEXP attr2; @@ -1719,7 +1719,7 @@ SEXP R_igraph_ac_first_numeric(SEXP attr, return res; } -SEXP R_igraph_ac_last_numeric(SEXP attr, +SEXP Rx_igraph_ac_last_numeric(SEXP attr, const igraph_vector_int_list_t *merges) { SEXP res; SEXP attr2; @@ -1742,7 +1742,7 @@ SEXP R_igraph_ac_last_numeric(SEXP attr, return res; } -SEXP R_igraph_ac_mean_numeric(SEXP attr, +SEXP Rx_igraph_ac_mean_numeric(SEXP attr, const igraph_vector_int_list_t *merges) { SEXP res; SEXP attr2; @@ -1767,7 +1767,7 @@ SEXP R_igraph_ac_mean_numeric(SEXP attr, return res; } -SEXP R_igraph_ac_median_numeric(SEXP attr, +SEXP Rx_igraph_ac_median_numeric(SEXP attr, const igraph_vector_int_list_t *merges) { SEXP res; SEXP attr2; @@ -1801,7 +1801,7 @@ SEXP R_igraph_ac_median_numeric(SEXP attr, return res; } -SEXP R_igraph_ac_all_other(SEXP attr, +SEXP Rx_igraph_ac_all_other(SEXP attr, const igraph_vector_int_list_t *merges, const char *function_name, SEXP arg) { @@ -1824,8 +1824,8 @@ SEXP R_igraph_ac_all_other(SEXP attr, SEXP l3 = PROTECT(Rf_lang3(l2, attr, tmp)); SEXP l4 = PROTECT(Rf_eval(l3, R_GlobalEnv)); SEXP l5 = PROTECT(arg ? Rf_lang3(l1, l4, arg) : Rf_lang2(l1, l4)); - SEXP l6 = PROTECT(R_igraph_safe_eval(l5, NULL)); - SET_VECTOR_ELT(res, i, R_igraph_handle_safe_eval_result(l6)); + SEXP l6 = PROTECT(Rx_igraph_safe_eval(l5, NULL)); + SET_VECTOR_ELT(res, i, Rx_igraph_handle_safe_eval_result(l6)); UNPROTECT(6); UNPROTECT(1); } @@ -1854,7 +1854,7 @@ SEXP R_igraph_ac_all_other(SEXP attr, return res; } -SEXP R_igraph_ac_func(SEXP attr, +SEXP Rx_igraph_ac_func(SEXP attr, const igraph_vector_int_list_t *merges, SEXP func) { SEXP res, res2; @@ -1875,8 +1875,8 @@ SEXP R_igraph_ac_func(SEXP attr, SEXP l2 = PROTECT(Rf_lang3(l1, attr, tmp)); SEXP l3 = PROTECT(Rf_eval(l2, R_GlobalEnv)); SEXP l4 = PROTECT(Rf_lang2(func, l3)); - SEXP l5 = PROTECT(R_igraph_safe_eval(l4, NULL)); - SET_VECTOR_ELT(res, i, R_igraph_handle_safe_eval_result(l5)); + SEXP l5 = PROTECT(Rx_igraph_safe_eval(l4, NULL)); + SET_VECTOR_ELT(res, i, Rx_igraph_handle_safe_eval_result(l5)); UNPROTECT(5); UNPROTECT(1); } @@ -1905,7 +1905,7 @@ SEXP R_igraph_ac_func(SEXP attr, return res; } -igraph_error_t R_igraph_attribute_combine_vertices(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_combine_vertices(const igraph_t *graph, igraph_t *newgraph, const igraph_vector_int_list_t *merges, const igraph_attribute_combination_t *comb) { @@ -1961,7 +1961,7 @@ igraph_error_t R_igraph_attribute_combine_vertices(const igraph_t *graph, SEXP func; /* What kind of attribute */ - R_igraph_attribute_gettype(graph, &type, + Rx_igraph_attribute_gettype(graph, &type, IGRAPH_ATTRIBUTE_VERTEX, name); switch (todo) { @@ -1971,82 +1971,82 @@ igraph_error_t R_igraph_attribute_combine_vertices(const igraph_t *graph, break; case IGRAPH_ATTRIBUTE_COMBINE_FUNCTION: func = (SEXP) (void*) voidfunc; - SET_VECTOR_ELT(res, j, R_igraph_ac_func(va, merges, func)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_func(va, merges, func)); break; case IGRAPH_ATTRIBUTE_COMBINE_SUM: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_sum_numeric(va, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_sum_numeric(va, merges)); } else { - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(va, merges, "sum", NULL)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(va, merges, "sum", NULL)); } break; case IGRAPH_ATTRIBUTE_COMBINE_PROD: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_prod_numeric(va, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_prod_numeric(va, merges)); } else { - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(va, merges, "prod", NULL)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(va, merges, "prod", NULL)); } break; case IGRAPH_ATTRIBUTE_COMBINE_MIN: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_min_numeric(va, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_min_numeric(va, merges)); } else { - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(va, merges, "min", NULL)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(va, merges, "min", NULL)); } break; case IGRAPH_ATTRIBUTE_COMBINE_MAX: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_max_numeric(va, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_max_numeric(va, merges)); } else { - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(va, merges, "max", NULL)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(va, merges, "max", NULL)); } break; case IGRAPH_ATTRIBUTE_COMBINE_RANDOM: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_random_numeric(va, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_random_numeric(va, merges)); } else { SEXP tx = PROTECT(Rf_ScalarInteger(1)); - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(va, merges, "sample", + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(va, merges, "sample", tx)); UNPROTECT(1); } break; case IGRAPH_ATTRIBUTE_COMBINE_FIRST: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_first_numeric(va, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_first_numeric(va, merges)); } else { SEXP tx = PROTECT(Rf_ScalarInteger(1)); - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(va, merges, "head", + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(va, merges, "head", tx)); UNPROTECT(1); } break; case IGRAPH_ATTRIBUTE_COMBINE_LAST: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_last_numeric(va, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_last_numeric(va, merges)); } else { SEXP tx = PROTECT(Rf_ScalarInteger(1)); - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(va, merges, "tail", + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(va, merges, "tail", tx)); UNPROTECT(1); } break; case IGRAPH_ATTRIBUTE_COMBINE_MEAN: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_mean_numeric(va, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_mean_numeric(va, merges)); } else { - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(va, merges, "mean", NULL)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(va, merges, "mean", NULL)); } break; case IGRAPH_ATTRIBUTE_COMBINE_MEDIAN: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_median_numeric(va, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_median_numeric(va, merges)); } else { - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(va, merges, "median", NULL)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(va, merges, "median", NULL)); } break; case IGRAPH_ATTRIBUTE_COMBINE_CONCAT: - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(va, merges, "c", NULL)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(va, merges, "c", NULL)); break; default: UNPROTECT(px); @@ -2072,7 +2072,7 @@ igraph_error_t R_igraph_attribute_combine_vertices(const igraph_t *graph, return 0; } -igraph_error_t R_igraph_attribute_combine_edges(const igraph_t *graph, +igraph_error_t Rx_igraph_attribute_combine_edges(const igraph_t *graph, igraph_t *newgraph, const igraph_vector_int_list_t *merges, const igraph_attribute_combination_t *comb) { @@ -2128,7 +2128,7 @@ igraph_error_t R_igraph_attribute_combine_edges(const igraph_t *graph, SEXP func; /* What kind of attribute */ - R_igraph_attribute_gettype(graph, &type, IGRAPH_ATTRIBUTE_EDGE, name); + Rx_igraph_attribute_gettype(graph, &type, IGRAPH_ATTRIBUTE_EDGE, name); switch (todo) { case IGRAPH_ATTRIBUTE_COMBINE_DEFAULT: @@ -2137,82 +2137,82 @@ igraph_error_t R_igraph_attribute_combine_edges(const igraph_t *graph, break; case IGRAPH_ATTRIBUTE_COMBINE_FUNCTION: func = (SEXP) (void*) voidfunc; - SET_VECTOR_ELT(res, j, R_igraph_ac_func(ea, merges, func)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_func(ea, merges, func)); break; case IGRAPH_ATTRIBUTE_COMBINE_SUM: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_sum_numeric(ea, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_sum_numeric(ea, merges)); } else { - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(ea, merges, "sum", NULL)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(ea, merges, "sum", NULL)); } break; case IGRAPH_ATTRIBUTE_COMBINE_PROD: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_prod_numeric(ea, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_prod_numeric(ea, merges)); } else { - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(ea, merges, "prod", NULL)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(ea, merges, "prod", NULL)); } break; case IGRAPH_ATTRIBUTE_COMBINE_MIN: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_min_numeric(ea, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_min_numeric(ea, merges)); } else { - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(ea, merges, "min", NULL)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(ea, merges, "min", NULL)); } break; case IGRAPH_ATTRIBUTE_COMBINE_MAX: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_max_numeric(ea, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_max_numeric(ea, merges)); } else { - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(ea, merges, "max", NULL)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(ea, merges, "max", NULL)); } break; case IGRAPH_ATTRIBUTE_COMBINE_RANDOM: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_random_numeric(ea, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_random_numeric(ea, merges)); } else { SEXP tx = PROTECT(Rf_ScalarInteger(1)); - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(ea, merges, "sample", + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(ea, merges, "sample", tx)); UNPROTECT(1); } break; case IGRAPH_ATTRIBUTE_COMBINE_FIRST: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_first_numeric(ea, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_first_numeric(ea, merges)); } else { SEXP tx = PROTECT(Rf_ScalarInteger(1)); - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(ea, merges, "head", + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(ea, merges, "head", tx)); UNPROTECT(1); } break; case IGRAPH_ATTRIBUTE_COMBINE_LAST: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_last_numeric(ea, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_last_numeric(ea, merges)); } else { SEXP tx = PROTECT(Rf_ScalarInteger(1)); - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(ea, merges, "tail", + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(ea, merges, "tail", tx)); UNPROTECT(1); } break; case IGRAPH_ATTRIBUTE_COMBINE_MEAN: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_mean_numeric(ea, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_mean_numeric(ea, merges)); } else { - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(ea, merges, "mean", NULL)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(ea, merges, "mean", NULL)); } break; case IGRAPH_ATTRIBUTE_COMBINE_MEDIAN: if (type==IGRAPH_ATTRIBUTE_NUMERIC) { - SET_VECTOR_ELT(res, j, R_igraph_ac_median_numeric(ea, merges)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_median_numeric(ea, merges)); } else { - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(ea, merges, "median", NULL)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(ea, merges, "median", NULL)); } break; case IGRAPH_ATTRIBUTE_COMBINE_CONCAT: - SET_VECTOR_ELT(res, j, R_igraph_ac_all_other(ea, merges, "c", NULL)); + SET_VECTOR_ELT(res, j, Rx_igraph_ac_all_other(ea, merges, "c", NULL)); break; default: UNPROTECT(px); @@ -2238,28 +2238,28 @@ igraph_error_t R_igraph_attribute_combine_edges(const igraph_t *graph, return 0; } -igraph_attribute_table_t R_igraph_attribute_table={ - &R_igraph_attribute_init, &R_igraph_attribute_destroy, - &R_igraph_attribute_copy, &R_igraph_attribute_add_vertices, - &R_igraph_attribute_permute_vertices, - &R_igraph_attribute_combine_vertices, - &R_igraph_attribute_add_edges, - &R_igraph_attribute_permute_edges, - &R_igraph_attribute_combine_edges, - &R_igraph_attribute_get_info, - &R_igraph_attribute_has_attr, &R_igraph_attribute_gettype, - &R_igraph_attribute_get_numeric_graph_attr, - &R_igraph_attribute_get_string_graph_attr, - &R_igraph_attribute_get_bool_graph_attr, - &R_igraph_attribute_get_numeric_vertex_attr, - &R_igraph_attribute_get_string_vertex_attr, - &R_igraph_attribute_get_bool_vertex_attr, - &R_igraph_attribute_get_numeric_edge_attr, - &R_igraph_attribute_get_string_edge_attr, - &R_igraph_attribute_get_bool_edge_attr +igraph_attribute_table_t Rx_igraph_attribute_table={ + &Rx_igraph_attribute_init, &Rx_igraph_attribute_destroy, + &Rx_igraph_attribute_copy, &Rx_igraph_attribute_add_vertices, + &Rx_igraph_attribute_permute_vertices, + &Rx_igraph_attribute_combine_vertices, + &Rx_igraph_attribute_add_edges, + &Rx_igraph_attribute_permute_edges, + &Rx_igraph_attribute_combine_edges, + &Rx_igraph_attribute_get_info, + &Rx_igraph_attribute_has_attr, &Rx_igraph_attribute_gettype, + &Rx_igraph_attribute_get_numeric_graph_attr, + &Rx_igraph_attribute_get_string_graph_attr, + &Rx_igraph_attribute_get_bool_graph_attr, + &Rx_igraph_attribute_get_numeric_vertex_attr, + &Rx_igraph_attribute_get_string_vertex_attr, + &Rx_igraph_attribute_get_bool_vertex_attr, + &Rx_igraph_attribute_get_numeric_edge_attr, + &Rx_igraph_attribute_get_string_edge_attr, + &Rx_igraph_attribute_get_bool_edge_attr }; -igraph_attribute_table_t *R_igraph_attribute_oldtable; +igraph_attribute_table_t *Rx_igraph_attribute_oldtable; /****************************************************** * things to do before and after * @@ -2268,36 +2268,36 @@ igraph_attribute_table_t *R_igraph_attribute_oldtable; /* borrowed from IGraph/M, thanks to @szhorvat */ -static char R_igraph_error_reason[4096]; -static int R_igraph_errors_count = 0; +static char Rx_igraph_error_reason[4096]; +static int Rx_igraph_errors_count = 0; -static char R_igraph_warning_reason[4096]; -static int R_igraph_warnings_count = 0; +static char Rx_igraph_warning_reason[4096]; +static int Rx_igraph_warnings_count = 0; -static bool R_igraph_in_r_check = false; +static bool Rx_igraph_in_r_check = false; -void R_igraph_set_in_r_check(bool set) { - R_igraph_in_r_check = set; +void Rx_igraph_set_in_r_check(bool set) { + Rx_igraph_in_r_check = set; } -void R_igraph_error(void) { - R_igraph_errors_count = 0; - Rf_error("%s", R_igraph_error_reason); +void Rx_igraph_error(void) { + Rx_igraph_errors_count = 0; + Rf_error("%s", Rx_igraph_error_reason); } -void R_igraph_warning(void) { - if (R_igraph_warnings_count > 0) { - R_igraph_warnings_count = 0; +void Rx_igraph_warning(void) { + if (Rx_igraph_warnings_count > 0) { + Rx_igraph_warnings_count = 0; - Rf_warning("%s", R_igraph_warning_reason); + Rf_warning("%s", Rx_igraph_warning_reason); } } -void R_igraph_interrupt(void) { - R_igraph_errors_count = 0; +void Rx_igraph_interrupt(void) { + Rx_igraph_errors_count = 0; // FIXME: Call into R to run - // stop(structure(list(message = R_igraph_error_reason), class = c("interrupt", "condition"))) - Rf_error("%s", R_igraph_error_reason); + // stop(structure(list(message = Rx_igraph_error_reason), class = c("interrupt", "condition"))) + Rf_error("%s", Rx_igraph_error_reason); } static inline bool is_punctuated(const char *str) { @@ -2315,7 +2315,7 @@ static inline const char* maybe_add_punctuation(const char* msg, const char* pun return is_punctuated(msg) ? "" : punctuation; } -void R_igraph_fatal_handler(const char *reason, const char *file, int line) { +void Rx_igraph_fatal_handler(const char *reason, const char *file, int line) { #ifdef IGRAPH_SANITIZER_AVAILABLE __sanitizer_print_stack_trace(); #endif @@ -2328,39 +2328,39 @@ void R_igraph_fatal_handler(const char *reason, const char *file, int line) { ); } -void R_igraph_error_handler(const char *reason, const char *file, +void Rx_igraph_error_handler(const char *reason, const char *file, int line, igraph_error_t igraph_errno) { /* We are not supposed to touch 'reason' after we have called * IGRAPH_FINALLY_FREE() because 'reason' might be allocated on the heap and * IGRAPH_FINALLY_FREE() can then clean it up. */ - if (R_igraph_errors_count == 0 || !R_igraph_in_r_check) { - snprintf(R_igraph_error_reason, sizeof(R_igraph_error_reason), + if (Rx_igraph_errors_count == 0 || !Rx_igraph_in_r_check) { + snprintf(Rx_igraph_error_reason, sizeof(Rx_igraph_error_reason), "At %s:%i : %s%s %s", file, line, reason, maybe_add_punctuation(reason, ","), igraph_strerror(igraph_errno)); - R_igraph_error_reason[sizeof(R_igraph_error_reason) - 1] = 0; + Rx_igraph_error_reason[sizeof(Rx_igraph_error_reason) - 1] = 0; // FIXME: This is a hack, we should replace all memory allocations in the // interface with RAII objects, and all longjmps with exceptions. - if (!R_igraph_in_r_check) { + if (!Rx_igraph_in_r_check) { IGRAPH_FINALLY_FREE(); - R_igraph_error(); + Rx_igraph_error(); } } - R_igraph_errors_count++; + Rx_igraph_errors_count++; IGRAPH_FINALLY_FREE(); } -void R_igraph_warning_handler(const char *reason, const char *file, int line) { - if (R_igraph_warnings_count == 0) { - snprintf(R_igraph_warning_reason, sizeof(R_igraph_warning_reason), +void Rx_igraph_warning_handler(const char *reason, const char *file, int line) { + if (Rx_igraph_warnings_count == 0) { + snprintf(Rx_igraph_warning_reason, sizeof(Rx_igraph_warning_reason), "At %s:%i : %s%s", file, line, reason, maybe_add_punctuation(reason, ".")); - R_igraph_warning_reason[sizeof(R_igraph_warning_reason) - 1] = 0; + Rx_igraph_warning_reason[sizeof(Rx_igraph_warning_reason) - 1] = 0; } - R_igraph_warnings_count++; + Rx_igraph_warnings_count++; } extern int R_interrupts_pending; @@ -2370,7 +2370,7 @@ void checkInterruptFn(void *dummy) { R_CheckUserInterrupt(); } -igraph_error_t R_igraph_interrupt_handler(void *data) { +igraph_error_t Rx_igraph_interrupt_handler(void *data) { /* We need to call R_CheckUserInterrupt() regularly to enable interruptions. * However, if an interruption is pending, R_CheckUserInterrupt() will * longjmp back to the top level so we cannot clean up ourselves by calling @@ -2391,7 +2391,7 @@ igraph_error_t R_igraph_interrupt_handler(void *data) { return IGRAPH_SUCCESS; } -igraph_error_t R_igraph_progress_handler(const char *message, double percent, +igraph_error_t Rx_igraph_progress_handler(const char *message, double percent, void * data) { SEXP ec; int ecint; @@ -2411,7 +2411,7 @@ igraph_error_t R_igraph_progress_handler(const char *message, double percent, return ecint; } -igraph_error_t R_igraph_status_handler(const char *message, void *data) { +igraph_error_t Rx_igraph_status_handler(const char *message, void *data) { SEXP l1 = PROTECT(Rf_install("getNamespace")); SEXP l2 = PROTECT(Rf_ScalarString(PROTECT(Rf_mkChar("igraph")))); SEXP l3 = PROTECT(Rf_lang2(l1, l2)); @@ -2426,69 +2426,69 @@ igraph_error_t R_igraph_status_handler(const char *message, void *data) { return 0; } -static R_xlen_t R_igraph_altrep_length(SEXP vec) { +static R_xlen_t Rx_igraph_altrep_length(SEXP vec) { SEXP xp=Rf_findVar(Rf_install("igraph"), R_altrep_data1(vec)); igraph_t *g=(igraph_t*)(R_ExternalPtrAddr(xp)); return igraph_ecount(g); } -static void *R_igraph_altrep_from(SEXP vec, Rboolean writeable) { +static void *Rx_igraph_altrep_from(SEXP vec, Rboolean writeable) { SEXP data=R_altrep_data2(vec); if (data == R_NilValue) { - R_igraph_status_handler("Materializing 'from' vector.\n", NULL); + Rx_igraph_status_handler("Materializing 'from' vector.\n", NULL); SEXP xp=Rf_findVar(Rf_install("igraph"), R_altrep_data1(vec)); igraph_t *g=(igraph_t*)(R_ExternalPtrAddr(xp)); - data=R_igraph_vector_int_to_SEXP(&g->from); + data=Ry_igraph_vector_int_to_SEXP(&g->from); R_set_altrep_data2(vec, data); } return REAL(data); } -static void *R_igraph_altrep_to(SEXP vec, Rboolean writeable) { +static void *Rx_igraph_altrep_to(SEXP vec, Rboolean writeable) { SEXP data=R_altrep_data2(vec); if (data == R_NilValue) { - R_igraph_status_handler("Materializing 'to' vector.\n", NULL); + Rx_igraph_status_handler("Materializing 'to' vector.\n", NULL); SEXP xp=Rf_findVar(Rf_install("igraph"), R_altrep_data1(vec)); igraph_t *g=(igraph_t*)(R_ExternalPtrAddr(xp)); - data=R_igraph_vector_int_to_SEXP(&g->to); + data=Ry_igraph_vector_int_to_SEXP(&g->to); R_set_altrep_data2(vec, data); } return REAL(data); } -static R_altrep_class_t R_igraph_altrep_from_class; -static R_altrep_class_t R_igraph_altrep_to_class; +static R_altrep_class_t Rx_igraph_altrep_from_class; +static R_altrep_class_t Rx_igraph_altrep_to_class; -void R_igraph_init_vector_class(DllInfo *dll) { - R_igraph_altrep_from_class=R_make_altreal_class("igraph_from", "base", dll); - R_igraph_altrep_to_class=R_make_altreal_class("igraph_to", "base", dll); +void Rx_igraph_init_vector_class(DllInfo *dll) { + Rx_igraph_altrep_from_class=R_make_altreal_class("igraph_from", "base", dll); + Rx_igraph_altrep_to_class=R_make_altreal_class("igraph_to", "base", dll); - R_set_altrep_Length_method(R_igraph_altrep_from_class, R_igraph_altrep_length); - R_set_altvec_Dataptr_method(R_igraph_altrep_from_class, R_igraph_altrep_from); + R_set_altrep_Length_method(Rx_igraph_altrep_from_class, Rx_igraph_altrep_length); + R_set_altvec_Dataptr_method(Rx_igraph_altrep_from_class, Rx_igraph_altrep_from); - R_set_altrep_Length_method(R_igraph_altrep_to_class, R_igraph_altrep_length); - R_set_altvec_Dataptr_method(R_igraph_altrep_to_class, R_igraph_altrep_to); + R_set_altrep_Length_method(Rx_igraph_altrep_to_class, Rx_igraph_altrep_length); + R_set_altvec_Dataptr_method(Rx_igraph_altrep_to_class, Rx_igraph_altrep_to); } -void R_igraph_init_handlers(DllInfo *dll) { +void Rx_igraph_init_handlers(DllInfo *dll) { igraph_rng_R_install(); - igraph_set_fatal_handler(R_igraph_fatal_handler); - igraph_set_error_handler(R_igraph_error_handler); - igraph_set_warning_handler(R_igraph_warning_handler); - igraph_set_interruption_handler(R_igraph_interrupt_handler); - igraph_set_attribute_table(&R_igraph_attribute_table); + igraph_set_fatal_handler(Rx_igraph_fatal_handler); + igraph_set_error_handler(Rx_igraph_error_handler); + igraph_set_warning_handler(Rx_igraph_warning_handler); + igraph_set_interruption_handler(Rx_igraph_interrupt_handler); + igraph_set_attribute_table(&Rx_igraph_attribute_table); } SEXP Rx_igraph_set_verbose(SEXP verbose) { if (LOGICAL(verbose)[0]) { - igraph_set_status_handler(R_igraph_status_handler); - igraph_set_progress_handler(R_igraph_progress_handler); + igraph_set_status_handler(Rx_igraph_status_handler); + igraph_set_progress_handler(Rx_igraph_progress_handler); } else { igraph_set_status_handler(0); igraph_set_progress_handler(0); @@ -2513,7 +2513,7 @@ SEXP R_igraph_finalizer(void) { return R_NilValue; } -SEXP R_igraph_check_finally_stack(void) { +SEXP Rx_igraph_check_finally_stack(void) { if (!IGRAPH_FINALLY_STACK_EMPTY) { Rf_error("igraph callbacks cannot call igraph functions"); } @@ -2524,7 +2524,7 @@ SEXP R_igraph_check_finally_stack(void) { * functions to convert igraph objects to SEXP *****************************************************/ -SEXP R_igraph_vector_to_SEXP(const igraph_vector_t *v) { +SEXP Ry_igraph_vector_to_SEXP(const igraph_vector_t *v) { SEXP result; PROTECT(result=NEW_NUMERIC(igraph_vector_size(v))); @@ -2533,7 +2533,7 @@ SEXP R_igraph_vector_to_SEXP(const igraph_vector_t *v) { return result; } -SEXP R_igraph_vector_int_to_SEXP(const igraph_vector_int_t *v) { +SEXP Ry_igraph_vector_int_to_SEXP(const igraph_vector_int_t *v) { SEXP result; igraph_integer_t i, n=igraph_vector_int_size(v); @@ -2545,7 +2545,7 @@ SEXP R_igraph_vector_int_to_SEXP(const igraph_vector_int_t *v) { return result; } -SEXP R_igraph_vector_to_SEXPp1(const igraph_vector_t *v) { +SEXP Ry_igraph_vector_to_SEXPp1(const igraph_vector_t *v) { SEXP result; igraph_integer_t n=igraph_vector_size(v); @@ -2557,7 +2557,7 @@ SEXP R_igraph_vector_to_SEXPp1(const igraph_vector_t *v) { return result; } -SEXP R_igraph_vector_int_to_SEXPp1(const igraph_vector_int_t *v) { +SEXP Ry_igraph_vector_int_to_SEXPp1(const igraph_vector_int_t *v) { SEXP result; igraph_integer_t n=igraph_vector_int_size(v); @@ -2569,10 +2569,10 @@ SEXP R_igraph_vector_int_to_SEXPp1(const igraph_vector_int_t *v) { return result; } -SEXP R_igraph_0orvector_to_SEXP(const igraph_vector_t *v) { +SEXP Ry_igraph_0orvector_to_SEXP(const igraph_vector_t *v) { SEXP result; if (v) { - PROTECT(result=R_igraph_vector_to_SEXP(v)); + PROTECT(result=Ry_igraph_vector_to_SEXP(v)); } else { PROTECT(result=R_NilValue); } @@ -2580,10 +2580,10 @@ SEXP R_igraph_0orvector_to_SEXP(const igraph_vector_t *v) { return result; } -SEXP R_igraph_0orvector_int_to_SEXP(const igraph_vector_int_t *v) { +SEXP Rx_igraph_0orvector_int_to_SEXP(const igraph_vector_int_t *v) { SEXP result; if (v) { - PROTECT(result=R_igraph_vector_int_to_SEXP(v)); + PROTECT(result=Ry_igraph_vector_int_to_SEXP(v)); } else { PROTECT(result=R_NilValue); } @@ -2592,10 +2592,10 @@ SEXP R_igraph_0orvector_int_to_SEXP(const igraph_vector_int_t *v) { } /* The same, plus destroy */ -SEXP R_igraph_0orvector_int_to_SEXP_d(igraph_vector_int_t *v) { +SEXP Rx_igraph_0orvector_int_to_SEXP_d(igraph_vector_int_t *v) { SEXP result; if (v) { - PROTECT(result=R_igraph_vector_int_to_SEXP(v)); + PROTECT(result=Ry_igraph_vector_int_to_SEXP(v)); igraph_vector_int_destroy(v); } else { PROTECT(result=R_NilValue); @@ -2604,10 +2604,10 @@ SEXP R_igraph_0orvector_int_to_SEXP_d(igraph_vector_int_t *v) { return result; } -SEXP R_igraph_0orvector_int_to_SEXPp1(const igraph_vector_int_t *v) { +SEXP Rx_igraph_0orvector_int_to_SEXPp1(const igraph_vector_int_t *v) { SEXP result; if (v) { - PROTECT(result=R_igraph_vector_int_to_SEXPp1(v)); + PROTECT(result=Ry_igraph_vector_int_to_SEXPp1(v)); } else { PROTECT(result=R_NilValue); } @@ -2615,7 +2615,7 @@ SEXP R_igraph_0orvector_int_to_SEXPp1(const igraph_vector_int_t *v) { return result; } -SEXP R_igraph_vector_bool_to_SEXP(const igraph_vector_bool_t *v) { +SEXP Ry_igraph_vector_bool_to_SEXP(const igraph_vector_bool_t *v) { SEXP result; igraph_integer_t n=igraph_vector_bool_size(v); @@ -2632,10 +2632,10 @@ SEXP R_igraph_vector_bool_to_SEXP(const igraph_vector_bool_t *v) { return result; } -SEXP R_igraph_0orvector_bool_to_SEXP(const igraph_vector_bool_t *v) { +SEXP Rx_igraph_0orvector_bool_to_SEXP(const igraph_vector_bool_t *v) { SEXP result; if (v) { - PROTECT(result=R_igraph_vector_bool_to_SEXP(v)); + PROTECT(result=Ry_igraph_vector_bool_to_SEXP(v)); } else { PROTECT(result=R_NilValue); } @@ -2643,7 +2643,7 @@ SEXP R_igraph_0orvector_bool_to_SEXP(const igraph_vector_bool_t *v) { return result; } -SEXP R_igraph_vector_complex_to_SEXP(const igraph_vector_complex_t* v) { +SEXP Rx_igraph_vector_complex_to_SEXP(const igraph_vector_complex_t* v) { igraph_integer_t n=igraph_vector_complex_size(v); SEXP result; PROTECT(result=NEW_COMPLEX(n)); @@ -2652,10 +2652,10 @@ SEXP R_igraph_vector_complex_to_SEXP(const igraph_vector_complex_t* v) { return result; } -SEXP R_igraph_0orvector_complex_to_SEXP(const igraph_vector_complex_t *v) { +SEXP Ry_igraph_0orvector_complex_to_SEXP(const igraph_vector_complex_t *v) { SEXP result; if (v) { - PROTECT(result=R_igraph_vector_complex_to_SEXP(v)); + PROTECT(result=Rx_igraph_vector_complex_to_SEXP(v)); } else { PROTECT(result=R_NilValue); } @@ -2663,7 +2663,7 @@ SEXP R_igraph_0orvector_complex_to_SEXP(const igraph_vector_complex_t *v) { return result; } -SEXP R_igraph_matrix_to_SEXP(const igraph_matrix_t *m) { +SEXP Ry_igraph_matrix_to_SEXP(const igraph_matrix_t *m) { SEXP result, dim; const igraph_integer_t nrow = igraph_matrix_nrow(m); const igraph_integer_t ncol = igraph_matrix_ncol(m); @@ -2688,14 +2688,14 @@ SEXP R_igraph_matrix_to_SEXP(const igraph_matrix_t *m) { return result; } -SEXP R_igraph_0ormatrix_to_SEXP(const igraph_matrix_t *m) { +SEXP Rx_igraph_0ormatrix_to_SEXP(const igraph_matrix_t *m) { if (!m) { return R_NilValue; } - return R_igraph_matrix_to_SEXP(m); + return Ry_igraph_matrix_to_SEXP(m); } -SEXP R_igraph_matrix_int_to_SEXP(const igraph_matrix_int_t *m) { +SEXP Ry_igraph_matrix_int_to_SEXP(const igraph_matrix_int_t *m) { SEXP result, dim; const igraph_integer_t n = igraph_matrix_int_size(m); const igraph_integer_t nrow = igraph_matrix_int_nrow(m); @@ -2723,14 +2723,14 @@ SEXP R_igraph_matrix_int_to_SEXP(const igraph_matrix_int_t *m) { return result; } -SEXP R_igraph_0ormatrix_int_to_SEXP(const igraph_matrix_int_t *m) { +SEXP Rx_igraph_0ormatrix_int_to_SEXP(const igraph_matrix_int_t *m) { if (!m) { return R_NilValue; } - return R_igraph_matrix_int_to_SEXP(m); + return Ry_igraph_matrix_int_to_SEXP(m); } -SEXP R_igraph_matrix_complex_to_SEXP(const igraph_matrix_complex_t *m) { +SEXP Rx_igraph_matrix_complex_to_SEXP(const igraph_matrix_complex_t *m) { SEXP result, dim; const igraph_integer_t nrow = igraph_matrix_complex_nrow(m); const igraph_integer_t ncol = igraph_matrix_complex_ncol(m); @@ -2754,10 +2754,10 @@ SEXP R_igraph_matrix_complex_to_SEXP(const igraph_matrix_complex_t *m) { return result; } -SEXP R_igraph_0ormatrix_complex_to_SEXP(const igraph_matrix_complex_t *m) { +SEXP Ry_igraph_0ormatrix_complex_to_SEXP(const igraph_matrix_complex_t *m) { SEXP result; if (m) { - PROTECT(result=R_igraph_matrix_complex_to_SEXP(m)); + PROTECT(result=Rx_igraph_matrix_complex_to_SEXP(m)); } else { PROTECT(result=R_NilValue); } @@ -2765,7 +2765,7 @@ SEXP R_igraph_0ormatrix_complex_to_SEXP(const igraph_matrix_complex_t *m) { return result; } -SEXP R_igraph_strvector_to_SEXP(const igraph_strvector_t *m) { +SEXP Rx_igraph_strvector_to_SEXP(const igraph_strvector_t *m) { SEXP result;; const char *str; igraph_integer_t len; @@ -2781,28 +2781,28 @@ SEXP R_igraph_strvector_to_SEXP(const igraph_strvector_t *m) { return result; } -SEXP R_igraph_graph_env(SEXP graph) { +SEXP Rx_igraph_graph_env(SEXP graph) { return VECTOR_ELT(graph, igraph_t_idx_env); } static void free_graph(SEXP xp) { - R_igraph_status_handler("Free graph external pointer.\n", NULL); + Rx_igraph_status_handler("Free graph external pointer.\n", NULL); igraph_t *graph = (igraph_t*)(R_ExternalPtrAddr(xp)); igraph_destroy(graph); IGRAPH_FREE(graph); } -void R_igraph_set_pointer(SEXP result, const igraph_t* graph) { +void Rx_igraph_set_pointer(SEXP result, const igraph_t* graph) { int px = 0; igraph_t *pgraph = IGRAPH_CALLOC(1, igraph_t); *pgraph = *graph; - R_igraph_status_handler("Make graph external pointer.\n", NULL); + Rx_igraph_status_handler("Make graph external pointer.\n", NULL); SEXP l1 = PROTECT(Rf_install("igraph")); px++; SEXP l2 = PROTECT(R_MakeExternalPtr(pgraph, R_NilValue, R_NilValue)); px++; - Rf_defineVar(l1, l2, R_igraph_graph_env(result)); + Rf_defineVar(l1, l2, Rx_igraph_graph_env(result)); R_RegisterCFinalizerEx(l2, free_graph, TRUE); UNPROTECT(px); @@ -2812,14 +2812,14 @@ static igraph_error_t restore_pointer(SEXP graph, igraph_t *g) { igraph_integer_t no_of_nodes = REAL(VECTOR_ELT(graph, igraph_t_idx_n))[0]; igraph_bool_t directed = LOGICAL(VECTOR_ELT(graph, igraph_t_idx_directed))[0]; - R_igraph_status_handler("Restore graph external pointer.\n", NULL); + Rx_igraph_status_handler("Restore graph external pointer.\n", NULL); igraph_vector_int_t from; - R_SEXP_to_vector_int_copy(VECTOR_ELT(graph, igraph_t_idx_from), &from); + Rz_SEXP_to_vector_int_copy(VECTOR_ELT(graph, igraph_t_idx_from), &from); IGRAPH_FINALLY_PV(igraph_vector_int_destroy, &from); igraph_vector_int_t to; - R_SEXP_to_vector_int_copy(VECTOR_ELT(graph, igraph_t_idx_to), &to); + Rz_SEXP_to_vector_int_copy(VECTOR_ELT(graph, igraph_t_idx_to), &to); IGRAPH_FINALLY_PV(igraph_vector_int_destroy, &to); igraph_vector_int_t edges; @@ -2843,82 +2843,82 @@ static igraph_error_t restore_pointer(SEXP graph, igraph_t *g) { return IGRAPH_SUCCESS; } -void R_igraph_restore_pointer(SEXP graph) { +void Rx_igraph_restore_pointer(SEXP graph) { igraph_t g; IGRAPH_R_CHECK(restore_pointer(graph, &g)); - R_igraph_set_pointer(graph, &g); + Rx_igraph_set_pointer(graph, &g); } -igraph_t *R_igraph_get_pointer(SEXP graph) { - if (Rf_xlength(graph) != igraph_t_idx_max || !Rf_isEnvironment(R_igraph_graph_env(graph))) { +igraph_t *Rx_igraph_get_pointer(SEXP graph) { + if (Rf_xlength(graph) != igraph_t_idx_max || !Rf_isEnvironment(Rx_igraph_graph_env(graph))) { if (Rf_xlength(graph) == 11) { Rf_error("This graph was created by igraph < 0.2.\n Upgrading this format is not supported, sorry."); } Rf_error("This graph was created by a now unsupported old igraph version.\n Call upgrade_graph() before using igraph functions on that object."); } - SEXP xp=Rf_findVar(Rf_install("igraph"), R_igraph_graph_env(graph)); + SEXP xp=Rf_findVar(Rf_install("igraph"), Rx_igraph_graph_env(graph)); if (xp == R_UnboundValue || xp == R_NilValue) { - R_igraph_restore_pointer(graph); - xp=Rf_findVar(Rf_install("igraph"), R_igraph_graph_env(graph)); + Rx_igraph_restore_pointer(graph); + xp=Rf_findVar(Rf_install("igraph"), Rx_igraph_graph_env(graph)); } igraph_t *pgraph=(igraph_t*)(R_ExternalPtrAddr(xp)); if (!pgraph) { - R_igraph_restore_pointer(graph); - xp=Rf_findVar(Rf_install("igraph"), R_igraph_graph_env(graph)); + Rx_igraph_restore_pointer(graph); + xp=Rf_findVar(Rf_install("igraph"), Rx_igraph_graph_env(graph)); pgraph=(igraph_t*)(R_ExternalPtrAddr(xp)); } return pgraph; } -void R_igraph_set_n(SEXP rgraph, const igraph_t *graph) { +void Rx_igraph_set_n(SEXP rgraph, const igraph_t *graph) { SET_VECTOR_ELT(rgraph, igraph_t_idx_n, NEW_NUMERIC(1)); REAL(VECTOR_ELT(rgraph, igraph_t_idx_n))[0]=igraph_vcount(graph); } -igraph_integer_t R_igraph_get_n(SEXP graph) { - igraph_t *pgraph=R_igraph_get_pointer(graph); +igraph_integer_t Rx_igraph_get_n(SEXP graph) { + igraph_t *pgraph=Rx_igraph_get_pointer(graph); return pgraph->n; } -void R_igraph_set_directed(SEXP rgraph, const igraph_t *graph) { +void Rx_igraph_set_directed(SEXP rgraph, const igraph_t *graph) { SET_VECTOR_ELT(rgraph, igraph_t_idx_directed, NEW_LOGICAL(1)); LOGICAL(VECTOR_ELT(rgraph, igraph_t_idx_directed))[0]=graph->directed; } -igraph_bool_t R_igraph_get_directed(SEXP graph) { - igraph_t *pgraph=R_igraph_get_pointer(graph); +igraph_bool_t Rx_igraph_get_directed(SEXP graph) { + igraph_t *pgraph=Rx_igraph_get_pointer(graph); return pgraph->directed; } -void R_igraph_set_from(SEXP rgraph, const igraph_t *graph) { - SET_VECTOR_ELT(rgraph, igraph_t_idx_from, R_new_altrep(R_igraph_altrep_from_class, R_igraph_graph_env(rgraph), R_NilValue)); +void Rx_igraph_set_from(SEXP rgraph, const igraph_t *graph) { + SET_VECTOR_ELT(rgraph, igraph_t_idx_from, R_new_altrep(Rx_igraph_altrep_from_class, Rx_igraph_graph_env(rgraph), R_NilValue)); } -void R_igraph_get_from(SEXP graph, igraph_vector_int_t* from) { - igraph_t *pgraph=R_igraph_get_pointer(graph); +void Rx_igraph_get_from(SEXP graph, igraph_vector_int_t* from) { + igraph_t *pgraph=Rx_igraph_get_pointer(graph); *from = pgraph->from; } -void R_igraph_set_to(SEXP rgraph, const igraph_t *graph) { - SET_VECTOR_ELT(rgraph, igraph_t_idx_to, R_new_altrep(R_igraph_altrep_to_class, R_igraph_graph_env(rgraph), R_NilValue)); +void Rx_igraph_set_to(SEXP rgraph, const igraph_t *graph) { + SET_VECTOR_ELT(rgraph, igraph_t_idx_to, R_new_altrep(Rx_igraph_altrep_to_class, Rx_igraph_graph_env(rgraph), R_NilValue)); } -void R_igraph_get_to(SEXP graph, igraph_vector_int_t* to) { - igraph_t *pgraph=R_igraph_get_pointer(graph); +void Rx_igraph_get_to(SEXP graph, igraph_vector_int_t* to) { + igraph_t *pgraph=Rx_igraph_get_pointer(graph); *to = pgraph->to; } -SEXP R_igraph_to_SEXP(const igraph_t *graph) { +SEXP Ry_igraph_to_SEXP(const igraph_t *graph) { SEXP result; PROTECT(result=NEW_LIST(igraph_t_idx_max)); - R_igraph_set_n(result, graph); - R_igraph_set_directed(result, graph); + Rx_igraph_set_n(result, graph); + Rx_igraph_set_directed(result, graph); SET_CLASS(result, Rf_ScalarString(Rf_mkChar("igraph"))); @@ -2928,61 +2928,61 @@ SEXP R_igraph_to_SEXP(const igraph_t *graph) { /* Environment for vertex/edge seqs */ SET_VECTOR_ELT(result, igraph_t_idx_env, R_NilValue); Rx_igraph_add_env(result); - R_igraph_set_pointer(result, graph); + Rx_igraph_set_pointer(result, graph); /* Set from and to requires environment */ - R_igraph_set_from(result, graph); - R_igraph_set_to(result, graph); + Rx_igraph_set_from(result, graph); + Rx_igraph_set_to(result, graph); UNPROTECT(1); return result; } -SEXP R_igraph_vector_list_to_SEXP(const igraph_vector_list_t *list) { +SEXP Rx_igraph_vector_list_to_SEXP(const igraph_vector_list_t *list) { SEXP result; igraph_integer_t n=igraph_vector_list_size(list); PROTECT(result=NEW_LIST(n)); for (igraph_integer_t i=0; ileft)); - SET_VECTOR_ELT(result, 1, R_igraph_vector_int_to_SEXP(&hrg->right)); - SET_VECTOR_ELT(result, 2, R_igraph_vector_to_SEXP(&hrg->prob)); - SET_VECTOR_ELT(result, 3, R_igraph_vector_int_to_SEXP(&hrg->edges)); - SET_VECTOR_ELT(result, 4, R_igraph_vector_int_to_SEXP(&hrg->vertices)); + SET_VECTOR_ELT(result, 0, Ry_igraph_vector_int_to_SEXP(&hrg->left)); + SET_VECTOR_ELT(result, 1, Ry_igraph_vector_int_to_SEXP(&hrg->right)); + SET_VECTOR_ELT(result, 2, Ry_igraph_vector_to_SEXP(&hrg->prob)); + SET_VECTOR_ELT(result, 3, Ry_igraph_vector_int_to_SEXP(&hrg->edges)); + SET_VECTOR_ELT(result, 4, Ry_igraph_vector_int_to_SEXP(&hrg->vertices)); PROTECT(names=NEW_CHARACTER(5)); SET_STRING_ELT(names, 0, Rf_mkChar("left")); @@ -3061,20 +3061,20 @@ SEXP R_igraph_hrg_to_SEXP(const igraph_hrg_t *hrg) { return result; } -igraph_error_t R_SEXP_to_hrg_copy(SEXP shrg, igraph_hrg_t *hrg) { - IGRAPH_CHECK(R_SEXP_to_vector_int_copy(VECTOR_ELT(shrg, 0), &hrg->left)); +igraph_error_t Rz_SEXP_to_hrg_copy(SEXP shrg, igraph_hrg_t *hrg) { + IGRAPH_CHECK(Rz_SEXP_to_vector_int_copy(VECTOR_ELT(shrg, 0), &hrg->left)); IGRAPH_FINALLY_PV(igraph_vector_int_destroy, &hrg->left); - IGRAPH_CHECK(R_SEXP_to_vector_int_copy(VECTOR_ELT(shrg, 1), &hrg->right)); + IGRAPH_CHECK(Rz_SEXP_to_vector_int_copy(VECTOR_ELT(shrg, 1), &hrg->right)); IGRAPH_FINALLY_PV(igraph_vector_int_destroy, &hrg->right); - IGRAPH_CHECK(R_SEXP_to_vector_copy(VECTOR_ELT(shrg, 2), &hrg->prob)); + IGRAPH_CHECK(Rz_SEXP_to_vector_copy(VECTOR_ELT(shrg, 2), &hrg->prob)); IGRAPH_FINALLY_PV(igraph_vector_destroy, &hrg->prob); - IGRAPH_CHECK(R_SEXP_to_vector_int_copy(VECTOR_ELT(shrg, 3), &hrg->edges)); + IGRAPH_CHECK(Rz_SEXP_to_vector_int_copy(VECTOR_ELT(shrg, 3), &hrg->edges)); IGRAPH_FINALLY_PV(igraph_vector_int_destroy, &hrg->edges); - IGRAPH_CHECK(R_SEXP_to_vector_int_copy(VECTOR_ELT(shrg, 4), &hrg->vertices)); + IGRAPH_CHECK(Rz_SEXP_to_vector_int_copy(VECTOR_ELT(shrg, 4), &hrg->vertices)); IGRAPH_FINALLY_PV(igraph_vector_int_destroy, &hrg->vertices); IGRAPH_FINALLY_CLEAN(5); @@ -3082,7 +3082,7 @@ igraph_error_t R_SEXP_to_hrg_copy(SEXP shrg, igraph_hrg_t *hrg) { return IGRAPH_SUCCESS; } -SEXP R_igraph_plfit_result_to_SEXP(const igraph_plfit_result_t *plfit) { +SEXP Ry_igraph_plfit_result_to_SEXP(const igraph_plfit_result_t *plfit) { SEXP result, names; PROTECT(result=NEW_LIST(5)); @@ -3104,7 +3104,7 @@ SEXP R_igraph_plfit_result_to_SEXP(const igraph_plfit_result_t *plfit) { return result; } -SEXP R_igraph_maxflow_stats_to_SEXP(const igraph_maxflow_stats_t *st) { +SEXP Ry_igraph_maxflow_stats_to_SEXP(const igraph_maxflow_stats_t *st) { SEXP result, names; PROTECT(result=NEW_LIST(5)); @@ -3134,11 +3134,11 @@ SEXP Rx_igraph_arpack_unpack_complex(SEXP vectors, SEXP values, SEXP nev) { SEXP r_result, r_names; /* Convert input */ - if (0 != R_SEXP_to_igraph_matrix_copy(vectors, &c_vectors)) { + if (0 != Rz_SEXP_to_igraph_matrix_copy(vectors, &c_vectors)) { igraph_error("", __FILE__, __LINE__, IGRAPH_ENOMEM); } IGRAPH_FINALLY_PV(igraph_matrix_destroy, &c_vectors); - if (0 != R_SEXP_to_igraph_matrix_copy(values, &c_values)) { + if (0 != Rz_SEXP_to_igraph_matrix_copy(values, &c_values)) { igraph_error("", __FILE__, __LINE__, IGRAPH_ENOMEM); } IGRAPH_FINALLY_PV(igraph_matrix_destroy, &c_values); @@ -3149,10 +3149,10 @@ SEXP Rx_igraph_arpack_unpack_complex(SEXP vectors, SEXP values, SEXP nev) { /* Convert output */ PROTECT(r_result=NEW_LIST(2)); PROTECT(r_names=NEW_CHARACTER(2)); - PROTECT(vectors=R_igraph_matrix_to_SEXP(&c_vectors)); + PROTECT(vectors=Ry_igraph_matrix_to_SEXP(&c_vectors)); igraph_matrix_destroy(&c_vectors); IGRAPH_FINALLY_CLEAN(1); - PROTECT(values=R_igraph_matrix_to_SEXP(&c_values)); + PROTECT(values=Ry_igraph_matrix_to_SEXP(&c_values)); igraph_matrix_destroy(&c_values); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, vectors); @@ -3166,7 +3166,7 @@ SEXP Rx_igraph_arpack_unpack_complex(SEXP vectors, SEXP values, SEXP nev) { return(r_result); } -SEXP R_igraph_sirlist_to_SEXP(const igraph_vector_ptr_t *sl) { +SEXP Ry_igraph_sirlist_to_SEXP(const igraph_vector_ptr_t *sl) { SEXP result, names; igraph_integer_t n=igraph_vector_ptr_size(sl); PROTECT(result=NEW_LIST(n)); @@ -3181,10 +3181,10 @@ SEXP R_igraph_sirlist_to_SEXP(const igraph_vector_ptr_t *sl) { SEXP tmp; const igraph_sir_t *sir=VECTOR(*sl)[i]; PROTECT(tmp=NEW_LIST(4)); - SET_VECTOR_ELT(tmp, 0, R_igraph_vector_to_SEXP(&sir->times)); - SET_VECTOR_ELT(tmp, 1, R_igraph_vector_int_to_SEXP(&sir->no_s)); - SET_VECTOR_ELT(tmp, 2, R_igraph_vector_int_to_SEXP(&sir->no_i)); - SET_VECTOR_ELT(tmp, 3, R_igraph_vector_int_to_SEXP(&sir->no_r)); + SET_VECTOR_ELT(tmp, 0, Ry_igraph_vector_to_SEXP(&sir->times)); + SET_VECTOR_ELT(tmp, 1, Ry_igraph_vector_int_to_SEXP(&sir->no_s)); + SET_VECTOR_ELT(tmp, 2, Ry_igraph_vector_int_to_SEXP(&sir->no_i)); + SET_VECTOR_ELT(tmp, 3, Ry_igraph_vector_int_to_SEXP(&sir->no_r)); SET_VECTOR_ELT(result, i, tmp); SET_NAMES(tmp, names); UNPROTECT(1); @@ -3194,7 +3194,7 @@ SEXP R_igraph_sirlist_to_SEXP(const igraph_vector_ptr_t *sl) { return result; } -void R_igraph_sirlist_destroy(igraph_vector_ptr_t *sl) { +void Ry_igraph_sirlist_destroy(igraph_vector_ptr_t *sl) { igraph_integer_t n=igraph_vector_ptr_size(sl); for (igraph_integer_t i=0; i 0) { igraph_vector_int_t i, p; igraph_vector_t x; - R_SEXP_to_vector_int_copy(VECTOR_ELT(res, 2), &p); - R_SEXP_to_vector_int_copy(VECTOR_ELT(res, 3), &i); + Rz_SEXP_to_vector_int_copy(VECTOR_ELT(res, 2), &p); + Rz_SEXP_to_vector_int_copy(VECTOR_ELT(res, 3), &i); igraph_vector_view(&x, REAL(VECTOR_ELT(res, 4)), nz); igraph_sparsemat_getelements_sorted(sp, &i, &p, &x); } @@ -3292,23 +3292,23 @@ SEXP R_igraph_sparsemat_to_SEXP_cc(const igraph_sparsemat_t *sp) { return res; } -SEXP R_igraph_sparsemat_to_SEXP(const igraph_sparsemat_t *sp) { +SEXP Ry_igraph_sparsemat_to_SEXP(const igraph_sparsemat_t *sp) { if (igraph_sparsemat_is_triplet(sp)) { - return R_igraph_sparsemat_to_SEXP_triplet(sp); + return Ry_igraph_sparsemat_to_SEXP_triplet(sp); } else { - return R_igraph_sparsemat_to_SEXP_cc(sp); + return Ry_igraph_sparsemat_to_SEXP_cc(sp); } } -SEXP R_igraph_0orsparsemat_to_SEXP(const igraph_sparsemat_t *sp) { +SEXP Rx_igraph_0orsparsemat_to_SEXP(const igraph_sparsemat_t *sp) { if (!sp) { return R_NilValue; } else { - return R_igraph_sparsemat_to_SEXP(sp); + return Ry_igraph_sparsemat_to_SEXP(sp); } } -igraph_error_t R_SEXP_to_igraph_adjlist(SEXP vectorlist, igraph_adjlist_t *ptr) { +igraph_error_t Rz_SEXP_to_igraph_adjlist(SEXP vectorlist, igraph_adjlist_t *ptr) { igraph_integer_t length = Rf_xlength(vectorlist); IGRAPH_CHECK(igraph_adjlist_init_empty(ptr, length)); @@ -3330,7 +3330,7 @@ igraph_error_t R_SEXP_to_igraph_adjlist(SEXP vectorlist, igraph_adjlist_t *ptr) return IGRAPH_SUCCESS; } -void R_igraph_SEXP_to_vector_list(SEXP vectorlist, igraph_vector_list_t *list) { +void Ry_igraph_SEXP_to_vector_list(SEXP vectorlist, igraph_vector_list_t *list) { igraph_integer_t length = Rf_xlength(vectorlist); igraph_vector_t *vecs; @@ -3345,7 +3345,7 @@ void R_igraph_SEXP_to_vector_list(SEXP vectorlist, igraph_vector_list_t *list) { } } -igraph_error_t R_igraph_SEXP_to_vector_int_list(SEXP vectorlist, +igraph_error_t Ry_igraph_SEXP_to_vector_int_list(SEXP vectorlist, igraph_vector_int_list_t *list) { igraph_integer_t length = Rf_xlength(vectorlist); @@ -3368,7 +3368,7 @@ igraph_error_t R_igraph_SEXP_to_vector_int_list(SEXP vectorlist, return IGRAPH_SUCCESS; } -void R_igraph_SEXP_to_matrixlist(SEXP matrixlist, igraph_matrix_list_t *list) { +void Ry_igraph_SEXP_to_matrixlist(SEXP matrixlist, igraph_matrix_list_t *list) { igraph_integer_t length=Rf_xlength(matrixlist); igraph_matrix_t *vecs; @@ -3384,7 +3384,7 @@ void R_igraph_SEXP_to_matrixlist(SEXP matrixlist, igraph_matrix_list_t *list) { } } -igraph_error_t R_igraph_SEXP_to_strvector(SEXP rval, igraph_strvector_t *sv) { +igraph_error_t Rx_igraph_SEXP_to_strvector(SEXP rval, igraph_strvector_t *sv) { const igraph_integer_t length = Rf_xlength(rval); sv->stor_begin=(char**) R_alloc((size_t) length, sizeof(char*)); sv->stor_end=sv->stor_begin+length; @@ -3396,7 +3396,7 @@ igraph_error_t R_igraph_SEXP_to_strvector(SEXP rval, igraph_strvector_t *sv) { return IGRAPH_SUCCESS; } -igraph_error_t R_igraph_SEXP_to_strvector_copy(SEXP rval, igraph_strvector_t *sv) { +igraph_error_t Rx_igraph_SEXP_to_strvector_copy(SEXP rval, igraph_strvector_t *sv) { const igraph_integer_t length = Rf_xlength(rval); IGRAPH_STRVECTOR_INIT_FINALLY(sv, length); for (igraph_integer_t i=0; istor_begin=REAL(sv); v->stor_end=v->stor_begin + Rf_xlength(sv); v->end=v->stor_end; } -igraph_error_t R_SEXP_to_vector_copy(SEXP sv, igraph_vector_t *v) { +igraph_error_t Rz_SEXP_to_vector_copy(SEXP sv, igraph_vector_t *v) { return igraph_vector_init_array(v, REAL(sv), Rf_xlength(sv)); } -void R_SEXP_to_vector_bool(SEXP sv, igraph_vector_bool_t *v) { +void Rz_SEXP_to_vector_bool(SEXP sv, igraph_vector_bool_t *v) { v->stor_begin=LOGICAL(sv); v->stor_end=v->stor_begin + Rf_xlength(sv); v->end=v->stor_end; } -igraph_error_t R_SEXP_to_vector_bool_copy(SEXP sv, igraph_vector_bool_t *v) { +igraph_error_t Rz_SEXP_to_vector_bool_copy(SEXP sv, igraph_vector_bool_t *v) { igraph_integer_t n = Rf_xlength(sv); int *svv=LOGICAL(sv); IGRAPH_CHECK(igraph_vector_bool_init(v, n)); @@ -3432,7 +3432,7 @@ igraph_error_t R_SEXP_to_vector_bool_copy(SEXP sv, igraph_vector_bool_t *v) { return IGRAPH_SUCCESS; } -igraph_error_t R_SEXP_to_vector_int_copy(SEXP sv, igraph_vector_int_t *v) { +igraph_error_t Rz_SEXP_to_vector_int_copy(SEXP sv, igraph_vector_int_t *v) { igraph_integer_t n = Rf_xlength(sv); double *svv=REAL(sv); IGRAPH_CHECK(igraph_vector_int_init(v, n)); @@ -3447,21 +3447,21 @@ igraph_error_t R_SEXP_to_vector_int_copy(SEXP sv, igraph_vector_int_t *v) { return IGRAPH_SUCCESS; } -void R_SEXP_to_matrix(SEXP pakl, igraph_matrix_t *akl) { - R_SEXP_to_vector(pakl, &akl->data); +void Rz_SEXP_to_matrix(SEXP pakl, igraph_matrix_t *akl) { + Rz_SEXP_to_vector(pakl, &akl->data); akl->nrow=INTEGER(GET_DIM(pakl))[0]; akl->ncol=INTEGER(GET_DIM(pakl))[1]; } -igraph_error_t R_SEXP_to_matrix_int(SEXP pakl, igraph_matrix_int_t *akl) { - IGRAPH_CHECK(R_SEXP_to_vector_int_copy(pakl, &akl->data)); +igraph_error_t Rz_SEXP_to_matrix_int(SEXP pakl, igraph_matrix_int_t *akl) { + IGRAPH_CHECK(Rz_SEXP_to_vector_int_copy(pakl, &akl->data)); akl->nrow=INTEGER(GET_DIM(pakl))[0]; akl->ncol=INTEGER(GET_DIM(pakl))[1]; return IGRAPH_SUCCESS; } -igraph_error_t R_SEXP_to_igraph_matrix_copy(SEXP pakl, igraph_matrix_t *akl) { +igraph_error_t Rz_SEXP_to_igraph_matrix_copy(SEXP pakl, igraph_matrix_t *akl) { IGRAPH_CHECK(igraph_vector_init_array(&akl->data, REAL(pakl), Rf_xlength(pakl))); akl->nrow=INTEGER(GET_DIM(pakl))[0]; akl->ncol=INTEGER(GET_DIM(pakl))[1]; @@ -3469,25 +3469,25 @@ igraph_error_t R_SEXP_to_igraph_matrix_copy(SEXP pakl, igraph_matrix_t *akl) { return IGRAPH_SUCCESS; } -void R_SEXP_to_vector_complex(SEXP pv, igraph_vector_complex_t *v) { +void Rz_SEXP_to_vector_complex(SEXP pv, igraph_vector_complex_t *v) { v->stor_begin=(igraph_complex_t*) COMPLEX(pv); v->stor_end=v->stor_begin + Rf_xlength(pv); v->end=v->stor_end; } -igraph_error_t R_SEXP_to_vector_complex_copy(SEXP pv, igraph_vector_complex_t *v) { +igraph_error_t Rz_SEXP_to_vector_complex_copy(SEXP pv, igraph_vector_complex_t *v) { IGRAPH_CHECK(igraph_vector_complex_init_array(v, (igraph_complex_t*) COMPLEX(pv), Rf_xlength(pv))); return IGRAPH_SUCCESS; } -void R_SEXP_to_matrix_complex(SEXP pakl, igraph_matrix_complex_t *akl) { - R_SEXP_to_vector_complex(pakl, &akl->data); +void Rz_SEXP_to_matrix_complex(SEXP pakl, igraph_matrix_complex_t *akl) { + Rz_SEXP_to_vector_complex(pakl, &akl->data); akl->nrow=INTEGER(GET_DIM(pakl))[0]; akl->ncol=INTEGER(GET_DIM(pakl))[1]; } -igraph_error_t R_SEXP_to_matrix_complex_copy(SEXP pakl, igraph_matrix_complex_t *akl) { +igraph_error_t Rz_SEXP_to_matrix_complex_copy(SEXP pakl, igraph_matrix_complex_t *akl) { IGRAPH_CHECK(igraph_vector_complex_init_array(&akl->data, (igraph_complex_t*) COMPLEX(pakl), Rf_xlength(pakl))); @@ -3496,8 +3496,8 @@ igraph_error_t R_SEXP_to_matrix_complex_copy(SEXP pakl, igraph_matrix_complex_t return IGRAPH_SUCCESS; } -igraph_error_t R_SEXP_to_igraph(SEXP graph, igraph_t *res) { - *res = *R_igraph_get_pointer(graph); +igraph_error_t Rz_SEXP_to_igraph(SEXP graph, igraph_t *res) { + *res = *Rx_igraph_get_pointer(graph); /* attributes */ res->attr=VECTOR_ELT(graph, igraph_t_idx_attr); @@ -3505,8 +3505,8 @@ igraph_error_t R_SEXP_to_igraph(SEXP graph, igraph_t *res) { return IGRAPH_SUCCESS; } -igraph_error_t R_SEXP_to_igraph_copy(SEXP graph, igraph_t *res) { - IGRAPH_CHECK(igraph_copy(res, R_igraph_get_pointer(graph))); +igraph_error_t Rz_SEXP_to_igraph_copy(SEXP graph, igraph_t *res) { + IGRAPH_CHECK(igraph_copy(res, Rx_igraph_get_pointer(graph))); /* attributes */ /* FIXME: Why is this necessary? */ @@ -3519,9 +3519,9 @@ igraph_error_t R_SEXP_to_igraph_copy(SEXP graph, igraph_t *res) { * We have only vector type */ -igraph_error_t R_SEXP_to_igraph_vs(SEXP rit, igraph_t *graph, igraph_vs_t *it, igraph_vector_int_t *data) { +igraph_error_t Rz_SEXP_to_igraph_vs(SEXP rit, igraph_t *graph, igraph_vs_t *it, igraph_vector_int_t *data) { - IGRAPH_CHECK(R_SEXP_to_vector_int_copy(rit, data)); + IGRAPH_CHECK(Rz_SEXP_to_vector_int_copy(rit, data)); IGRAPH_CHECK(igraph_vs_vector(it, data)); return IGRAPH_SUCCESS; @@ -3531,62 +3531,62 @@ igraph_error_t R_SEXP_to_igraph_vs(SEXP rit, igraph_t *graph, igraph_vs_t *it, i * We have only vector type */ -igraph_error_t R_SEXP_to_igraph_es(SEXP rit, igraph_t *graph, igraph_es_t *it, igraph_vector_int_t *data) { +igraph_error_t Rz_SEXP_to_igraph_es(SEXP rit, igraph_t *graph, igraph_es_t *it, igraph_vector_int_t *data) { - IGRAPH_CHECK(R_SEXP_to_vector_int_copy(rit, data)); + IGRAPH_CHECK(Rz_SEXP_to_vector_int_copy(rit, data)); IGRAPH_CHECK(igraph_es_vector(it, data)); return IGRAPH_SUCCESS; } -void R_SEXP_to_igraph_layout_drl_options(SEXP in, igraph_layout_drl_options_t *opt) { - opt->edge_cut = REAL(AS_NUMERIC(R_igraph_getListElement(in, "edge.cut")))[0]; - opt->init_iterations = (igraph_integer_t) REAL(AS_NUMERIC(R_igraph_getListElement(in, "init.iterations")))[0]; - opt->init_temperature = REAL(AS_NUMERIC(R_igraph_getListElement(in, "init.temperature")))[0]; - opt->init_attraction = REAL(AS_NUMERIC(R_igraph_getListElement(in, "init.attraction")))[0]; - opt->init_damping_mult = REAL(AS_NUMERIC(R_igraph_getListElement(in, "init.damping.mult")))[0]; - opt->liquid_iterations = (igraph_integer_t) REAL(AS_NUMERIC(R_igraph_getListElement(in, "liquid.iterations")))[0]; - opt->liquid_temperature = REAL(AS_NUMERIC(R_igraph_getListElement(in, "liquid.temperature")))[0]; - opt->liquid_attraction = REAL(AS_NUMERIC(R_igraph_getListElement(in, "liquid.attraction")))[0]; - opt->liquid_damping_mult = REAL(AS_NUMERIC(R_igraph_getListElement(in, "liquid.damping.mult")))[0]; - opt->expansion_iterations = (igraph_integer_t) REAL(AS_NUMERIC(R_igraph_getListElement(in, "expansion.iterations")))[0]; - opt->expansion_temperature = REAL(AS_NUMERIC(R_igraph_getListElement(in, "expansion.temperature")))[0]; - opt->expansion_attraction = REAL(AS_NUMERIC(R_igraph_getListElement(in, "expansion.attraction")))[0]; - opt->expansion_damping_mult = REAL(AS_NUMERIC(R_igraph_getListElement(in, "expansion.damping.mult")))[0]; - opt->cooldown_iterations = (igraph_integer_t) REAL(AS_NUMERIC(R_igraph_getListElement(in, "cooldown.iterations")))[0]; - opt->cooldown_temperature = REAL(AS_NUMERIC(R_igraph_getListElement(in, "cooldown.temperature")))[0]; - opt->cooldown_attraction = REAL(AS_NUMERIC(R_igraph_getListElement(in, "cooldown.attraction")))[0]; - opt->cooldown_damping_mult = REAL(AS_NUMERIC(R_igraph_getListElement(in, "cooldown.damping.mult")))[0]; - opt->crunch_iterations = (igraph_integer_t) REAL(AS_NUMERIC(R_igraph_getListElement(in, "crunch.iterations")))[0]; - opt->crunch_temperature = REAL(AS_NUMERIC(R_igraph_getListElement(in, "crunch.temperature")))[0]; - opt->crunch_attraction = REAL(AS_NUMERIC(R_igraph_getListElement(in, "crunch.attraction")))[0]; - opt->crunch_damping_mult = REAL(AS_NUMERIC(R_igraph_getListElement(in, "crunch.damping.mult")))[0]; - opt->simmer_iterations = (igraph_integer_t) REAL(AS_NUMERIC(R_igraph_getListElement(in, "simmer.iterations")))[0]; - opt->simmer_temperature = REAL(AS_NUMERIC(R_igraph_getListElement(in, "simmer.temperature")))[0]; - opt->simmer_attraction = REAL(AS_NUMERIC(R_igraph_getListElement(in, "simmer.attraction")))[0]; - opt->simmer_damping_mult = REAL(AS_NUMERIC(R_igraph_getListElement(in, "simmer.damping.mult")))[0]; -} - -void R_SEXP_to_igraph_arpack_options(SEXP in, igraph_arpack_options_t *opt) { +void Rz_SEXP_to_igraph_layout_drl_options(SEXP in, igraph_layout_drl_options_t *opt) { + opt->edge_cut = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "edge.cut")))[0]; + opt->init_iterations = (igraph_integer_t) REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "init.iterations")))[0]; + opt->init_temperature = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "init.temperature")))[0]; + opt->init_attraction = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "init.attraction")))[0]; + opt->init_damping_mult = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "init.damping.mult")))[0]; + opt->liquid_iterations = (igraph_integer_t) REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "liquid.iterations")))[0]; + opt->liquid_temperature = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "liquid.temperature")))[0]; + opt->liquid_attraction = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "liquid.attraction")))[0]; + opt->liquid_damping_mult = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "liquid.damping.mult")))[0]; + opt->expansion_iterations = (igraph_integer_t) REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "expansion.iterations")))[0]; + opt->expansion_temperature = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "expansion.temperature")))[0]; + opt->expansion_attraction = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "expansion.attraction")))[0]; + opt->expansion_damping_mult = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "expansion.damping.mult")))[0]; + opt->cooldown_iterations = (igraph_integer_t) REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "cooldown.iterations")))[0]; + opt->cooldown_temperature = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "cooldown.temperature")))[0]; + opt->cooldown_attraction = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "cooldown.attraction")))[0]; + opt->cooldown_damping_mult = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "cooldown.damping.mult")))[0]; + opt->crunch_iterations = (igraph_integer_t) REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "crunch.iterations")))[0]; + opt->crunch_temperature = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "crunch.temperature")))[0]; + opt->crunch_attraction = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "crunch.attraction")))[0]; + opt->crunch_damping_mult = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "crunch.damping.mult")))[0]; + opt->simmer_iterations = (igraph_integer_t) REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "simmer.iterations")))[0]; + opt->simmer_temperature = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "simmer.temperature")))[0]; + opt->simmer_attraction = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "simmer.attraction")))[0]; + opt->simmer_damping_mult = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "simmer.damping.mult")))[0]; +} + +void Rz_SEXP_to_igraph_arpack_options(SEXP in, igraph_arpack_options_t *opt) { const char *tmpstr; igraph_arpack_options_init(opt); opt -> bmat[0] = CHAR(STRING_ELT(AS_CHARACTER - (R_igraph_getListElement(in, "bmat")), 0))[0]; - opt -> n = INTEGER(AS_INTEGER(R_igraph_getListElement(in, "n")))[0]; - tmpstr=CHAR(STRING_ELT(AS_CHARACTER(R_igraph_getListElement(in, "which")), 0)); + (Rx_igraph_getListElement(in, "bmat")), 0))[0]; + opt -> n = INTEGER(AS_INTEGER(Rx_igraph_getListElement(in, "n")))[0]; + tmpstr=CHAR(STRING_ELT(AS_CHARACTER(Rx_igraph_getListElement(in, "which")), 0)); opt -> which[0]=tmpstr[0]; opt -> which[1]=tmpstr[1]; - opt -> nev = INTEGER(AS_INTEGER(R_igraph_getListElement(in, "nev")))[0]; - opt -> tol = REAL(AS_NUMERIC(R_igraph_getListElement(in, "tol")))[0]; - opt -> ncv = INTEGER(AS_INTEGER(R_igraph_getListElement(in, "ncv")))[0]; - opt -> ldv = INTEGER(AS_INTEGER(R_igraph_getListElement(in, "ldv")))[0]; - opt -> ishift = INTEGER(AS_INTEGER(R_igraph_getListElement(in, "ishift")))[0]; - opt -> mxiter = INTEGER(AS_INTEGER(R_igraph_getListElement(in, "maxiter")))[0]; - opt -> nb = INTEGER(AS_INTEGER(R_igraph_getListElement(in, "nb")))[0]; - opt -> mode = INTEGER(AS_INTEGER(R_igraph_getListElement(in, "mode")))[0]; - opt -> start = INTEGER(AS_INTEGER(R_igraph_getListElement(in, "start")))[0]; + opt -> nev = INTEGER(AS_INTEGER(Rx_igraph_getListElement(in, "nev")))[0]; + opt -> tol = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "tol")))[0]; + opt -> ncv = INTEGER(AS_INTEGER(Rx_igraph_getListElement(in, "ncv")))[0]; + opt -> ldv = INTEGER(AS_INTEGER(Rx_igraph_getListElement(in, "ldv")))[0]; + opt -> ishift = INTEGER(AS_INTEGER(Rx_igraph_getListElement(in, "ishift")))[0]; + opt -> mxiter = INTEGER(AS_INTEGER(Rx_igraph_getListElement(in, "maxiter")))[0]; + opt -> nb = INTEGER(AS_INTEGER(Rx_igraph_getListElement(in, "nb")))[0]; + opt -> mode = INTEGER(AS_INTEGER(Rx_igraph_getListElement(in, "mode")))[0]; + opt -> start = INTEGER(AS_INTEGER(Rx_igraph_getListElement(in, "start")))[0]; opt -> lworkl = 0; - opt -> sigma = REAL(AS_NUMERIC(R_igraph_getListElement(in, "sigma")))[0]; - opt -> sigmai = REAL(AS_NUMERIC(R_igraph_getListElement(in, "sigmai")))[0]; + opt -> sigma = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "sigma")))[0]; + opt -> sigmai = REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "sigmai")))[0]; opt -> info = opt -> start; opt->iparam[0]=opt->ishift; @@ -3595,7 +3595,7 @@ void R_SEXP_to_igraph_arpack_options(SEXP in, igraph_arpack_options_t *opt) { opt->iparam[6]=opt->mode; } -SEXP Rx_igraph_arpack_options_to_SEXP(const igraph_arpack_options_t *opt) { +SEXP Ry_igraph_arpack_options_to_SEXP(const igraph_arpack_options_t *opt) { SEXP result, names; char bmat[2], which[3]; @@ -3652,9 +3652,9 @@ SEXP Rx_igraph_arpack_options_to_SEXP(const igraph_arpack_options_t *opt) { return result; } -igraph_error_t R_SEXP_to_igraph_eigen_which(SEXP in, igraph_eigen_which_t *out) { - SEXP pos=PROTECT(AS_CHARACTER(R_igraph_getListElement(in, "pos"))); - SEXP balance=PROTECT(AS_CHARACTER(R_igraph_getListElement(in, "balance"))); +igraph_error_t Rz_SEXP_to_igraph_eigen_which(SEXP in, igraph_eigen_which_t *out) { + SEXP pos=PROTECT(AS_CHARACTER(Rx_igraph_getListElement(in, "pos"))); + SEXP balance=PROTECT(AS_CHARACTER(Rx_igraph_getListElement(in, "balance"))); if (!strcasecmp(CHAR(STRING_ELT(pos, 0)), "lm")) { out->pos=IGRAPH_EIGEN_LM; @@ -3685,12 +3685,12 @@ igraph_error_t R_SEXP_to_igraph_eigen_which(SEXP in, igraph_eigen_which_t *out) IGRAPH_ERROR("Unknown eigenvalue position specification", IGRAPH_EINVAL); } - out->howmany=INTEGER(AS_INTEGER(R_igraph_getListElement(in, "howmany")))[0]; - out->il=INTEGER(AS_INTEGER(R_igraph_getListElement(in, "il")))[0]; - out->iu=INTEGER(AS_INTEGER(R_igraph_getListElement(in, "iu")))[0]; - out->vl=REAL(AS_NUMERIC(R_igraph_getListElement(in, "vl")))[0]; - out->vu=REAL(AS_NUMERIC(R_igraph_getListElement(in, "vu")))[0]; - out->vestimate=INTEGER(AS_INTEGER(R_igraph_getListElement(in, "vestimate")))[0]; + out->howmany=INTEGER(AS_INTEGER(Rx_igraph_getListElement(in, "howmany")))[0]; + out->il=INTEGER(AS_INTEGER(Rx_igraph_getListElement(in, "il")))[0]; + out->iu=INTEGER(AS_INTEGER(Rx_igraph_getListElement(in, "iu")))[0]; + out->vl=REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "vl")))[0]; + out->vu=REAL(AS_NUMERIC(Rx_igraph_getListElement(in, "vu")))[0]; + out->vestimate=INTEGER(AS_INTEGER(Rx_igraph_getListElement(in, "vestimate")))[0]; if (!strcasecmp(CHAR(STRING_ELT(balance, 0)), "none")) { out->balance=IGRAPH_LAPACK_DGEEVX_BALANCE_NONE; @@ -3709,7 +3709,7 @@ igraph_error_t R_SEXP_to_igraph_eigen_which(SEXP in, igraph_eigen_which_t *out) return IGRAPH_SUCCESS; } -SEXP R_igraph_bliss_info_to_SEXP(const igraph_bliss_info_t *info) { +SEXP Ry_igraph_bliss_info_to_SEXP(const igraph_bliss_info_t *info) { SEXP result, names; PROTECT(result=NEW_LIST(6)); @@ -3743,23 +3743,23 @@ SEXP R_igraph_bliss_info_to_SEXP(const igraph_bliss_info_t *info) { SEXP Rx_igraph_copy_from(SEXP graph) { igraph_vector_int_t from; - R_igraph_get_from(graph, &from); - return R_igraph_vector_int_to_SEXP(&from); + Rx_igraph_get_from(graph, &from); + return Ry_igraph_vector_int_to_SEXP(&from); } SEXP Rx_igraph_copy_to(SEXP graph) { igraph_vector_int_t to; - R_igraph_get_to(graph, &to); - return R_igraph_vector_int_to_SEXP(&to); + Rx_igraph_get_to(graph, &to); + return Ry_igraph_vector_int_to_SEXP(&to); } SEXP Rx_igraph_copy_env(SEXP graph) { - return Rf_duplicate(R_igraph_graph_env(graph)); + return Rf_duplicate(Rx_igraph_graph_env(graph)); } -SEXP R_igraph_mybracket(SEXP graph, SEXP pidx) { +SEXP Rx_igraph_mybracket(SEXP graph, SEXP pidx) { int idx=INTEGER(pidx)[0]-1; return Rf_duplicate(VECTOR_ELT(graph, idx)); } @@ -3848,12 +3848,12 @@ SEXP Rx_igraph_add_edges_manual(SEXP graph, SEXP edges) { igraph_t g; SEXP result; - R_SEXP_to_vector_int_copy(edges, &v); + Rz_SEXP_to_vector_int_copy(edges, &v); IGRAPH_FINALLY_PV(igraph_vector_int_destroy, &v); - R_SEXP_to_igraph_copy(graph, &g); + Rz_SEXP_to_igraph_copy(graph, &g); IGRAPH_FINALLY_PV(igraph_destroy, &g); IGRAPH_R_CHECK(igraph_add_edges(&g, &v, 0)); - PROTECT(result=R_igraph_to_SEXP(&g)); + PROTECT(result=Ry_igraph_to_SEXP(&g)); igraph_vector_int_destroy(&v); IGRAPH_FINALLY_CLEAN(1); IGRAPH_I_DESTROY(&g); @@ -3877,9 +3877,9 @@ SEXP Rx_igraph_create(SEXP edges, SEXP pn, SEXP pdirected) { R_check_bool_scalar(pdirected); directed = LOGICAL(pdirected)[0]; - R_SEXP_to_vector_int_copy(edges, &v); + Rz_SEXP_to_vector_int_copy(edges, &v); IGRAPH_R_CHECK(igraph_create(&g, &v, n, directed)); - PROTECT(result=R_igraph_to_SEXP(&g)); + PROTECT(result=Ry_igraph_to_SEXP(&g)); IGRAPH_I_DESTROY(&g); igraph_vector_int_destroy(&v); @@ -3897,9 +3897,9 @@ SEXP Rx_igraph_diameter(SEXP graph, SEXP pdirected, SEXP punconnected, igraph_real_t res; SEXP result; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); if (!Rf_isNull(pweights)) { - R_SEXP_to_vector(pweights, &weights); + Rz_SEXP_to_vector(pweights, &weights); } IGRAPH_R_CHECK(igraph_diameter_dijkstra(&g, Rf_isNull(pweights) ? 0 : &weights, &res, 0, 0, 0, 0, directed, unconnected)); @@ -3921,14 +3921,14 @@ SEXP Rx_igraph_get_diameter(SEXP graph, SEXP pdirected, SEXP punconnected, igraph_real_t dialen; SEXP result; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); if (!Rf_isNull(pweights)) { - R_SEXP_to_vector(pweights, &weights); + Rz_SEXP_to_vector(pweights, &weights); } igraph_vector_int_init(&res, 0); IGRAPH_R_CHECK(igraph_diameter_dijkstra(&g, Rf_isNull(pweights) ? 0 : &weights, &dialen, 0, 0, &res, 0, directed, unconnected)); - PROTECT(result=R_igraph_vector_int_to_SEXP(&res)); + PROTECT(result=Ry_igraph_vector_int_to_SEXP(&res)); igraph_vector_int_destroy(&res); UNPROTECT(1); @@ -3946,9 +3946,9 @@ SEXP Rx_igraph_farthest_points(SEXP graph, SEXP pdirected, SEXP punconnected, igraph_integer_t from, to; SEXP result; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); if (!Rf_isNull(pweights)) { - R_SEXP_to_vector(pweights, &weights); + Rz_SEXP_to_vector(pweights, &weights); } IGRAPH_R_CHECK(igraph_diameter_dijkstra(&g, Rf_isNull(pweights) ? 0 : &weights, &len, &from, &to, 0, 0, directed, unconnected)); @@ -3973,11 +3973,11 @@ SEXP Rx_igraph_subcomponent(SEXP graph, SEXP pvertex, SEXP pmode) { igraph_vector_int_t res; SEXP result; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); igraph_vector_int_init(&res, 0); IGRAPH_R_CHECK(igraph_subcomponent(&g, &res, vertex, mode)); - PROTECT(result=R_igraph_vector_int_to_SEXP(&res)); + PROTECT(result=Ry_igraph_vector_int_to_SEXP(&res)); igraph_vector_int_destroy(&res); UNPROTECT(1); @@ -4028,13 +4028,13 @@ SEXP Rx_igraph_shortest_paths(SEXP graph, SEXP pvids, SEXP pto, igraph_bool_t negw=0; SEXP result; - R_SEXP_to_igraph(graph, &g); - R_SEXP_to_igraph_vs(pvids, &g, &vs, &vs_data); - R_SEXP_to_igraph_vs(pto, &g, &to, &to_data); + Rz_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph_vs(pvids, &g, &vs, &vs_data); + Rz_SEXP_to_igraph_vs(pto, &g, &to, &to_data); if (Rf_isNull(weights)) { pw=0; } else { - R_SEXP_to_vector(weights, &w); + Rz_SEXP_to_vector(weights, &w); negw = igraph_vector_size(&w) > 0 && igraph_vector_min(&w) < 0; } igraph_matrix_init(&res, 0, 0); @@ -4065,7 +4065,7 @@ SEXP Rx_igraph_shortest_paths(SEXP graph, SEXP pvids, SEXP pto, IGRAPH_R_CHECK(igraph_distances_floyd_warshall(&g, &res, vs, to, pw, mode, IGRAPH_FLOYD_WARSHALL_AUTOMATIC)); break; } - PROTECT(result=R_igraph_matrix_to_SEXP(&res)); + PROTECT(result=Ry_igraph_matrix_to_SEXP(&res)); igraph_matrix_destroy(&res); igraph_vector_int_destroy(&to_data); igraph_vector_int_destroy(&vs_data); @@ -4096,18 +4096,18 @@ SEXP Rx_igraph_barabasi_game(SEXP pn, SEXP ppower, SEXP pm, SEXP poutseq, n = (igraph_integer_t) REAL(pn)[0]; if (have_outseq) { - R_SEXP_to_vector_int_copy(poutseq, &outseq); + Rz_SEXP_to_vector_int_copy(poutseq, &outseq); IGRAPH_FINALLY_PV(igraph_vector_int_destroy, &outseq); myoutseq = &outseq; } if (!Rf_isNull(pstart)) { - R_SEXP_to_igraph(pstart, &start); + Rz_SEXP_to_igraph(pstart, &start); ppstart=&start; } IGRAPH_R_CHECK(igraph_barabasi_game(&g, n, power, m, myoutseq, outpref, A, directed, algo, ppstart)); - PROTECT(result=R_igraph_to_SEXP(&g)); + PROTECT(result=Ry_igraph_to_SEXP(&g)); if (have_outseq) { igraph_vector_int_destroy(&outseq); @@ -4138,9 +4138,9 @@ SEXP Rx_igraph_layout_fruchterman_reingold(SEXP graph, SEXP coords, SEXP result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(coords)) { - if (0 != R_SEXP_to_igraph_matrix_copy(coords, &c_coords)) { + if (0 != Rz_SEXP_to_igraph_matrix_copy(coords, &c_coords)) { igraph_error("", __FILE__, __LINE__, IGRAPH_ENOMEM); } } else { @@ -4149,16 +4149,16 @@ SEXP Rx_igraph_layout_fruchterman_reingold(SEXP graph, SEXP coords, IGRAPH_FINALLY_PV(igraph_matrix_destroy, &c_coords); c_niter=(igraph_integer_t) REAL(niter)[0]; c_start_temp=REAL(start_temp)[0]; - if (!Rf_isNull(weights)) { R_SEXP_to_vector(weights, &c_weights); } - if (!Rf_isNull(minx)) { R_SEXP_to_vector(minx, &c_minx); } - if (!Rf_isNull(maxx)) { R_SEXP_to_vector(maxx, &c_maxx); } - if (!Rf_isNull(miny)) { R_SEXP_to_vector(miny, &c_miny); } - if (!Rf_isNull(maxy)) { R_SEXP_to_vector(maxy, &c_maxy); } + if (!Rf_isNull(weights)) { Rz_SEXP_to_vector(weights, &c_weights); } + if (!Rf_isNull(minx)) { Rz_SEXP_to_vector(minx, &c_minx); } + if (!Rf_isNull(maxx)) { Rz_SEXP_to_vector(maxx, &c_maxx); } + if (!Rf_isNull(miny)) { Rz_SEXP_to_vector(miny, &c_miny); } + if (!Rf_isNull(maxy)) { Rz_SEXP_to_vector(maxy, &c_maxy); } /* Call igraph */ IGRAPH_R_CHECK(igraph_layout_fruchterman_reingold(&c_graph, &c_coords, !Rf_isNull(coords), c_niter, c_start_temp, c_grid, (Rf_isNull(weights) ? 0 : &c_weights), (Rf_isNull(minx) ? 0 : &c_minx), (Rf_isNull(maxx) ? 0 : &c_maxx), (Rf_isNull(miny) ? 0 : &c_miny), (Rf_isNull(maxy) ? 0 : &c_maxy))); /* Convert output */ - PROTECT(coords=R_igraph_matrix_to_SEXP(&c_coords)); + PROTECT(coords=Ry_igraph_matrix_to_SEXP(&c_coords)); igraph_matrix_destroy(&c_coords); IGRAPH_FINALLY_CLEAN(1); result=coords; @@ -4188,9 +4188,9 @@ SEXP Rx_igraph_layout_fruchterman_reingold_3d(SEXP graph, SEXP coords, SEXP result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(coords)) { - if (0 != R_SEXP_to_igraph_matrix_copy(coords, &c_coords)) { + if (0 != Rz_SEXP_to_igraph_matrix_copy(coords, &c_coords)) { igraph_error("", __FILE__, __LINE__, IGRAPH_ENOMEM); } } else { @@ -4199,18 +4199,18 @@ SEXP Rx_igraph_layout_fruchterman_reingold_3d(SEXP graph, SEXP coords, IGRAPH_FINALLY_PV(igraph_matrix_destroy, &c_coords); c_niter=(igraph_integer_t) REAL(niter)[0]; c_start_temp=REAL(start_temp)[0]; - if (!Rf_isNull(weights)) { R_SEXP_to_vector(weights, &c_weights); } - if (!Rf_isNull(minx)) { R_SEXP_to_vector(minx, &c_minx); } - if (!Rf_isNull(maxx)) { R_SEXP_to_vector(maxx, &c_maxx); } - if (!Rf_isNull(miny)) { R_SEXP_to_vector(miny, &c_miny); } - if (!Rf_isNull(maxy)) { R_SEXP_to_vector(maxy, &c_maxy); } - if (!Rf_isNull(minz)) { R_SEXP_to_vector(minz, &c_minz); } - if (!Rf_isNull(maxz)) { R_SEXP_to_vector(maxz, &c_maxz); } + if (!Rf_isNull(weights)) { Rz_SEXP_to_vector(weights, &c_weights); } + if (!Rf_isNull(minx)) { Rz_SEXP_to_vector(minx, &c_minx); } + if (!Rf_isNull(maxx)) { Rz_SEXP_to_vector(maxx, &c_maxx); } + if (!Rf_isNull(miny)) { Rz_SEXP_to_vector(miny, &c_miny); } + if (!Rf_isNull(maxy)) { Rz_SEXP_to_vector(maxy, &c_maxy); } + if (!Rf_isNull(minz)) { Rz_SEXP_to_vector(minz, &c_minz); } + if (!Rf_isNull(maxz)) { Rz_SEXP_to_vector(maxz, &c_maxz); } /* Call igraph */ IGRAPH_R_CHECK(igraph_layout_fruchterman_reingold_3d(&c_graph, &c_coords, !Rf_isNull(coords), c_niter, c_start_temp, (Rf_isNull(weights) ? 0 : &c_weights), (Rf_isNull(minx) ? 0 : &c_minx), (Rf_isNull(maxx) ? 0 : &c_maxx), (Rf_isNull(miny) ? 0 : &c_miny), (Rf_isNull(maxy) ? 0 : &c_maxy), (Rf_isNull(minz) ? 0 : &c_minz), (Rf_isNull(maxz) ? 0 : &c_maxz))); /* Convert output */ - PROTECT(coords=R_igraph_matrix_to_SEXP(&c_coords)); + PROTECT(coords=Ry_igraph_matrix_to_SEXP(&c_coords)); igraph_matrix_destroy(&c_coords); IGRAPH_FINALLY_CLEAN(1); result=coords; @@ -4238,9 +4238,9 @@ SEXP Rx_igraph_layout_kamada_kawai(SEXP graph, SEXP coords, SEXP maxiter, SEXP result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(coords)) { - if (0 != R_SEXP_to_igraph_matrix_copy(coords, &c_coords)) { + if (0 != Rz_SEXP_to_igraph_matrix_copy(coords, &c_coords)) { igraph_error("", __FILE__, __LINE__, IGRAPH_ENOMEM); } } else { @@ -4250,16 +4250,16 @@ SEXP Rx_igraph_layout_kamada_kawai(SEXP graph, SEXP coords, SEXP maxiter, c_maxiter=(igraph_integer_t) REAL(maxiter)[0]; c_epsilon=REAL(epsilon)[0]; c_kkconst=REAL(kkconst)[0]; - if (!Rf_isNull(weights)) { R_SEXP_to_vector(weights, &c_weights); } - if (!Rf_isNull(minx)) { R_SEXP_to_vector(minx, &c_minx); } - if (!Rf_isNull(maxx)) { R_SEXP_to_vector(maxx, &c_maxx); } - if (!Rf_isNull(miny)) { R_SEXP_to_vector(miny, &c_miny); } - if (!Rf_isNull(maxy)) { R_SEXP_to_vector(maxy, &c_maxy); } + if (!Rf_isNull(weights)) { Rz_SEXP_to_vector(weights, &c_weights); } + if (!Rf_isNull(minx)) { Rz_SEXP_to_vector(minx, &c_minx); } + if (!Rf_isNull(maxx)) { Rz_SEXP_to_vector(maxx, &c_maxx); } + if (!Rf_isNull(miny)) { Rz_SEXP_to_vector(miny, &c_miny); } + if (!Rf_isNull(maxy)) { Rz_SEXP_to_vector(maxy, &c_maxy); } /* Call igraph */ IGRAPH_R_CHECK(igraph_layout_kamada_kawai(&c_graph, &c_coords, !Rf_isNull(coords), c_maxiter, c_epsilon, c_kkconst, (Rf_isNull(weights) ? 0 : &c_weights), (Rf_isNull(minx) ? 0 : &c_minx), (Rf_isNull(maxx) ? 0 : &c_maxx), (Rf_isNull(miny) ? 0 : &c_miny), (Rf_isNull(maxy) ? 0 : &c_maxy))); /* Convert output */ - PROTECT(coords=R_igraph_matrix_to_SEXP(&c_coords)); + PROTECT(coords=Ry_igraph_matrix_to_SEXP(&c_coords)); igraph_matrix_destroy(&c_coords); IGRAPH_FINALLY_CLEAN(1); result=coords; @@ -4291,9 +4291,9 @@ SEXP Rx_igraph_layout_kamada_kawai_3d(SEXP graph, SEXP coords, SEXP maxiter, SEXP result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(coords)) { - if (0 != R_SEXP_to_igraph_matrix_copy(coords, &c_coords)) { + if (0 != Rz_SEXP_to_igraph_matrix_copy(coords, &c_coords)) { igraph_error("", __FILE__, __LINE__, IGRAPH_ENOMEM); } } else { @@ -4303,18 +4303,18 @@ SEXP Rx_igraph_layout_kamada_kawai_3d(SEXP graph, SEXP coords, SEXP maxiter, c_maxiter=(igraph_integer_t) REAL(maxiter)[0]; c_epsilon=REAL(epsilon)[0]; c_kkconst=REAL(kkconst)[0]; - if (!Rf_isNull(weights)) { R_SEXP_to_vector(weights, &c_weights); } - if (!Rf_isNull(minx)) { R_SEXP_to_vector(minx, &c_minx); } - if (!Rf_isNull(maxx)) { R_SEXP_to_vector(maxx, &c_maxx); } - if (!Rf_isNull(miny)) { R_SEXP_to_vector(miny, &c_miny); } - if (!Rf_isNull(maxy)) { R_SEXP_to_vector(maxy, &c_maxy); } - if (!Rf_isNull(minz)) { R_SEXP_to_vector(minz, &c_minz); } - if (!Rf_isNull(maxz)) { R_SEXP_to_vector(maxz, &c_maxz); } + if (!Rf_isNull(weights)) { Rz_SEXP_to_vector(weights, &c_weights); } + if (!Rf_isNull(minx)) { Rz_SEXP_to_vector(minx, &c_minx); } + if (!Rf_isNull(maxx)) { Rz_SEXP_to_vector(maxx, &c_maxx); } + if (!Rf_isNull(miny)) { Rz_SEXP_to_vector(miny, &c_miny); } + if (!Rf_isNull(maxy)) { Rz_SEXP_to_vector(maxy, &c_maxy); } + if (!Rf_isNull(minz)) { Rz_SEXP_to_vector(minz, &c_minz); } + if (!Rf_isNull(maxz)) { Rz_SEXP_to_vector(maxz, &c_maxz); } /* Call igraph */ IGRAPH_R_CHECK(igraph_layout_kamada_kawai_3d(&c_graph, &c_coords, !Rf_isNull(coords), c_maxiter, c_epsilon, c_kkconst, (Rf_isNull(weights) ? 0 : &c_weights), (Rf_isNull(minx) ? 0 : &c_minx), (Rf_isNull(maxx) ? 0 : &c_maxx), (Rf_isNull(miny) ? 0 : &c_miny), (Rf_isNull(maxy) ? 0 : &c_maxy), (Rf_isNull(minz) ? 0 : &c_minz), (Rf_isNull(maxz) ? 0 : &c_maxz))); /* Convert output */ - PROTECT(coords=R_igraph_matrix_to_SEXP(&c_coords)); + PROTECT(coords=Ry_igraph_matrix_to_SEXP(&c_coords)); igraph_matrix_destroy(&c_coords); IGRAPH_FINALLY_CLEAN(1); result=coords; @@ -4337,14 +4337,14 @@ SEXP Rx_igraph_layout_graphopt(SEXP graph, SEXP pniter, SEXP pcharge, igraph_matrix_t res; SEXP result; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); if (Rf_isNull(start)) { igraph_matrix_init(&res, 0, 0); } else { - R_SEXP_to_igraph_matrix_copy(start, &res); + Rz_SEXP_to_igraph_matrix_copy(start, &res); } IGRAPH_R_CHECK(igraph_layout_graphopt(&g, &res, niter, charge, mass, spring_length, spring_constant, max_sa_movement, !Rf_isNull(start))); - PROTECT(result=R_igraph_matrix_to_SEXP(&res)); + PROTECT(result=Ry_igraph_matrix_to_SEXP(&res)); igraph_matrix_destroy(&res); UNPROTECT(1); @@ -4366,10 +4366,10 @@ SEXP Rx_igraph_layout_lgl(SEXP graph, SEXP pmaxiter, SEXP pmaxdelta, igraph_integer_t root=(igraph_integer_t) REAL(proot)[0]; SEXP result; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); igraph_matrix_init(&res, 0, 0); IGRAPH_R_CHECK(igraph_layout_lgl(&g, &res, maxiter, maxdelta, area, coolexp, repulserad, cellsize, root)); - PROTECT(result=R_igraph_matrix_to_SEXP(&res)); + PROTECT(result=Ry_igraph_matrix_to_SEXP(&res)); igraph_matrix_destroy(&res); UNPROTECT(1); @@ -4383,7 +4383,7 @@ SEXP Rx_igraph_get_shortest_paths(SEXP graph, SEXP pfrom, SEXP pto, igraph_t g; igraph_integer_t from; - IGRAPH_R_CHECK(R_get_int_scalar(pfrom, 0, &from)); + IGRAPH_R_CHECK(Rw_get_int_scalar(pfrom, 0, &from)); igraph_vs_t to; igraph_vector_int_t to_data; igraph_neimode_t mode=(igraph_neimode_t) Rf_asInteger(pmode); @@ -4400,8 +4400,8 @@ SEXP Rx_igraph_get_shortest_paths(SEXP graph, SEXP pfrom, SEXP pto, igraph_integer_t no = (igraph_integer_t) REAL(pno)[0]; - R_SEXP_to_igraph(graph, &g); - R_SEXP_to_igraph_vs(pto, &g, &to, &to_data); + Rz_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph_vs(pto, &g, &to, &to_data); if (verts) { igraph_vector_int_list_init(&list, no); @@ -4413,7 +4413,7 @@ SEXP Rx_igraph_get_shortest_paths(SEXP graph, SEXP pfrom, SEXP pto, if (Rf_isNull(weights)) { pw=0; } else { - R_SEXP_to_vector(weights, &w); + Rz_SEXP_to_vector(weights, &w); negw = igraph_vector_size(&w) > 0 && igraph_vector_min(&w) < 0; } @@ -4448,7 +4448,7 @@ SEXP Rx_igraph_get_shortest_paths(SEXP graph, SEXP pfrom, SEXP pto, SET_VECTOR_ELT(result, 0, NEW_LIST(no)); result1=VECTOR_ELT(result, 0); for (igraph_integer_t i=0; i0) { - R_igraph_SEXP_to_strvector(ppredef, &predef); + Rx_igraph_SEXP_to_strvector(ppredef, &predef); predefptr=&predef; } IGRAPH_R_CHECK(igraph_read_graph_ncol(&g, file, predefptr, names, weights, directed)); fclose(file); - PROTECT(result=R_igraph_to_SEXP(&g)); + PROTECT(result=Ry_igraph_to_SEXP(&g)); IGRAPH_I_DESTROY(&g); UNPROTECT(1); @@ -4738,7 +4738,7 @@ SEXP Rx_igraph_write_graph_ncol(SEXP graph, SEXP file, SEXP pnames, weights=CHAR(STRING_ELT(pweights, 0)); } - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); #if HAVE_OPEN_MEMSTREAM == 1 stream=open_memstream(&bp, &size); #else @@ -4777,7 +4777,7 @@ SEXP Rx_igraph_read_graph_lgl(SEXP pvfile, SEXP pnames, SEXP pweights, SEXP pdir IGRAPH_EFILE); } IGRAPH_R_CHECK(igraph_read_graph_lgl(&g, file, names, weights, directed)); fclose(file); - PROTECT(result=R_igraph_to_SEXP(&g)); + PROTECT(result=Ry_igraph_to_SEXP(&g)); IGRAPH_I_DESTROY(&g); UNPROTECT(1); @@ -4807,7 +4807,7 @@ SEXP Rx_igraph_write_graph_lgl(SEXP graph, SEXP file, SEXP pnames, weights=CHAR(STRING_ELT(pweights, 0)); } - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); #if HAVE_OPEN_MEMSTREAM == 1 stream=open_memstream(&bp, &size); #else @@ -4837,11 +4837,11 @@ SEXP Rx_igraph_decompose(SEXP graph, SEXP pmode, SEXP pmaxcompno, igraph_graph_list_t comps; SEXP result; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); igraph_graph_list_init(&comps, 0); IGRAPH_FINALLY(igraph_graph_list_destroy, &comps); IGRAPH_R_CHECK(igraph_decompose(&g, &comps, mode, maxcompno, minelements)); - PROTECT(result=R_igraph_graphlist_to_SEXP(&comps)); + PROTECT(result=Ry_igraph_graphlist_to_SEXP(&comps)); IGRAPH_FREE(comps.stor_begin); UNPROTECT(1); @@ -4863,10 +4863,10 @@ SEXP Rx_igraph_callaway_traits_game(SEXP pnodes, SEXP ptypes, igraph_bool_t directed=LOGICAL(pdirected)[0]; SEXP result; - R_SEXP_to_vector(ptype_dist, &type_dist); - R_SEXP_to_matrix(pmatrix, &matrix); + Rz_SEXP_to_vector(ptype_dist, &type_dist); + Rz_SEXP_to_matrix(pmatrix, &matrix); IGRAPH_R_CHECK(igraph_callaway_traits_game(&g, nodes, types, epers, &type_dist, &matrix, directed, /* node_type_vec = */ 0)); - PROTECT(result=R_igraph_to_SEXP(&g)); + PROTECT(result=Ry_igraph_to_SEXP(&g)); IGRAPH_I_DESTROY(&g); UNPROTECT(1); @@ -4885,10 +4885,10 @@ SEXP Rx_igraph_establishment_game(SEXP pnodes, SEXP ptypes, SEXP pk, igraph_bool_t directed=LOGICAL(pdirected)[0]; SEXP result; - R_SEXP_to_vector(ptype_dist, &type_dist); - R_SEXP_to_matrix(pmatrix, &matrix); + Rz_SEXP_to_vector(ptype_dist, &type_dist); + Rz_SEXP_to_matrix(pmatrix, &matrix); IGRAPH_R_CHECK(igraph_establishment_game(&g, nodes, types, k, &type_dist, &matrix, directed, /* node_type_vec = */ 0)); - PROTECT(result=R_igraph_to_SEXP(&g)); + PROTECT(result=Ry_igraph_to_SEXP(&g)); IGRAPH_I_DESTROY(&g); UNPROTECT(1); @@ -4907,12 +4907,12 @@ SEXP Rx_igraph_layout_merge_dla(SEXP graphs, SEXP layouts) { igraph_matrix_list_init(&matrixlist, Rf_xlength(layouts)); gras=(igraph_t*)R_alloc((size_t) Rf_xlength(graphs), sizeof(igraph_t)); for (igraph_integer_t i=0; i < Rf_xlength(graphs); i++) { - R_SEXP_to_igraph(VECTOR_ELT(graphs, i), &gras[i]); + Rz_SEXP_to_igraph(VECTOR_ELT(graphs, i), &gras[i]); VECTOR(graphvec)[i]=&gras[i]; } for (igraph_integer_t i=0; i < Rf_xlength(layouts); i++) { igraph_matrix_t source; - R_SEXP_to_matrix(VECTOR_ELT(layouts, i), &source); + Rz_SEXP_to_matrix(VECTOR_ELT(layouts, i), &source); igraph_matrix_t *dest=igraph_matrix_list_get_ptr(&matrixlist, i); igraph_matrix_update(dest, &source); } @@ -4920,7 +4920,7 @@ SEXP Rx_igraph_layout_merge_dla(SEXP graphs, SEXP layouts) { IGRAPH_R_CHECK(igraph_layout_merge_dla(&graphvec, &matrixlist, &res)); igraph_vector_ptr_destroy(&graphvec); igraph_matrix_list_destroy(&matrixlist); - PROTECT(result=R_igraph_matrix_to_SEXP(&res)); + PROTECT(result=Ry_igraph_matrix_to_SEXP(&res)); igraph_matrix_destroy(&res); UNPROTECT(1); @@ -4938,12 +4938,12 @@ SEXP Rx_igraph_disjoint_union(SEXP pgraphs) { graphs=(igraph_t *)R_alloc((size_t) Rf_xlength(pgraphs), sizeof(igraph_t)); for (igraph_integer_t i=0; i < Rf_xlength(pgraphs); i++) { - R_SEXP_to_igraph(VECTOR_ELT(pgraphs, i), &graphs[i]); + Rz_SEXP_to_igraph(VECTOR_ELT(pgraphs, i), &graphs[i]); VECTOR(ptrvec)[i]=&graphs[i]; } IGRAPH_R_CHECK(igraph_disjoint_union_many(&res, &ptrvec)); igraph_vector_ptr_destroy(&ptrvec); - PROTECT(result=R_igraph_to_SEXP(&res)); + PROTECT(result=Ry_igraph_to_SEXP(&res)); IGRAPH_I_DESTROY(&res); UNPROTECT(1); @@ -4963,7 +4963,7 @@ SEXP Rx_igraph_union(SEXP pgraphs, SEXP pedgemaps) { graphs=(igraph_t *)R_alloc((size_t) Rf_xlength(pgraphs), sizeof(igraph_t)); for (igraph_integer_t i=0; i < Rf_xlength(pgraphs); i++) { - R_SEXP_to_igraph(VECTOR_ELT(pgraphs, i), &graphs[i]); + Rz_SEXP_to_igraph(VECTOR_ELT(pgraphs, i), &graphs[i]); VECTOR(ptrvec)[i]=&graphs[i]; } if (edgemaps) { @@ -4972,8 +4972,8 @@ SEXP Rx_igraph_union(SEXP pgraphs, SEXP pedgemaps) { IGRAPH_R_CHECK(igraph_union_many(&res, &ptrvec, my_edgemaps)); igraph_vector_ptr_destroy(&ptrvec); PROTECT(result=NEW_LIST(2)); - SET_VECTOR_ELT(result, 0, R_igraph_to_SEXP(&res)); - SET_VECTOR_ELT(result, 1, R_igraph_0orvector_int_list_to_SEXP(my_edgemaps)); + SET_VECTOR_ELT(result, 0, Ry_igraph_to_SEXP(&res)); + SET_VECTOR_ELT(result, 1, Rx_igraph_0orvector_int_list_to_SEXP(my_edgemaps)); PROTECT(names=NEW_CHARACTER(2)); SET_STRING_ELT(names, 0, Rf_mkChar("graph")); SET_STRING_ELT(names, 1, Rf_mkChar("edgemaps")); @@ -5000,7 +5000,7 @@ SEXP Rx_igraph_intersection(SEXP pgraphs, SEXP pedgemaps) { graphs=(igraph_t *)R_alloc((size_t) Rf_xlength(pgraphs), sizeof(igraph_t)); for (igraph_integer_t i=0; i < Rf_xlength(pgraphs); i++) { - R_SEXP_to_igraph(VECTOR_ELT(pgraphs, i), &graphs[i]); + Rz_SEXP_to_igraph(VECTOR_ELT(pgraphs, i), &graphs[i]); VECTOR(ptrvec)[i]=&graphs[i]; } if (edgemaps) { @@ -5009,8 +5009,8 @@ SEXP Rx_igraph_intersection(SEXP pgraphs, SEXP pedgemaps) { IGRAPH_R_CHECK(igraph_intersection_many(&res, &ptrvec, my_edgemaps)); igraph_vector_ptr_destroy(&ptrvec); PROTECT(result=NEW_LIST(2)); - SET_VECTOR_ELT(result, 0, R_igraph_to_SEXP(&res)); - SET_VECTOR_ELT(result, 1, R_igraph_0orvector_int_list_to_SEXP(my_edgemaps)); + SET_VECTOR_ELT(result, 0, Ry_igraph_to_SEXP(&res)); + SET_VECTOR_ELT(result, 1, Rx_igraph_0orvector_int_list_to_SEXP(my_edgemaps)); PROTECT(names=NEW_CHARACTER(2)); SET_STRING_ELT(names, 0, Rf_mkChar("graph")); SET_STRING_ELT(names, 1, Rf_mkChar("edgemaps")); @@ -5030,10 +5030,10 @@ SEXP Rx_igraph_difference(SEXP pleft, SEXP pright) { igraph_t res; SEXP result; - R_SEXP_to_igraph(pleft, &left); - R_SEXP_to_igraph(pright, &right); + Rz_SEXP_to_igraph(pleft, &left); + Rz_SEXP_to_igraph(pright, &right); IGRAPH_R_CHECK(igraph_difference(&res, &left, &right)); - PROTECT(result=R_igraph_to_SEXP(&res)); + PROTECT(result=Ry_igraph_to_SEXP(&res)); IGRAPH_I_DESTROY(&res); UNPROTECT(1); @@ -5047,9 +5047,9 @@ SEXP Rx_igraph_complementer(SEXP pgraph, SEXP ploops) { igraph_bool_t loops=LOGICAL(ploops)[0]; SEXP result; - R_SEXP_to_igraph(pgraph, &g); + Rz_SEXP_to_igraph(pgraph, &g); IGRAPH_R_CHECK(igraph_complementer(&res, &g, loops)); - PROTECT(result=R_igraph_to_SEXP(&res)); + PROTECT(result=Ry_igraph_to_SEXP(&res)); IGRAPH_I_DESTROY(&res); UNPROTECT(1); @@ -5065,8 +5065,8 @@ SEXP Rx_igraph_compose(SEXP pleft, SEXP pright, SEXP pedgemaps) { igraph_vector_int_t v_edgemap1, *my_edgemap1=edgemaps ? &v_edgemap1 : 0; igraph_vector_int_t v_edgemap2, *my_edgemap2=edgemaps ? &v_edgemap2 : 0; - R_SEXP_to_igraph(pleft, &left); - R_SEXP_to_igraph(pright, &right); + Rz_SEXP_to_igraph(pleft, &left); + Rz_SEXP_to_igraph(pright, &right); if (edgemaps) { igraph_vector_int_init(my_edgemap1, 0); IGRAPH_FINALLY_PV(igraph_vector_int_destroy, my_edgemap1); @@ -5075,15 +5075,15 @@ SEXP Rx_igraph_compose(SEXP pleft, SEXP pright, SEXP pedgemaps) { } IGRAPH_R_CHECK(igraph_compose(&res, &left, &right, my_edgemap1, my_edgemap2)); PROTECT(result=NEW_LIST(3)); - SET_VECTOR_ELT(result, 0, R_igraph_to_SEXP(&res)); + SET_VECTOR_ELT(result, 0, Ry_igraph_to_SEXP(&res)); IGRAPH_I_DESTROY(&res); - SET_VECTOR_ELT(result, 2, R_igraph_0orvector_int_to_SEXP(my_edgemap2)); + SET_VECTOR_ELT(result, 2, Rx_igraph_0orvector_int_to_SEXP(my_edgemap2)); if (edgemaps) { igraph_vector_int_destroy(my_edgemap2); IGRAPH_FINALLY_CLEAN(1); } IGRAPH_I_DESTROY(&res); - SET_VECTOR_ELT(result, 1, R_igraph_0orvector_int_to_SEXP(my_edgemap1)); + SET_VECTOR_ELT(result, 1, Rx_igraph_0orvector_int_to_SEXP(my_edgemap1)); if (edgemaps) { igraph_vector_int_destroy(my_edgemap1); IGRAPH_FINALLY_CLEAN(1); @@ -5119,10 +5119,10 @@ SEXP Rx_igraph_barabasi_aging_game(SEXP pn, SEXP ppa_exp, SEXP paging_exp, igraph_real_t age_coef=REAL(page_coef)[0]; SEXP result; - R_SEXP_to_vector_int_copy(pout_seq, &out_seq); + Rz_SEXP_to_vector_int_copy(pout_seq, &out_seq); IGRAPH_R_CHECK(igraph_barabasi_aging_game(&g, n, m, &out_seq, out_pref, pa_exp, aging_exp, aging_bin, zero_deg_appeal, zero_age_appeal, deg_coef, age_coef, directed)); - PROTECT(result=R_igraph_to_SEXP(&g)); + PROTECT(result=Ry_igraph_to_SEXP(&g)); igraph_vector_int_destroy(&out_seq); IGRAPH_I_DESTROY(&g); @@ -5148,10 +5148,10 @@ SEXP Rx_igraph_recent_degree_aging_game(SEXP pn, SEXP ppa_exp, SEXP paging_exp, igraph_real_t zero_appeal=REAL(pzero_appeal)[0]; SEXP result; - R_SEXP_to_vector_int_copy(pout_seq, &out_seq); + Rz_SEXP_to_vector_int_copy(pout_seq, &out_seq); IGRAPH_R_CHECK(igraph_recent_degree_aging_game(&g, n, m, &out_seq, out_pref, pa_exp, aging_exp, aging_bin, time_window, zero_appeal, directed)); - PROTECT(result=R_igraph_to_SEXP(&g)); + PROTECT(result=Ry_igraph_to_SEXP(&g)); igraph_vector_int_destroy(&out_seq); IGRAPH_I_DESTROY(&g); @@ -5166,7 +5166,7 @@ SEXP Rx_igraph_get_edge(SEXP graph, SEXP peid) { igraph_integer_t from, to; SEXP result; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); IGRAPH_R_CHECK(igraph_edge(&g, eid, &from, &to)); PROTECT(result=NEW_NUMERIC(2)); REAL(result)[0]=from; @@ -5185,12 +5185,12 @@ SEXP Rx_igraph_es_path(SEXP graph, SEXP pp, SEXP pdir) { igraph_vector_int_t res; SEXP result; - R_SEXP_to_igraph(graph, &g); - R_SEXP_to_vector_int_copy(pp, &p); + Rz_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_vector_int_copy(pp, &p); igraph_es_path(&es, &p, dir); igraph_vector_int_init(&res, 0); IGRAPH_R_CHECK(igraph_es_as_vector(&g, es, &res)); - PROTECT(result=R_igraph_vector_int_to_SEXP(&res)); + PROTECT(result=Ry_igraph_vector_int_to_SEXP(&res)); igraph_vector_int_destroy(&res); igraph_vector_int_destroy(&p); igraph_es_destroy(&es); @@ -5208,12 +5208,12 @@ SEXP Rx_igraph_es_pairs(SEXP graph, SEXP pp, SEXP pdir) { igraph_vector_int_t res; SEXP result; - R_SEXP_to_igraph(graph, &g); - R_SEXP_to_vector_int_copy(pp, &p); + Rz_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_vector_int_copy(pp, &p); igraph_es_pairs(&es, &p, dir); igraph_vector_int_init(&res, 0); IGRAPH_R_CHECK(igraph_es_as_vector(&g, es, &res)); - PROTECT(result=R_igraph_vector_int_to_SEXP(&res)); + PROTECT(result=Ry_igraph_vector_int_to_SEXP(&res)); igraph_vector_int_destroy(&res); igraph_vector_int_destroy(&p); igraph_es_destroy(&es); @@ -5233,16 +5233,16 @@ SEXP Rx_igraph_layout_reingold_tilford(SEXP graph, SEXP proot, igraph_vector_int_t rootlevel; SEXP result; - R_SEXP_to_igraph(graph, &g); - R_SEXP_to_vector_int_copy(proot, &root); - R_SEXP_to_vector_int_copy(prootlevel, &rootlevel); + Rz_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_vector_int_copy(proot, &root); + Rz_SEXP_to_vector_int_copy(prootlevel, &rootlevel); igraph_matrix_init(&res, 0, 0); if (!circ) { IGRAPH_R_CHECK(igraph_layout_reingold_tilford(&g, &res, mode, LENGTH(proot)==0 ? 0 : &root, &rootlevel)); } else { IGRAPH_R_CHECK(igraph_layout_reingold_tilford_circular(&g, &res, mode, LENGTH(proot)==0 ? 0 : &root, &rootlevel)); } - PROTECT(result=R_igraph_matrix_to_SEXP(&res)); + PROTECT(result=Ry_igraph_matrix_to_SEXP(&res)); igraph_matrix_destroy(&res); igraph_vector_int_destroy(&root); igraph_vector_int_destroy(&rootlevel); @@ -5262,8 +5262,8 @@ SEXP Rx_igraph_vs_nei(SEXP graph, SEXP px, SEXP pv, SEXP pmode) { igraph_vit_t vv; igraph_vector_int_t neis; - R_SEXP_to_igraph(graph, &g); - R_SEXP_to_igraph_vs(pv, &g, &v, &v_data); + Rz_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph_vs(pv, &g, &v, &v_data); igraph_vector_int_init(&neis, 0); igraph_vit_create(&g, v, &vv); @@ -5305,8 +5305,8 @@ SEXP Rx_igraph_vs_adj(SEXP graph, SEXP px, SEXP pe, SEXP pmode) { igraph_integer_t from, to; igraph_eit_t ee; - R_SEXP_to_igraph(graph, &g); - R_SEXP_to_igraph_es(pe, &g, &e, &e_data); + Rz_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph_es(pe, &g, &e, &e_data); igraph_eit_create(&g, e, &ee); PROTECT(result=NEW_LOGICAL(igraph_vcount(&g))); @@ -5343,8 +5343,8 @@ SEXP Rx_igraph_es_adj(SEXP graph, SEXP x, SEXP pv, SEXP pmode) { igraph_vector_int_t adje; igraph_vit_t vv; - R_SEXP_to_igraph(graph, &g); - R_SEXP_to_igraph_vs(pv, &g, &v, &v_data); + Rz_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph_vs(pv, &g, &v, &v_data); igraph_vit_create(&g, v, &vv); igraph_vector_int_init(&adje, 0); @@ -5380,11 +5380,11 @@ SEXP Rx_igraph_grg_game(SEXP pn, SEXP pradius, SEXP ptorus, igraph_t g; igraph_integer_t n=(igraph_integer_t) REAL(pn)[0]; igraph_real_t radius; - IGRAPH_R_CHECK(R_get_real_scalar(pradius, 0, &radius)); + IGRAPH_R_CHECK(Rw_get_real_scalar(pradius, 0, &radius)); igraph_bool_t torus; - IGRAPH_R_CHECK(R_get_bool_scalar(ptorus, 0, &torus)); + IGRAPH_R_CHECK(Rw_get_bool_scalar(ptorus, 0, &torus)); igraph_bool_t coords; - IGRAPH_R_CHECK(R_get_bool_scalar(pcoords, 0, &coords)); + IGRAPH_R_CHECK(Rw_get_bool_scalar(pcoords, 0, &coords)); igraph_vector_t x, y, *px=0, *py=0; SEXP result; @@ -5394,11 +5394,11 @@ SEXP Rx_igraph_grg_game(SEXP pn, SEXP pradius, SEXP ptorus, } IGRAPH_R_CHECK(igraph_grg_game(&g, n, radius, torus, px, py)); PROTECT(result=NEW_LIST(3)); - SET_VECTOR_ELT(result, 0, R_igraph_to_SEXP(&g)); + SET_VECTOR_ELT(result, 0, Ry_igraph_to_SEXP(&g)); IGRAPH_I_DESTROY(&g); - SET_VECTOR_ELT(result, 1, R_igraph_0orvector_to_SEXP(px)); + SET_VECTOR_ELT(result, 1, Ry_igraph_0orvector_to_SEXP(px)); if (coords) { igraph_vector_destroy(px); } - SET_VECTOR_ELT(result, 2, R_igraph_0orvector_to_SEXP(py)); + SET_VECTOR_ELT(result, 2, Ry_igraph_0orvector_to_SEXP(py)); if (coords) { igraph_vector_destroy(py); } UNPROTECT(1); @@ -5432,9 +5432,9 @@ SEXP Rx_igraph_read_graph_dimacs(SEXP pvfile, SEXP pdirected) { fclose(file); if (!strcmp(igraph_strvector_get(&problem, 0), "max")) { PROTECT(result=NEW_LIST(5)); px++; - SET_VECTOR_ELT(result, 0, R_igraph_strvector_to_SEXP(&problem)); + SET_VECTOR_ELT(result, 0, Rx_igraph_strvector_to_SEXP(&problem)); igraph_strvector_destroy(&problem); - SET_VECTOR_ELT(result, 1, R_igraph_to_SEXP(&g)); + SET_VECTOR_ELT(result, 1, Ry_igraph_to_SEXP(&g)); IGRAPH_I_DESTROY(&g); SET_VECTOR_ELT(result, 2, NEW_NUMERIC(1)); REAL(VECTOR_ELT(result, 2))[0]=source; @@ -5445,11 +5445,11 @@ SEXP Rx_igraph_read_graph_dimacs(SEXP pvfile, SEXP pdirected) { igraph_vector_destroy(&cap); } else if (!strcmp(igraph_strvector_get(&problem, 0), "edge")) { PROTECT(result=NEW_LIST(3)); px++; - SET_VECTOR_ELT(result, 0, R_igraph_strvector_to_SEXP(&problem)); + SET_VECTOR_ELT(result, 0, Rx_igraph_strvector_to_SEXP(&problem)); igraph_strvector_destroy(&problem); - SET_VECTOR_ELT(result, 1, R_igraph_to_SEXP(&g)); + SET_VECTOR_ELT(result, 1, Ry_igraph_to_SEXP(&g)); IGRAPH_I_DESTROY(&g); - SET_VECTOR_ELT(result, 2, R_igraph_vector_int_to_SEXP(&label)); + SET_VECTOR_ELT(result, 2, Ry_igraph_vector_int_to_SEXP(&label)); igraph_vector_int_destroy(&label); } else { /* This shouldn't happen */ @@ -5476,8 +5476,8 @@ SEXP Rx_igraph_write_graph_dimacs(SEXP graph, SEXP file, igraph_vector_t cap; SEXP result; - R_SEXP_to_igraph(graph, &g); - R_SEXP_to_vector(pcap, &cap); + Rz_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_vector(pcap, &cap); #if HAVE_OPEN_MEMSTREAM == 1 stream=open_memstream(&bp, &size); #else @@ -5509,7 +5509,7 @@ SEXP Rx_igraph_st_vertex_connectivity(SEXP graph, SEXP psource, igraph_integer_t res; SEXP result; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); IGRAPH_R_CHECK(igraph_st_vertex_connectivity(&g, &res, source, target, IGRAPH_VCONN_NEI_ERROR)); PROTECT(result=NEW_NUMERIC(1)); @@ -5527,7 +5527,7 @@ SEXP Rx_igraph_st_edge_connectivity(SEXP graph, SEXP psource, SEXP ptarget) { igraph_integer_t value; SEXP result; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); IGRAPH_R_CHECK(igraph_st_edge_connectivity(&g, &value, source, target)); PROTECT(result=NEW_NUMERIC(1)); @@ -5546,9 +5546,9 @@ SEXP Rx_igraph_st_mincut_value(SEXP graph, SEXP psource, SEXP ptarget, igraph_real_t res; SEXP result; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); if (!Rf_isNull(pcapacity)) { - R_SEXP_to_vector(pcapacity, &capacity); + Rz_SEXP_to_vector(pcapacity, &capacity); ppcapacity=&capacity; } IGRAPH_R_CHECK(igraph_st_mincut_value(&g, &res, source, target, ppcapacity)); @@ -5567,7 +5567,7 @@ SEXP Rx_igraph_edge_disjoint_paths(SEXP graph, SEXP psource, SEXP ptarget) { igraph_integer_t res; SEXP result; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); IGRAPH_R_CHECK(igraph_edge_disjoint_paths(&g, &res, source, target)); PROTECT(result=NEW_NUMERIC(1)); REAL(result)[0]=res; @@ -5584,7 +5584,7 @@ SEXP Rx_igraph_vertex_disjoint_paths(SEXP graph, SEXP psource, SEXP ptarget) { igraph_integer_t res; SEXP result; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); IGRAPH_R_CHECK(igraph_vertex_disjoint_paths(&g, &res, source, target)); PROTECT(result=NEW_NUMERIC(1)); REAL(result)[0]=res; @@ -5616,9 +5616,9 @@ SEXP Rx_igraph_spinglass_community(SEXP graph, SEXP weights, igraph_vector_int_t csize; SEXP result, names; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); if (!Rf_isNull(weights)) { - pweights=&v_weights; R_SEXP_to_vector(weights, &v_weights); + pweights=&v_weights; Rz_SEXP_to_vector(weights, &v_weights); } igraph_vector_int_init(&membership, 0); igraph_vector_int_init(&csize, 0); @@ -5626,8 +5626,8 @@ SEXP Rx_igraph_spinglass_community(SEXP graph, SEXP weights, PROTECT(result=NEW_LIST(4)); PROTECT(names=NEW_CHARACTER(4)); - SET_VECTOR_ELT(result, 0, R_igraph_vector_int_to_SEXP(&membership)); - SET_VECTOR_ELT(result, 1, R_igraph_vector_int_to_SEXP(&csize)); + SET_VECTOR_ELT(result, 0, Ry_igraph_vector_int_to_SEXP(&membership)); + SET_VECTOR_ELT(result, 1, Ry_igraph_vector_int_to_SEXP(&csize)); SET_VECTOR_ELT(result, 2, NEW_NUMERIC(1)); SET_VECTOR_ELT(result, 3, NEW_NUMERIC(1)); SET_STRING_ELT(names, 0, Rf_mkChar("membership")); @@ -5662,16 +5662,16 @@ SEXP Rx_igraph_spinglass_my_community(SEXP graph, SEXP weights, SEXP result, names; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); if (!Rf_isNull(weights)) { - pweights=&v_weights; R_SEXP_to_vector(weights, &v_weights); + pweights=&v_weights; Rz_SEXP_to_vector(weights, &v_weights); } igraph_vector_int_init(&community, 0); IGRAPH_R_CHECK(igraph_community_spinglass_single(&g, pweights, vertex, &community, &cohesion, &adhesion, &inner_links, &outer_links, spins, update_rule, gamma)); PROTECT(result=NEW_LIST(5)); PROTECT(names=NEW_CHARACTER(5)); - SET_VECTOR_ELT(result, 0, R_igraph_vector_int_to_SEXP(&community)); + SET_VECTOR_ELT(result, 0, Ry_igraph_vector_int_to_SEXP(&community)); SET_VECTOR_ELT(result, 1, NEW_NUMERIC(1)); SET_VECTOR_ELT(result, 2, NEW_NUMERIC(1)); SET_VECTOR_ELT(result, 3, NEW_NUMERIC(1)); @@ -5700,7 +5700,7 @@ SEXP Rx_igraph_no_components(SEXP graph, SEXP pmode) { igraph_integer_t res; SEXP result; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); IGRAPH_R_CHECK(igraph_connected_components(&g, 0, 0, &res, (igraph_connectedness_t) mode)); PROTECT(result=NEW_NUMERIC(1)); REAL(result)[0]=res; @@ -5720,11 +5720,11 @@ SEXP Rx_igraph_neighborhood_size(SEXP graph, SEXP pvids, SEXP porder, igraph_integer_t mindist=REAL(pmindist)[0]; SEXP result; - R_SEXP_to_igraph(graph, &g); - R_SEXP_to_igraph_vs(pvids, &g, &vids, &vids_data); + Rz_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph_vs(pvids, &g, &vids, &vids_data); igraph_vector_int_init(&res, 0); IGRAPH_R_CHECK(igraph_neighborhood_size(&g, &res, vids, order, mode, mindist)); - PROTECT(result=R_igraph_vector_int_to_SEXP(&res)); + PROTECT(result=Ry_igraph_vector_int_to_SEXP(&res)); igraph_vector_int_destroy(&res); igraph_vector_int_destroy(&vids_data); igraph_vs_destroy(&vids); @@ -5744,11 +5744,11 @@ SEXP Rx_igraph_neighborhood(SEXP graph, SEXP pvids, SEXP porder, igraph_integer_t mindist=REAL(pmindist)[0]; SEXP result; - R_SEXP_to_igraph(graph, &g); - R_SEXP_to_igraph_vs(pvids, &g, &vids, &vids_data); + Rz_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph_vs(pvids, &g, &vids, &vids_data); igraph_vector_int_list_init(&res, 0); IGRAPH_R_CHECK(igraph_neighborhood(&g, &res, vids, order, mode, mindist)); - PROTECT(result=R_igraph_vector_int_list_to_SEXP(&res)); + PROTECT(result=Ry_igraph_vector_int_list_to_SEXP(&res)); igraph_vector_int_list_destroy(&res); igraph_vector_int_destroy(&vids_data); igraph_vs_destroy(&vids); @@ -5768,11 +5768,11 @@ SEXP Rx_igraph_neighborhood_graphs(SEXP graph, SEXP pvids, SEXP porder, igraph_integer_t mindist=REAL(pmindist)[0]; SEXP result; - R_SEXP_to_igraph(graph, &g); - R_SEXP_to_igraph_vs(pvids, &g, &vids, &vids_data); + Rz_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph_vs(pvids, &g, &vids, &vids_data); igraph_graph_list_init(&res, 0); IGRAPH_R_CHECK(igraph_neighborhood_graphs(&g, &res, vids, order, mode, mindist)); - PROTECT(result=R_igraph_graphlist_to_SEXP(&res)); + PROTECT(result=Ry_igraph_graphlist_to_SEXP(&res)); IGRAPH_FREE(res.stor_begin); igraph_vector_int_destroy(&vids_data); igraph_vs_destroy(&vids); @@ -5789,9 +5789,9 @@ SEXP Rx_igraph_connect_neighborhood(SEXP graph, SEXP porder, SEXP pmode) { igraph_neimode_t mode=(igraph_neimode_t) Rf_asInteger(pmode); SEXP result; - R_SEXP_to_igraph_copy(graph, &g); + Rz_SEXP_to_igraph_copy(graph, &g); IGRAPH_R_CHECK(igraph_connect_neighborhood(&g, order, mode)); - PROTECT(result=R_igraph_to_SEXP(&g)); + PROTECT(result=Ry_igraph_to_SEXP(&g)); IGRAPH_I_DESTROY(&g); UNPROTECT(1); @@ -5811,14 +5811,14 @@ SEXP Rx_igraph_watts_strogatz_game(SEXP pdim, SEXP psize, SEXP pnei, SEXP pp, SEXP result; IGRAPH_R_CHECK(igraph_watts_strogatz_game(&g, dim, size, nei, p, loops, multiple)); - PROTECT(result=R_igraph_to_SEXP(&g)); + PROTECT(result=Ry_igraph_to_SEXP(&g)); IGRAPH_I_DESTROY(&g); UNPROTECT(1); return result; } -SEXP R_igraph_maximal_cliques(SEXP graph, SEXP psubset, +SEXP Rx_igraph_maximal_cliques(SEXP graph, SEXP psubset, SEXP pminsize, SEXP pmaxsize) { igraph_t g; @@ -5828,9 +5828,9 @@ SEXP R_igraph_maximal_cliques(SEXP graph, SEXP psubset, igraph_vector_int_t subset; SEXP result; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); if (!Rf_isNull(psubset)) { - R_SEXP_to_vector_int_copy(psubset, &subset); + Rz_SEXP_to_vector_int_copy(psubset, &subset); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&subset, 0)); } @@ -5842,7 +5842,7 @@ SEXP R_igraph_maximal_cliques(SEXP graph, SEXP psubset, igraph_vector_int_destroy(&subset); IGRAPH_FINALLY_CLEAN(1); - PROTECT(result=R_igraph_vector_int_list_to_SEXP(&list)); + PROTECT(result=Ry_igraph_vector_int_list_to_SEXP(&list)); igraph_vector_int_list_destroy(&list); UNPROTECT(1); @@ -5862,9 +5862,9 @@ SEXP Rx_igraph_maximal_cliques_file(SEXP graph, SEXP psubset, SEXP file, size_t size; #endif - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); if (!Rf_isNull(psubset)) { - R_SEXP_to_vector_int_copy(psubset, &subset); + Rz_SEXP_to_vector_int_copy(psubset, &subset); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&subset, 0)); } @@ -5906,9 +5906,9 @@ SEXP Rx_igraph_maximal_cliques_count(SEXP graph, SEXP psubset, SEXP result; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(psubset)) { - R_SEXP_to_vector_int_copy(psubset, &subset); + Rz_SEXP_to_vector_int_copy(psubset, &subset); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&subset, 0)); } @@ -5939,10 +5939,10 @@ SEXP Rx_igraph_independent_vertex_sets(SEXP graph, igraph_integer_t maxsize=(igraph_integer_t) REAL(pmaxsize)[0]; SEXP result; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); igraph_vector_int_list_init(&list, 0); IGRAPH_R_CHECK(igraph_independent_vertex_sets(&g, &list, minsize, maxsize)); - PROTECT(result=R_igraph_vector_int_list_to_SEXP(&list)); + PROTECT(result=Ry_igraph_vector_int_list_to_SEXP(&list)); igraph_vector_int_list_destroy(&list); UNPROTECT(1); @@ -5960,9 +5960,9 @@ SEXP Rx_igraph_lastcit_game(SEXP pnodes, SEXP pedges, SEXP pagebins, igraph_bool_t directed=LOGICAL(pdirected)[0]; SEXP result; - R_SEXP_to_vector(ppreference, &preference); + Rz_SEXP_to_vector(ppreference, &preference); IGRAPH_R_CHECK(igraph_lastcit_game(&g, nodes, edges, agebins, &preference, directed)); - PROTECT(result=R_igraph_to_SEXP(&g)); + PROTECT(result=Ry_igraph_to_SEXP(&g)); IGRAPH_I_DESTROY(&g); UNPROTECT(1); @@ -5979,10 +5979,10 @@ SEXP Rx_igraph_cited_type_game(SEXP pnodes, SEXP pedges, SEXP ptypes, igraph_bool_t directed=LOGICAL(pdirected)[0]; SEXP result; - R_SEXP_to_vector_int_copy(ptypes, &types); - R_SEXP_to_vector(ppref, &pref); + Rz_SEXP_to_vector_int_copy(ptypes, &types); + Rz_SEXP_to_vector(ppref, &pref); IGRAPH_R_CHECK(igraph_cited_type_game(&g, nodes, &types, &pref, edges, directed)); - PROTECT(result=R_igraph_to_SEXP(&g)); + PROTECT(result=Ry_igraph_to_SEXP(&g)); igraph_vector_int_destroy(&types); IGRAPH_I_DESTROY(&g); @@ -6000,10 +6000,10 @@ SEXP Rx_igraph_citing_cited_type_game(SEXP pnodes, SEXP ptypes, SEXP ppref, igraph_bool_t directed=LOGICAL(pdirected)[0]; SEXP result; - R_SEXP_to_vector_int_copy(ptypes, &types); - R_SEXP_to_matrix(ppref, &pref); + Rz_SEXP_to_vector_int_copy(ptypes, &types); + Rz_SEXP_to_matrix(ppref, &pref); IGRAPH_R_CHECK(igraph_citing_cited_type_game(&g, nodes, &types, &pref, edges, directed)); - PROTECT(result=R_igraph_to_SEXP(&g)); + PROTECT(result=Ry_igraph_to_SEXP(&g)); igraph_vector_int_destroy(&types); IGRAPH_I_DESTROY(&g); @@ -6022,10 +6022,10 @@ SEXP Rx_igraph_walktrap_community(SEXP graph, SEXP pweights, igraph_vector_int_t membership; SEXP result, names; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); if (!Rf_isNull(pweights)) { ppweights=&weights; - R_SEXP_to_vector(pweights, ppweights); + Rz_SEXP_to_vector(pweights, ppweights); } igraph_matrix_int_init(&merges, 0, 0); @@ -6036,19 +6036,19 @@ SEXP Rx_igraph_walktrap_community(SEXP graph, SEXP pweights, PROTECT(result=NEW_LIST(3)); if (LOGICAL(pmerges)[0]) { - SET_VECTOR_ELT(result, 0, R_igraph_0ormatrix_int_to_SEXP(&merges)); + SET_VECTOR_ELT(result, 0, Rx_igraph_0ormatrix_int_to_SEXP(&merges)); } else { SET_VECTOR_ELT(result, 0, R_NilValue); } igraph_matrix_int_destroy(&merges); if (LOGICAL(pmodularity)[0]) { - SET_VECTOR_ELT(result, 1, R_igraph_0orvector_to_SEXP(&modularity)); + SET_VECTOR_ELT(result, 1, Ry_igraph_0orvector_to_SEXP(&modularity)); } else { SET_VECTOR_ELT(result, 1, R_NilValue); } igraph_vector_destroy(&modularity); if (LOGICAL(pmembership)[0]) { - SET_VECTOR_ELT(result, 2, R_igraph_0orvector_int_to_SEXP(&membership)); + SET_VECTOR_ELT(result, 2, Rx_igraph_0orvector_int_to_SEXP(&membership)); } else { SET_VECTOR_ELT(result, 2, R_NilValue); } @@ -6078,10 +6078,10 @@ SEXP Rx_igraph_community_edge_betweenness(SEXP graph, SEXP pweights, igraph_bool_t directed=LOGICAL(pdirected)[0]; SEXP result, names; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); if (!Rf_isNull(pweights)) { ppweights=&weights; - R_SEXP_to_vector(pweights, ppweights); + Rz_SEXP_to_vector(pweights, ppweights); } igraph_vector_int_init(&res, 0); if (LOGICAL(peb)[0]) { @@ -6107,17 +6107,17 @@ SEXP Rx_igraph_community_edge_betweenness(SEXP graph, SEXP pweights, IGRAPH_R_CHECK(igraph_community_edge_betweenness(&g, &res, ppeb, ppmerges, ppbridges, ppmodularity, ppmembership, directed, ppweights)); PROTECT(result=NEW_LIST(6)); - SET_VECTOR_ELT(result, 0, R_igraph_vector_int_to_SEXP(&res)); + SET_VECTOR_ELT(result, 0, Ry_igraph_vector_int_to_SEXP(&res)); igraph_vector_int_destroy(&res); - SET_VECTOR_ELT(result, 1, R_igraph_0orvector_to_SEXP(ppeb)); + SET_VECTOR_ELT(result, 1, Ry_igraph_0orvector_to_SEXP(ppeb)); if (ppeb) { igraph_vector_destroy(ppeb); } - SET_VECTOR_ELT(result, 2, R_igraph_0ormatrix_int_to_SEXP(ppmerges)); + SET_VECTOR_ELT(result, 2, Rx_igraph_0ormatrix_int_to_SEXP(ppmerges)); if (ppmerges) { igraph_matrix_int_destroy(ppmerges); } - SET_VECTOR_ELT(result, 3, R_igraph_0orvector_int_to_SEXP(ppbridges)); + SET_VECTOR_ELT(result, 3, Rx_igraph_0orvector_int_to_SEXP(ppbridges)); if (ppbridges) { igraph_vector_int_destroy(ppbridges); } - SET_VECTOR_ELT(result, 4, R_igraph_0orvector_to_SEXP(ppmodularity)); + SET_VECTOR_ELT(result, 4, Ry_igraph_0orvector_to_SEXP(ppmodularity)); if (ppmodularity) { igraph_vector_destroy(ppmodularity); } - SET_VECTOR_ELT(result, 5, R_igraph_0orvector_int_to_SEXP(ppmembership)); + SET_VECTOR_ELT(result, 5, Rx_igraph_0orvector_int_to_SEXP(ppmembership)); if (ppmembership) { igraph_vector_int_destroy(ppmembership); } PROTECT(names=NEW_CHARACTER(6)); SET_STRING_ELT(names, 0, Rf_mkChar("removed.edges")); @@ -6144,9 +6144,9 @@ SEXP Rx_igraph_community_fastgreedy(SEXP graph, SEXP pmerges, SEXP pmodularity, if (!Rf_isNull(pweights)) { ppweights=&weights; - R_SEXP_to_vector(pweights, ppweights); + Rz_SEXP_to_vector(pweights, ppweights); } - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); if (LOGICAL(pmerges)[0]) { ppmerges=&merges; igraph_matrix_int_init(&merges, 0, 0); @@ -6161,11 +6161,11 @@ SEXP Rx_igraph_community_fastgreedy(SEXP graph, SEXP pmerges, SEXP pmodularity, } IGRAPH_R_CHECK(igraph_community_fastgreedy(&g, ppweights, ppmerges, ppmodularity, ppmembership)); PROTECT(result=NEW_LIST(3)); - SET_VECTOR_ELT(result, 0, R_igraph_0ormatrix_int_to_SEXP(ppmerges)); + SET_VECTOR_ELT(result, 0, Rx_igraph_0ormatrix_int_to_SEXP(ppmerges)); if (ppmerges) { igraph_matrix_int_destroy(ppmerges); } - SET_VECTOR_ELT(result, 1, R_igraph_0orvector_to_SEXP(ppmodularity)); + SET_VECTOR_ELT(result, 1, Ry_igraph_0orvector_to_SEXP(ppmodularity)); if (ppmodularity) { igraph_vector_destroy(ppmodularity); } - SET_VECTOR_ELT(result, 2, R_igraph_0orvector_int_to_SEXP(ppmembership)); + SET_VECTOR_ELT(result, 2, Rx_igraph_0orvector_int_to_SEXP(ppmembership)); if (ppmembership) { igraph_vector_int_destroy(ppmembership); } PROTECT(names=NEW_CHARACTER(3)); SET_STRING_ELT(names, 0, Rf_mkChar("merges")); @@ -6177,7 +6177,7 @@ SEXP Rx_igraph_community_fastgreedy(SEXP graph, SEXP pmerges, SEXP pmodularity, return result; } -SEXP R_igraph_community_to_membership(SEXP graph, SEXP pmerges, +SEXP Rx_igraph_community_to_membership(SEXP graph, SEXP pmerges, SEXP psteps, SEXP pmembership, SEXP pcsize) { igraph_t g; @@ -6188,9 +6188,9 @@ SEXP R_igraph_community_to_membership(SEXP graph, SEXP pmerges, igraph_vector_int_t csize, *ppcsize=0; SEXP result, names; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); nodes=igraph_vcount(&g); - R_SEXP_to_matrix_int(pmerges, &merges); + Rz_SEXP_to_matrix_int(pmerges, &merges); if (LOGICAL(pmembership)[0]) { ppmembership=&membership; igraph_vector_int_init(ppmembership, 0); @@ -6201,9 +6201,9 @@ SEXP R_igraph_community_to_membership(SEXP graph, SEXP pmerges, } IGRAPH_R_CHECK(igraph_community_to_membership(&merges, nodes, steps, ppmembership, ppcsize)); PROTECT(result=NEW_LIST(2)); - SET_VECTOR_ELT(result, 0, R_igraph_0orvector_int_to_SEXP(ppmembership)); + SET_VECTOR_ELT(result, 0, Rx_igraph_0orvector_int_to_SEXP(ppmembership)); if (ppmembership) { igraph_vector_int_destroy(ppmembership); } - SET_VECTOR_ELT(result, 1, R_igraph_0orvector_int_to_SEXP(ppcsize)); + SET_VECTOR_ELT(result, 1, Rx_igraph_0orvector_int_to_SEXP(ppcsize)); if (ppcsize) { igraph_vector_int_destroy(ppcsize); } PROTECT(names=NEW_CHARACTER(2)); SET_STRING_ELT(names, 0, Rf_mkChar("membership")); @@ -6223,14 +6223,14 @@ SEXP Rx_igraph_community_to_membership2(SEXP pmerges, SEXP pvcount, igraph_vector_int_t membership; SEXP result; - IGRAPH_R_CHECK(R_SEXP_to_matrix_int(pmerges, &merges)); + IGRAPH_R_CHECK(Rz_SEXP_to_matrix_int(pmerges, &merges)); IGRAPH_FINALLY(igraph_matrix_int_destroy, &merges); IGRAPH_R_CHECK(igraph_vector_int_init(&membership, 0)); IGRAPH_FINALLY_PV(igraph_vector_int_destroy, &membership); IGRAPH_R_CHECK(igraph_community_to_membership(&merges, vcount, steps, &membership, 0)); - PROTECT(result=R_igraph_vector_int_to_SEXP(&membership)); + PROTECT(result=Ry_igraph_vector_int_to_SEXP(&membership)); igraph_matrix_int_destroy(&merges); igraph_vector_int_destroy(&membership); @@ -6247,7 +6247,7 @@ SEXP Rx_igraph_girth(SEXP graph, SEXP pcircle) { igraph_real_t girth; SEXP result, names; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); if (LOGICAL(pcircle)[0]) { igraph_vector_int_init(&circle, 0); ppcircle=&circle; } IGRAPH_R_CHECK(igraph_girth(&g, &girth, ppcircle)); @@ -6255,7 +6255,7 @@ SEXP Rx_igraph_girth(SEXP graph, SEXP pcircle) { PROTECT(result=NEW_LIST(2)); SET_VECTOR_ELT(result, 0, NEW_NUMERIC(1)); REAL(VECTOR_ELT(result, 0))[0]=girth; - SET_VECTOR_ELT(result, 1, R_igraph_0orvector_int_to_SEXPp1(ppcircle)); + SET_VECTOR_ELT(result, 1, Rx_igraph_0orvector_int_to_SEXPp1(ppcircle)); if (ppcircle) { igraph_vector_int_destroy(ppcircle); } PROTECT(names=NEW_CHARACTER(2)); SET_STRING_ELT(names, 0, Rf_mkChar("girth")); @@ -6276,13 +6276,13 @@ SEXP Rx_igraph_get_adjlist(SEXP graph, SEXP pmode, SEXP ploops, SEXP pmultiple) igraph_integer_t loops=(igraph_integer_t) REAL(ploops)[0]; igraph_integer_t multiple=(igraph_integer_t) REAL(pmultiple)[0]; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); no_of_nodes=igraph_vcount(&g); igraph_vector_int_init(&neis, 0); PROTECT(result=NEW_LIST(no_of_nodes)); for (igraph_integer_t i=0; ifun, data->graph, args, data->extra)); - PROTECT(result = R_igraph_safe_eval_in_env(R_fcall, data->rho, NULL)); - cres = Rf_asLogical(R_igraph_handle_safe_eval_result_in_env(result, data->rho)); + PROTECT(result = Rx_igraph_safe_eval_in_env(R_fcall, data->rho, NULL)); + cres = Rf_asLogical(Rx_igraph_handle_safe_eval_result_in_env(result, data->rho)); UNPROTECT(4); return cres ? IGRAPH_STOP : IGRAPH_SUCCESS; } -SEXP R_igraph_bfs(SEXP graph, SEXP proot, SEXP proots, SEXP pmode, +SEXP Rx_igraph_bfs(SEXP graph, SEXP proot, SEXP proots, SEXP pmode, SEXP punreachable, SEXP prestricted, SEXP porder, SEXP prank, SEXP pparent, SEXP ppred, SEXP psucc, SEXP pdist, @@ -6514,18 +6514,18 @@ SEXP R_igraph_bfs(SEXP graph, SEXP proot, SEXP proots, SEXP pmode, igraph_vector_int_t *p_order=0, *p_rank=0, *p_parent=0, *p_pred=0, *p_succ=0, *p_dist=0; igraph_bfshandler_t *callback=0; - R_igraph_i_bfs_data_t cb_data, *p_cb_data=0; + Rx_igraph_i_bfs_data_t cb_data, *p_cb_data=0; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); if (!Rf_isNull(proots)) { - R_SEXP_to_vector_int_copy(proots, &roots); + Rz_SEXP_to_vector_int_copy(proots, &roots); } else { igraph_vector_int_init(&roots, 0); } IGRAPH_FINALLY_PV(igraph_vector_int_destroy, &roots); if (!Rf_isNull(prestricted)) { - R_SEXP_to_vector_int_copy(prestricted, &restricted); + Rz_SEXP_to_vector_int_copy(prestricted, &restricted); } else { igraph_vector_int_init(&restricted, 0); } @@ -6561,7 +6561,7 @@ SEXP R_igraph_bfs(SEXP graph, SEXP proot, SEXP proots, SEXP pmode, cb_data.fun=pcallback; cb_data.extra=pextra; cb_data.rho=prho; - callback=R_igraph_bfshandler; + callback=Rx_igraph_bfshandler; p_cb_data = &cb_data; } @@ -6585,17 +6585,17 @@ SEXP R_igraph_bfs(SEXP graph, SEXP proot, SEXP proots, SEXP pmode, } SET_STRING_ELT(names, 2, Rf_mkChar("order")); - SET_VECTOR_ELT(result, 2, R_igraph_0orvector_int_to_SEXP_d(p_order)); + SET_VECTOR_ELT(result, 2, Rx_igraph_0orvector_int_to_SEXP_d(p_order)); SET_STRING_ELT(names, 3, Rf_mkChar("rank")); - SET_VECTOR_ELT(result, 3, R_igraph_0orvector_int_to_SEXP_d(p_rank)); + SET_VECTOR_ELT(result, 3, Rx_igraph_0orvector_int_to_SEXP_d(p_rank)); SET_STRING_ELT(names, 4, Rf_mkChar("parent")); - SET_VECTOR_ELT(result, 4, R_igraph_0orvector_int_to_SEXP_d(p_parent)); + SET_VECTOR_ELT(result, 4, Rx_igraph_0orvector_int_to_SEXP_d(p_parent)); SET_STRING_ELT(names, 5, Rf_mkChar("pred")); - SET_VECTOR_ELT(result, 5, R_igraph_0orvector_int_to_SEXP_d(p_pred)); + SET_VECTOR_ELT(result, 5, Rx_igraph_0orvector_int_to_SEXP_d(p_pred)); SET_STRING_ELT(names, 6, Rf_mkChar("succ")); - SET_VECTOR_ELT(result, 6, R_igraph_0orvector_int_to_SEXP_d(p_succ)); + SET_VECTOR_ELT(result, 6, Rx_igraph_0orvector_int_to_SEXP_d(p_succ)); SET_STRING_ELT(names, 7, Rf_mkChar("dist")); - SET_VECTOR_ELT(result, 7, R_igraph_0orvector_int_to_SEXP_d(p_dist)); + SET_VECTOR_ELT(result, 7, Rx_igraph_0orvector_int_to_SEXP_d(p_dist)); SET_NAMES(result, names); @@ -6618,15 +6618,15 @@ SEXP R_igraph_bfs(SEXP graph, SEXP proot, SEXP proots, SEXP pmode, typedef struct { SEXP graph, fun_in, fun_out, extra, rho; -} R_igraph_i_dfs_data_t; +} Rx_igraph_i_dfs_data_t; -igraph_error_t R_igraph_dfshandler(const igraph_t *graph, +igraph_error_t Rx_igraph_dfshandler(const igraph_t *graph, igraph_integer_t vid, igraph_integer_t dist, void *extra, int which) { - R_igraph_i_dfs_data_t *data=extra; + Rx_igraph_i_dfs_data_t *data=extra; SEXP args, R_fcall, result, names; igraph_bool_t cres; @@ -6641,27 +6641,27 @@ igraph_error_t R_igraph_dfshandler(const igraph_t *graph, PROTECT(R_fcall = Rf_lang4(which==0 ? data->fun_in : data->fun_out, data->graph, args, data->extra)); - PROTECT(result = R_igraph_safe_eval_in_env(R_fcall, data->rho, NULL)); - cres = Rf_asLogical(R_igraph_handle_safe_eval_result_in_env(result, data->rho)); + PROTECT(result = Rx_igraph_safe_eval_in_env(R_fcall, data->rho, NULL)); + cres = Rf_asLogical(Rx_igraph_handle_safe_eval_result_in_env(result, data->rho)); UNPROTECT(4); return cres ? IGRAPH_STOP : IGRAPH_SUCCESS; } -igraph_error_t R_igraph_dfshandler_in(const igraph_t *graph, +igraph_error_t Rx_igraph_dfshandler_in(const igraph_t *graph, igraph_integer_t vid, igraph_integer_t dist, void *extra) { - return R_igraph_dfshandler(graph, vid, dist, extra, 0); + return Rx_igraph_dfshandler(graph, vid, dist, extra, 0); } -igraph_error_t R_igraph_dfshandler_out(const igraph_t *graph, +igraph_error_t Rx_igraph_dfshandler_out(const igraph_t *graph, igraph_integer_t vid, igraph_integer_t dist, void *extra) { - return R_igraph_dfshandler(graph, vid, dist, extra, 1); + return Rx_igraph_dfshandler(graph, vid, dist, extra, 1); } SEXP Rx_igraph_dfs(SEXP graph, SEXP proot, SEXP pmode, SEXP punreachable, @@ -6678,9 +6678,9 @@ SEXP Rx_igraph_dfs(SEXP graph, SEXP proot, SEXP pmode, SEXP punreachable, igraph_vector_int_t order, order_out, parent, dist; igraph_vector_int_t *p_order=0, *p_order_out=0, *p_parent=0, *p_dist=0; igraph_dfshandler_t *in_callback=0, *out_callback=0; - R_igraph_i_dfs_data_t cb_data, *p_cb_data=0; + Rx_igraph_i_dfs_data_t cb_data, *p_cb_data=0; - R_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_igraph(graph, &g); if (LOGICAL(porder)[0]) { igraph_vector_int_init(&order, 0); p_order=ℴ @@ -6704,10 +6704,10 @@ SEXP Rx_igraph_dfs(SEXP graph, SEXP proot, SEXP pmode, SEXP punreachable, p_cb_data = &cb_data; } if (!Rf_isNull(pin_callback)) { - in_callback=R_igraph_dfshandler_in; + in_callback=Rx_igraph_dfshandler_in; } if (!Rf_isNull(pout_callback)) { - out_callback=R_igraph_dfshandler_out; + out_callback=Rx_igraph_dfshandler_out; } IGRAPH_R_CHECK(igraph_dfs(&g, root, mode, unreachable, p_order, p_order_out, p_parent, p_dist, (igraph_dfshandler_t*) in_callback, (igraph_dfshandler_t*) out_callback, p_cb_data)); @@ -6730,13 +6730,13 @@ SEXP Rx_igraph_dfs(SEXP graph, SEXP proot, SEXP pmode, SEXP punreachable, } SET_STRING_ELT(names, 2, Rf_mkChar("order")); - SET_VECTOR_ELT(result, 2, R_igraph_0orvector_int_to_SEXP_d(p_order)); + SET_VECTOR_ELT(result, 2, Rx_igraph_0orvector_int_to_SEXP_d(p_order)); SET_STRING_ELT(names, 3, Rf_mkChar("order.out")); - SET_VECTOR_ELT(result, 3, R_igraph_0orvector_int_to_SEXP_d(p_order_out)); + SET_VECTOR_ELT(result, 3, Rx_igraph_0orvector_int_to_SEXP_d(p_order_out)); SET_STRING_ELT(names, 4, Rf_mkChar("parent")); - SET_VECTOR_ELT(result, 4, R_igraph_0orvector_int_to_SEXP_d(p_parent)); + SET_VECTOR_ELT(result, 4, Rx_igraph_0orvector_int_to_SEXP_d(p_parent)); SET_STRING_ELT(names, 5, Rf_mkChar("dist")); - SET_VECTOR_ELT(result, 5, R_igraph_0orvector_int_to_SEXP_d(p_dist)); + SET_VECTOR_ELT(result, 5, Rx_igraph_0orvector_int_to_SEXP_d(p_dist)); SET_NAMES(result, names); @@ -6746,10 +6746,10 @@ SEXP Rx_igraph_dfs(SEXP graph, SEXP proot, SEXP pmode, SEXP punreachable, typedef struct { igraph_arpack_function_t *fun; -} R_igraph_i_function_container_t; +} Rx_igraph_i_function_container_t; SEXP Rx_igraph_i_levc_arp(SEXP extP, SEXP extE, SEXP pv) { - R_igraph_i_function_container_t *cont = R_ExternalPtrAddr(extP); + Rx_igraph_i_function_container_t *cont = R_ExternalPtrAddr(extP); igraph_arpack_function_t *fun= cont->fun; void *extra=R_ExternalPtrAddr(extE); SEXP res; @@ -6761,14 +6761,14 @@ SEXP Rx_igraph_i_levc_arp(SEXP extP, SEXP extE, SEXP pv) { return res; } -typedef struct R_igraph_i_levc_data_t { +typedef struct Rx_igraph_i_levc_data_t { SEXP fun; SEXP extra; SEXP rho; SEXP rho2; -} R_igraph_i_levc_data_t; +} Rx_igraph_i_levc_data_t; -igraph_error_t R_igraph_i_levc_callback(const igraph_vector_int_t *membership, +igraph_error_t Rx_igraph_i_levc_callback(const igraph_vector_int_t *membership, igraph_integer_t comm, igraph_real_t eigenvalue, const igraph_vector_t *eigenvector, @@ -6780,20 +6780,20 @@ igraph_error_t R_igraph_i_levc_callback(const igraph_vector_int_t *membership, SEXP R_fcall, R_multip_call; SEXP res, l1, l2, l3; int result; - R_igraph_i_levc_data_t *data=extra; - R_igraph_i_function_container_t cont = { arpack_multiplier }; + Rx_igraph_i_levc_data_t *data=extra; + Rx_igraph_i_function_container_t cont = { arpack_multiplier }; - PROTECT(s_memb=R_igraph_vector_int_to_SEXP(membership)); + PROTECT(s_memb=Ry_igraph_vector_int_to_SEXP(membership)); PROTECT(s_comm=NEW_NUMERIC(1)); REAL(s_comm)[0]=comm; PROTECT(s_evalue=NEW_NUMERIC(1)); REAL(s_evalue)[0]=eigenvalue; - PROTECT(s_evector=R_igraph_vector_to_SEXP(eigenvector)); + PROTECT(s_evector=Ry_igraph_vector_to_SEXP(eigenvector)); PROTECT(l1 = Rf_install("igraph.i.levc.arp")); PROTECT(l2 = R_MakeExternalPtr((void*) &cont, R_NilValue, R_NilValue)); PROTECT(l3 = R_MakeExternalPtr(arpack_extra, R_NilValue, R_NilValue)); PROTECT(R_multip_call = Rf_lang3(l1, l2, l3)); PROTECT(s_multip = Rf_eval(R_multip_call, data->rho2)); - PROTECT(R_fcall = R_igraph_i_lang7(data->fun, s_memb, s_comm, + PROTECT(R_fcall = Rx_igraph_i_lang7(data->fun, s_memb, s_comm, s_evalue, s_evector, s_multip, data->extra)); PROTECT(res = Rf_eval(R_fcall, data->rho)); @@ -6831,20 +6831,20 @@ SEXP Rx_igraph_community_leading_eigenvector(SEXP graph, SEXP steps, SEXP history; SEXP result, names; - R_igraph_i_levc_data_t callback_data = { callback, callback_extra, + Rx_igraph_i_levc_data_t callback_data = { callback, callback_extra, callback_env, callback_env2 }; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); if (!Rf_isNull(weights)) { - pweights=&v_weights; R_SEXP_to_vector(weights, &v_weights); + pweights=&v_weights; Rz_SEXP_to_vector(weights, &v_weights); } if (0 != igraph_matrix_int_init(&c_merges, 0, 0)) { igraph_error("", __FILE__, __LINE__, IGRAPH_ENOMEM); } IGRAPH_FINALLY(igraph_matrix_int_destroy, &c_merges); if (c_start) { - R_SEXP_to_vector_int_copy(pstart, &c_membership); + Rz_SEXP_to_vector_int_copy(pstart, &c_membership); } else { if (0 != igraph_vector_int_init(&c_membership, 0)) { igraph_error("", __FILE__, __LINE__, IGRAPH_ENOMEM); @@ -6852,7 +6852,7 @@ SEXP Rx_igraph_community_leading_eigenvector(SEXP graph, SEXP steps, } IGRAPH_FINALLY_PV(igraph_vector_int_destroy, &c_membership); c_steps=(igraph_integer_t) REAL(steps)[0]; - R_SEXP_to_igraph_arpack_options(options, &c_options); + Rz_SEXP_to_igraph_arpack_options(options, &c_options); if (0 != igraph_vector_init(&c_eigenvalues, 0)) { igraph_error("", __FILE__, __LINE__, IGRAPH_ENOMEM); } @@ -6863,25 +6863,25 @@ SEXP Rx_igraph_community_leading_eigenvector(SEXP graph, SEXP steps, igraph_error("", __FILE__, __LINE__, IGRAPH_ENOMEM); } /* Call igraph */ - IGRAPH_R_CHECK(igraph_community_leading_eigenvector(&c_graph, pweights, &c_merges, &c_membership, c_steps, &c_options, &c_modularity, c_start, &c_eigenvalues, &c_eigenvectors, &c_history, Rf_isNull(callback) ? 0 : R_igraph_i_levc_callback, &callback_data)); + IGRAPH_R_CHECK(igraph_community_leading_eigenvector(&c_graph, pweights, &c_merges, &c_membership, c_steps, &c_options, &c_modularity, c_start, &c_eigenvalues, &c_eigenvectors, &c_history, Rf_isNull(callback) ? 0 : Rx_igraph_i_levc_callback, &callback_data)); /* Convert output */ PROTECT(result=NEW_LIST(7)); PROTECT(names=NEW_CHARACTER(7)); - PROTECT(merges=R_igraph_matrix_int_to_SEXP(&c_merges)); + PROTECT(merges=Ry_igraph_matrix_int_to_SEXP(&c_merges)); igraph_matrix_int_destroy(&c_merges); IGRAPH_FINALLY_CLEAN(1); - PROTECT(membership=R_igraph_vector_int_to_SEXP(&c_membership)); + PROTECT(membership=Ry_igraph_vector_int_to_SEXP(&c_membership)); igraph_vector_int_destroy(&c_membership); IGRAPH_FINALLY_CLEAN(1); - PROTECT(options=Rx_igraph_arpack_options_to_SEXP(&c_options)); + PROTECT(options=Ry_igraph_arpack_options_to_SEXP(&c_options)); PROTECT(modularity=NEW_NUMERIC(1)); REAL(modularity)[0]=c_modularity; - PROTECT(eigenvalues=R_igraph_vector_to_SEXP(&c_eigenvalues)); + PROTECT(eigenvalues=Ry_igraph_vector_to_SEXP(&c_eigenvalues)); igraph_vector_destroy(&c_eigenvalues); - PROTECT(eigenvectors=R_igraph_vector_list_to_SEXP(&c_eigenvectors)); + PROTECT(eigenvectors=Rx_igraph_vector_list_to_SEXP(&c_eigenvectors)); igraph_vector_list_destroy(&c_eigenvectors); - PROTECT(history=R_igraph_vector_to_SEXP(&c_history)); + PROTECT(history=Ry_igraph_vector_to_SEXP(&c_history)); igraph_vector_destroy(&c_history); SET_VECTOR_ELT(result, 0, merges); SET_VECTOR_ELT(result, 1, membership); @@ -6914,13 +6914,13 @@ SEXP Rx_igraph_get_eids(SEXP graph, SEXP pvp, SEXP pdirected, igraph_bool_t err=LOGICAL(perror)[0]; SEXP result; - R_SEXP_to_igraph(graph, &g); - R_SEXP_to_vector_int_copy(pvp, &vp); + Rz_SEXP_to_igraph(graph, &g); + Rz_SEXP_to_vector_int_copy(pvp, &vp); igraph_vector_int_init(&res, 0); IGRAPH_R_CHECK(igraph_get_eids(&g, &res, /*pairs=*/ &vp, directed, err)); - PROTECT(result=R_igraph_vector_int_to_SEXP(&res)); + PROTECT(result=Ry_igraph_vector_int_to_SEXP(&res)); igraph_vector_int_destroy(&vp); igraph_vector_int_destroy(&res); @@ -6948,11 +6948,11 @@ SEXP Rx_igraph_subisomorphic_lad(SEXP pattern, SEXP target, SEXP domains, SEXP result, names; /* Convert input */ - R_SEXP_to_igraph(pattern, &c_pattern); - R_SEXP_to_igraph(target, &c_target); + Rz_SEXP_to_igraph(pattern, &c_pattern); + Rz_SEXP_to_igraph(target, &c_target); if (!Rf_isNull(domains)) { - R_igraph_SEXP_to_vector_int_list(domains, &c_domains); + Ry_igraph_SEXP_to_vector_int_list(domains, &c_domains); } else { igraph_vector_int_list_init(&c_domains, 0); } @@ -6993,14 +6993,14 @@ SEXP Rx_igraph_subisomorphic_lad(SEXP pattern, SEXP target, SEXP domains, PROTECT(iso=NEW_LOGICAL(1)); LOGICAL(iso)[0]=c_iso; if (!Rf_isNull(map)) { - PROTECT(map=R_igraph_0orvector_int_to_SEXP(&c_map)); + PROTECT(map=Rx_igraph_0orvector_int_to_SEXP(&c_map)); igraph_vector_int_destroy(&c_map); IGRAPH_FINALLY_CLEAN(1); } else { PROTECT(map=R_NilValue); } if (!Rf_isNull(maps)) { - PROTECT(maps=R_igraph_0orvector_int_list_to_SEXP(&c_maps)); + PROTECT(maps=Rx_igraph_0orvector_int_list_to_SEXP(&c_maps)); igraph_vector_int_list_destroy(&c_maps); IGRAPH_FINALLY_CLEAN(1); } else { @@ -7034,8 +7034,8 @@ SEXP R_igraph_graphlets(SEXP graph, SEXP weights, SEXP niter) { SEXP result, names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - if (!Rf_isNull(weights)) { R_SEXP_to_vector(weights, &c_weights); } + Rz_SEXP_to_igraph(graph, &c_graph); + if (!Rf_isNull(weights)) { Rz_SEXP_to_vector(weights, &c_weights); } if (0 != igraph_vector_int_list_init(&c_cliques, 0)) { igraph_error("", __FILE__, __LINE__, IGRAPH_ENOMEM); } @@ -7051,10 +7051,10 @@ SEXP R_igraph_graphlets(SEXP graph, SEXP weights, SEXP niter) { /* Convert output */ PROTECT(result=NEW_LIST(2)); PROTECT(names=NEW_CHARACTER(2)); - PROTECT(cliques=R_igraph_vector_int_list_to_SEXPp1(&c_cliques)); + PROTECT(cliques=Ry_igraph_vector_int_list_to_SEXPp1(&c_cliques)); igraph_vector_int_list_destroy(&c_cliques); IGRAPH_FINALLY_CLEAN(1); - PROTECT(Mu=R_igraph_vector_to_SEXP(&c_Mu)); + PROTECT(Mu=Ry_igraph_vector_to_SEXP(&c_Mu)); igraph_vector_destroy(&c_Mu); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(result, 0, cliques); @@ -7091,10 +7091,10 @@ SEXP R_igraph_adjacency_spectral_embedding(SEXP graph, SEXP no, SEXP result, names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); directed=igraph_is_directed(&c_graph); if (!Rf_isNull(pweights)) { - R_SEXP_to_vector(pweights, &weights); + Rz_SEXP_to_vector(pweights, &weights); } c_which=INTEGER(pwhich)[0]; c_no=REAL(no)[0]; @@ -7113,8 +7113,8 @@ SEXP R_igraph_adjacency_spectral_embedding(SEXP graph, SEXP no, igraph_error("", __FILE__, __LINE__, IGRAPH_ENOMEM); } IGRAPH_FINALLY_PV(igraph_vector_destroy, &c_D); - R_SEXP_to_vector(cvec, &c_cvec); - R_SEXP_to_igraph_arpack_options(options, &c_options); + Rz_SEXP_to_vector(cvec, &c_cvec); + Rz_SEXP_to_igraph_arpack_options(options, &c_options); /* Call igraph */ IGRAPH_R_CHECK(igraph_adjacency_spectral_embedding(&c_graph, c_no, Rf_isNull(pweights) ? 0 : &weights, c_which, c_scaled, &c_X, directed ? &c_Y : 0, &c_D, &c_cvec, &c_options)); @@ -7122,20 +7122,20 @@ SEXP R_igraph_adjacency_spectral_embedding(SEXP graph, SEXP no, /* Convert output */ PROTECT(result=NEW_LIST(4)); PROTECT(names=NEW_CHARACTER(4)); - PROTECT(X=R_igraph_matrix_to_SEXP(&c_X)); + PROTECT(X=Ry_igraph_matrix_to_SEXP(&c_X)); igraph_matrix_destroy(&c_X); IGRAPH_FINALLY_CLEAN(1); if (directed) { - PROTECT(Y=R_igraph_matrix_to_SEXP(&c_Y)); + PROTECT(Y=Ry_igraph_matrix_to_SEXP(&c_Y)); igraph_matrix_destroy(&c_Y); IGRAPH_FINALLY_CLEAN(1); } else { PROTECT(Y=R_NilValue); } - PROTECT(D=R_igraph_vector_to_SEXP(&c_D)); + PROTECT(D=Ry_igraph_vector_to_SEXP(&c_D)); igraph_vector_destroy(&c_D); IGRAPH_FINALLY_CLEAN(1); - PROTECT(options=Rx_igraph_arpack_options_to_SEXP(&c_options)); + PROTECT(options=Ry_igraph_arpack_options_to_SEXP(&c_options)); SET_VECTOR_ELT(result, 0, X); SET_VECTOR_ELT(result, 1, Y); SET_VECTOR_ELT(result, 2, D); @@ -7173,10 +7173,10 @@ SEXP R_igraph_laplacian_spectral_embedding(SEXP graph, SEXP no, SEXP result, names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); + Rz_SEXP_to_igraph(graph, &c_graph); directed=igraph_is_directed(&c_graph); c_no=REAL(no)[0]; - if (!Rf_isNull(weights)) { R_SEXP_to_vector(weights, &c_weights); } + if (!Rf_isNull(weights)) { Rz_SEXP_to_vector(weights, &c_weights); } c_which=INTEGER(which)[0]; c_type=(igraph_laplacian_spectral_embedding_type_t) INTEGER(type)[0]; c_scaled=LOGICAL(scaled)[0]; @@ -7194,27 +7194,27 @@ SEXP R_igraph_laplacian_spectral_embedding(SEXP graph, SEXP no, igraph_error("", __FILE__, __LINE__, IGRAPH_ENOMEM); } IGRAPH_FINALLY_PV(igraph_vector_destroy, &c_D); - R_SEXP_to_igraph_arpack_options(options, &c_options); + Rz_SEXP_to_igraph_arpack_options(options, &c_options); /* Call igraph */ IGRAPH_R_CHECK(igraph_laplacian_spectral_embedding(&c_graph, c_no, (Rf_isNull(weights) ? 0 : &c_weights), c_which, c_type, c_scaled, &c_X, directed ? &c_Y : 0, &c_D, &c_options)); /* Convert output */ PROTECT(result=NEW_LIST(4)); PROTECT(names=NEW_CHARACTER(4)); - PROTECT(X=R_igraph_matrix_to_SEXP(&c_X)); + PROTECT(X=Ry_igraph_matrix_to_SEXP(&c_X)); igraph_matrix_destroy(&c_X); IGRAPH_FINALLY_CLEAN(1); if (directed) { - PROTECT(Y=R_igraph_matrix_to_SEXP(&c_Y)); + PROTECT(Y=Ry_igraph_matrix_to_SEXP(&c_Y)); igraph_matrix_destroy(&c_Y); IGRAPH_FINALLY_CLEAN(1); } else { PROTECT(Y=R_NilValue); } - PROTECT(D=R_igraph_0orvector_to_SEXP(&c_D)); + PROTECT(D=Ry_igraph_0orvector_to_SEXP(&c_D)); igraph_vector_destroy(&c_D); IGRAPH_FINALLY_CLEAN(1); - PROTECT(options=Rx_igraph_arpack_options_to_SEXP(&c_options)); + PROTECT(options=Ry_igraph_arpack_options_to_SEXP(&c_options)); SET_VECTOR_ELT(result, 0, X); SET_VECTOR_ELT(result, 1, Y); SET_VECTOR_ELT(result, 2, D); @@ -7230,7 +7230,7 @@ SEXP R_igraph_laplacian_spectral_embedding(SEXP graph, SEXP no, return(result); } -SEXP R_igraph_bipartite_projection(SEXP graph, SEXP types, SEXP probe1, +SEXP Rx_igraph_bipartite_projection(SEXP graph, SEXP types, SEXP probe1, SEXP pwhich) { /* Declarations */ igraph_t c_graph; @@ -7250,8 +7250,8 @@ SEXP R_igraph_bipartite_projection(SEXP graph, SEXP types, SEXP probe1, SEXP result, names; /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - if (!Rf_isNull(types)) { R_SEXP_to_vector_bool(types, &c_types); } + Rz_SEXP_to_igraph(graph, &c_graph); + if (!Rf_isNull(types)) { Rz_SEXP_to_vector_bool(types, &c_types); } if (0 != igraph_vector_int_init(&c_multiplicity1, 0)) { igraph_error("", __FILE__, __LINE__, IGRAPH_ENOMEM); } @@ -7271,7 +7271,7 @@ SEXP R_igraph_bipartite_projection(SEXP graph, SEXP types, SEXP probe1, PROTECT(names=NEW_CHARACTER(4)); if (do_1) { IGRAPH_FINALLY_PV(igraph_destroy, &c_proj1); - PROTECT(proj1=R_igraph_to_SEXP(&c_proj1)); + PROTECT(proj1=Ry_igraph_to_SEXP(&c_proj1)); IGRAPH_I_DESTROY(&c_proj1); IGRAPH_FINALLY_CLEAN(1); } else { @@ -7279,16 +7279,16 @@ SEXP R_igraph_bipartite_projection(SEXP graph, SEXP types, SEXP probe1, } if (do_2) { IGRAPH_FINALLY_PV(igraph_destroy, &c_proj2); - PROTECT(proj2=R_igraph_to_SEXP(&c_proj2)); + PROTECT(proj2=Ry_igraph_to_SEXP(&c_proj2)); IGRAPH_I_DESTROY(&c_proj2); IGRAPH_FINALLY_CLEAN(1); } else { PROTECT(proj2=R_NilValue); } - PROTECT(multiplicity1=R_igraph_0orvector_int_to_SEXP(&c_multiplicity1)); + PROTECT(multiplicity1=Rx_igraph_0orvector_int_to_SEXP(&c_multiplicity1)); igraph_vector_int_destroy(&c_multiplicity1); IGRAPH_FINALLY_CLEAN(1); - PROTECT(multiplicity2=R_igraph_0orvector_int_to_SEXP(&c_multiplicity2)); + PROTECT(multiplicity2=Rx_igraph_0orvector_int_to_SEXP(&c_multiplicity2)); igraph_vector_int_destroy(&c_multiplicity2); IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(result, 0, proj1); @@ -7317,8 +7317,8 @@ SEXP Rx_igraph_adjacent_vertices(SEXP pgraph, SEXP pv, SEXP pmode) { size_t i, n; igraph_lazy_adjlist_t adjlist; - R_SEXP_to_igraph(pgraph, &graph); - R_SEXP_to_igraph_vs(pv, &graph, &vs, &vs_data); + Rz_SEXP_to_igraph(pgraph, &graph); + Rz_SEXP_to_igraph_vs(pv, &graph, &vs, &vs_data); IGRAPH_FINALLY(igraph_vs_destroy, &vs); IGRAPH_FINALLY_PV(igraph_vector_int_destroy, &vs_data); @@ -7339,7 +7339,7 @@ SEXP Rx_igraph_adjacent_vertices(SEXP pgraph, SEXP pv, SEXP pmode) { IGRAPH_VIT_NEXT(vit), i++) { igraph_integer_t vid = IGRAPH_VIT_GET(vit); igraph_vector_int_t *neis = igraph_lazy_adjlist_get(&adjlist, vid); - SET_VECTOR_ELT(result, i, R_igraph_vector_int_to_SEXP(neis)); + SET_VECTOR_ELT(result, i, Ry_igraph_vector_int_to_SEXP(neis)); } igraph_lazy_adjlist_destroy(&adjlist); @@ -7363,8 +7363,8 @@ SEXP Rx_igraph_incident_edges(SEXP pgraph, SEXP pe, SEXP pmode) { size_t i, n; igraph_lazy_inclist_t adjlist; - R_SEXP_to_igraph(pgraph, &graph); - R_SEXP_to_igraph_vs(pe, &graph, &vs, &vs_data); + Rz_SEXP_to_igraph(pgraph, &graph); + Rz_SEXP_to_igraph_vs(pe, &graph, &vs, &vs_data); IGRAPH_FINALLY(igraph_vs_destroy, &vs); IGRAPH_FINALLY_PV(igraph_vector_int_destroy, &vs_data); @@ -7381,7 +7381,7 @@ SEXP Rx_igraph_incident_edges(SEXP pgraph, SEXP pe, SEXP pmode) { IGRAPH_VIT_NEXT(vit), i++) { igraph_integer_t eid = IGRAPH_VIT_GET(vit); igraph_vector_int_t *neis = igraph_lazy_inclist_get(&adjlist, eid); - SET_VECTOR_ELT(result, i, R_igraph_vector_int_to_SEXP(neis)); + SET_VECTOR_ELT(result, i, Ry_igraph_vector_int_to_SEXP(neis)); } igraph_lazy_inclist_destroy(&adjlist); @@ -7404,7 +7404,7 @@ SEXP Rx_igraph_power_law_fit_new(SEXP data, SEXP xmin, SEXP force_continuous, SE SEXP r_result; - R_SEXP_to_vector(data, &c_data); + Rz_SEXP_to_vector(data, &c_data); IGRAPH_R_CHECK_REAL(xmin); c_xmin = REAL(xmin)[0]; IGRAPH_R_CHECK_BOOL(force_continuous); @@ -7414,7 +7414,7 @@ SEXP Rx_igraph_power_law_fit_new(SEXP data, SEXP xmin, SEXP force_continuous, SE IGRAPH_R_CHECK_REAL(precision); c_precision = REAL(precision)[0]; - // Can't use the generated `R_igraph_power_law_fit()` because we need `c_res` to compute the p-value + // Can't use the generated `Rx_igraph_power_law_fit()` because we need `c_res` to compute the p-value IGRAPH_R_CHECK(igraph_power_law_fit(&c_data, &c_res, c_xmin, c_force_continuous)); if (c_compute_pvalue) { @@ -7642,11 +7642,11 @@ SEXP Rx_igraph_graph_version(SEXP graph) { return Rf_ScalarInteger(ver_0_1_1); } - if (Rf_xlength(graph) != igraph_t_idx_max || !Rf_isEnvironment(R_igraph_graph_env(graph))) { + if (Rf_xlength(graph) != igraph_t_idx_max || !Rf_isEnvironment(Rx_igraph_graph_env(graph))) { return Rf_ScalarInteger(ver_0_4); } - SEXP ver = Rf_findVar(Rf_install(R_IGRAPH_VERSION_VAR), R_igraph_graph_env(graph)); + SEXP ver = Rf_findVar(Rf_install(R_IGRAPH_VERSION_VAR), Rx_igraph_graph_env(graph)); if (ver == R_UnboundValue) { return Rf_ScalarInteger(ver_0_7_999); } @@ -7666,7 +7666,7 @@ SEXP Rx_igraph_add_myid_to_env(SEXP graph) { uuid_unparse_lower(my_id, my_id_chr); SEXP l1 = PROTECT(Rf_install("myid")); SEXP l2 = PROTECT(Rf_mkString(my_id_chr)); - Rf_defineVar(l1, l2, R_igraph_graph_env(graph)); + Rf_defineVar(l1, l2, Rx_igraph_graph_env(graph)); UNPROTECT(2); return graph; @@ -7675,7 +7675,7 @@ SEXP Rx_igraph_add_myid_to_env(SEXP graph) { SEXP Rx_igraph_add_version_to_env(SEXP graph) { SEXP l1 = PROTECT(Rf_install(R_IGRAPH_VERSION_VAR)); SEXP l2 = PROTECT(Rf_ScalarInteger(ver_current)); - Rf_defineVar(l1, l2, R_igraph_graph_env(graph)); + Rf_defineVar(l1, l2, Rx_igraph_graph_env(graph)); UNPROTECT(2); return graph; @@ -7713,14 +7713,14 @@ SEXP Rx_igraph_add_env(SEXP graph) { SEXP l1 = PROTECT(Rf_install("myid")); px++; SEXP l2 = PROTECT(Rf_mkString(my_id_chr)); px++; - Rf_defineVar(l1, l2, R_igraph_graph_env(result)); + Rf_defineVar(l1, l2, Rx_igraph_graph_env(result)); l1 = PROTECT(Rf_install(R_IGRAPH_VERSION_VAR)); px++; l2 = PROTECT(Rf_ScalarInteger(ver_current)); px++; - Rf_defineVar(l1, l2, R_igraph_graph_env(result)); + Rf_defineVar(l1, l2, Rx_igraph_graph_env(result)); l1 = PROTECT(Rf_install("igraph")); px++; - Rf_defineVar(l1, R_NilValue, R_igraph_graph_env(result)); + Rf_defineVar(l1, R_NilValue, Rx_igraph_graph_env(result)); UNPROTECT(px); @@ -7728,7 +7728,7 @@ SEXP Rx_igraph_add_env(SEXP graph) { } SEXP Rx_igraph_get_graph_id(SEXP graph) { - return Rf_findVar(Rf_install("myid"), R_igraph_graph_env(graph)); + return Rf_findVar(Rf_install("myid"), Rx_igraph_graph_env(graph)); } // Wrapper functions for functions not in aaa-auto.R diff --git a/tools/stimulus/types-RC.yaml b/tools/stimulus/types-RC.yaml index 1616d408e83..8b3de2e2e64 100644 --- a/tools/stimulus/types-RC.yaml +++ b/tools/stimulus/types-RC.yaml @@ -2,18 +2,18 @@ GRAPH: CALL: '&%C%' CTYPE: igraph_t INCONV: - IN: R_SEXP_to_igraph(%I%, &%C%); + IN: Rz_SEXP_to_igraph(%I%, &%C%); INOUT: |- - R_SEXP_to_igraph_copy(%I%, &%C%); + Rz_SEXP_to_igraph_copy(%I%, &%C%); IGRAPH_FINALLY(igraph_destroy, &%C%); OUTCONV: INOUT: |- - PROTECT(%I%=R_igraph_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_to_SEXP(&%C%)); IGRAPH_I_DESTROY(&%C%); IGRAPH_FINALLY_CLEAN(1); OUT: |- IGRAPH_FINALLY(igraph_destroy, &%C%); - PROTECT(%I%=R_igraph_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_to_SEXP(&%C%)); IGRAPH_I_DESTROY(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -26,7 +26,7 @@ GRAPH_LIST: IGRAPH_FINALLY(igraph_graph_list_destroy, &%C%); OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_graphlist_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_graphlist_to_SEXP(&%C%)); IGRAPH_FREE(%C%.stor_begin); IGRAPH_FINALLY_CLEAN(1); @@ -80,7 +80,7 @@ INFILE: IN: '%C%' INCONV: IN: |- - %C% = R_igraph_fopen_read(%I%); + %C% = Ry_igraph_fopen_read(%I%); IGRAPH_FINALLY(fclose, %C%); OUTFILE: @@ -89,7 +89,7 @@ OUTFILE: IN: '%C%' INCONV: IN: |- - %C% = R_igraph_fopen_write(%I%); + %C% = Ry_igraph_fopen_write(%I%); IGRAPH_FINALLY(fclose, %C%); REAL: @@ -127,7 +127,7 @@ INDEX_VECTOR: CTYPE: igraph_vector_int_t INCONV: IN: |- - R_SEXP_to_vector_int_copy(%I%, &%C%); + Rz_SEXP_to_vector_int_copy(%I%, &%C%); IGRAPH_FINALLY(igraph_vector_int_destroy, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_vector_int_init(&%C%, 0)); @@ -137,7 +137,7 @@ INDEX_VECTOR: igraph_vector_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); OUT: |- - PROTECT(%I%=R_igraph_vector_int_to_SEXPp1(&%C%)); + PROTECT(%I%=Ry_igraph_vector_int_to_SEXPp1(&%C%)); igraph_vector_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -145,16 +145,16 @@ VECTOR: CALL: '&%C%' CTYPE: igraph_vector_t INCONV: - IN: R_SEXP_to_vector(%I%, &%C%); + IN: Rz_SEXP_to_vector(%I%, &%C%); INOUT: |- - IGRAPH_R_CHECK(R_SEXP_to_vector_copy(%I%, &%C%)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_copy(%I%, &%C%)); IGRAPH_FINALLY(igraph_vector_destroy, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_vector_init(&%C%, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &%C%); OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_vector_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_vector_to_SEXP(&%C%)); igraph_vector_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -162,16 +162,16 @@ VECTOR_BOOL: CALL: '&%C%' CTYPE: igraph_vector_bool_t INCONV: - IN: R_SEXP_to_vector_bool(%I%, &%C%); + IN: Rz_SEXP_to_vector_bool(%I%, &%C%); INOUT: |- - IGRAPH_R_CHECK(R_SEXP_to_vector_bool_copy(%I%, &%C%)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_bool_copy(%I%, &%C%)); IGRAPH_FINALLY(igraph_vector_bool_destroy, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_vector_bool_init(&%C%, 0)); IGRAPH_FINALLY(igraph_vector_bool_destroy, &%C%); OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_vector_bool_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_vector_bool_to_SEXP(&%C%)); igraph_vector_bool_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -180,7 +180,7 @@ VECTOR_INT: CTYPE: igraph_vector_int_t INCONV: IN: |- - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(%I%, &%C%)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(%I%, &%C%)); IGRAPH_FINALLY(igraph_vector_int_destroy, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_vector_int_init(&%C%, 0)); @@ -190,7 +190,7 @@ VECTOR_INT: igraph_vector_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); OUT: |- - PROTECT(%I%=R_igraph_vector_int_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_vector_int_to_SEXP(&%C%)); igraph_vector_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -199,13 +199,13 @@ MATRIX_LIST: CTYPE: igraph_matrix_list_t INCONV: IN: |- - R_igraph_SEXP_to_matrixlist(%I%, &%C%); + Ry_igraph_SEXP_to_matrixlist(%I%, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_matrix_list_init(&%C%, 0)); IGRAPH_FINALLY(igraph_matrix_list_destroy, &%C%); OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_matrixlist_to_SEXP(&%C%)); + PROTECT(%I%=Rx_igraph_matrixlist_to_SEXP(&%C%)); igraph_matrix_list_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -213,13 +213,13 @@ VECTOR_LIST: CALL: '&%C%' CTYPE: igraph_vector_list_t INCONV: - IN: R_igraph_SEXP_to_vector_list(%I%, &%C%); + IN: Ry_igraph_SEXP_to_vector_list(%I%, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_vector_list_init(&%C%, 0)); IGRAPH_FINALLY(igraph_vector_list_destroy, &%C%); OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_vectorlist_to_SEXP(&%C%)); + PROTECT(%I%=Rx_igraph_vectorlist_to_SEXP(&%C%)); igraph_vector_list_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -227,13 +227,13 @@ VECTOR_INT_LIST: CALL: '&%C%' CTYPE: igraph_vector_int_list_t INCONV: - IN: if (!Rf_isNull(%I%)) { IGRAPH_R_CHECK(R_igraph_SEXP_to_vector_int_list(%I%, &%C%)); } + IN: if (!Rf_isNull(%I%)) { IGRAPH_R_CHECK(Ry_igraph_SEXP_to_vector_int_list(%I%, &%C%)); } OUT: |- IGRAPH_R_CHECK(igraph_vector_int_list_init(&%C%, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &%C%); OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_vector_int_list_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_vector_int_list_to_SEXP(&%C%)); igraph_vector_int_list_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -242,7 +242,7 @@ VERTEXSET_LIST: CTYPE: igraph_vector_int_list_t INCONV: IN: |- - IGRAPH_R_CHECK(R_igraph_SEXP_to_vector_int_list(%I%, &%C%)); + IGRAPH_R_CHECK(Ry_igraph_SEXP_to_vector_int_list(%I%, &%C%)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_vector_int_list_init(&%C%, 0)); @@ -252,7 +252,7 @@ VERTEXSET_LIST: igraph_vector_int_list_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); OUT: |- - PROTECT(%I%=R_igraph_vector_int_list_to_SEXPp1(&%C%)); + PROTECT(%I%=Ry_igraph_vector_int_list_to_SEXPp1(&%C%)); igraph_vector_int_list_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -261,13 +261,13 @@ EDGESET_LIST: CTYPE: igraph_vector_int_list_t INCONV: IN: |- - if (!Rf_isNull(%I%)) { IGRAPH_R_CHECK(R_igraph_SEXP_to_vector_int_list(%I%, &%C%)); } + if (!Rf_isNull(%I%)) { IGRAPH_R_CHECK(Ry_igraph_SEXP_to_vector_int_list(%I%, &%C%)); } OUT: |- IGRAPH_R_CHECK(igraph_vector_int_list_init(&%C%, 0)); IGRAPH_FINALLY(igraph_vector_int_list_destroy, &%C%); OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_vector_int_list_to_SEXPp1(&%C%)); + PROTECT(%I%=Ry_igraph_vector_int_list_to_SEXPp1(&%C%)); igraph_vector_int_list_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -281,7 +281,7 @@ EDGE_SELECTOR: INCONV: IN: |- igraph_vector_int_t %C%_data; - IGRAPH_R_CHECK(R_SEXP_to_igraph_es(%I%, &%C1%, &%C%, &%C%_data)); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_es(%I%, &%C1%, &%C%, &%C%_data)); OUT: |- IGRAPH_R_CHECK(igraph_vector_init(&%C%, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &%C%); @@ -290,7 +290,7 @@ EDGE_SELECTOR: igraph_vector_int_destroy(&%C%_data); igraph_es_destroy(&%C%); OUT: |- - PROTECT(%I%=R_igraph_vector_to_SEXPp1(&%C%)); + PROTECT(%I%=Ry_igraph_vector_to_SEXPp1(&%C%)); igraph_vector_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -299,7 +299,7 @@ ADJLIST: CTYPE: igraph_adjlist_t INCONV: IN: |- - IGRAPH_R_CHECK(R_SEXP_to_igraph_adjlist(%I%, &%C%)); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_adjlist(%I%, &%C%)); OUTCONV: IN: igraph_adjlist_destroy(&%C%); @@ -307,14 +307,14 @@ EDGEWEIGHTS: CALL: '&%C%' CTYPE: igraph_vector_t INCONV: - IN: R_SEXP_to_vector(%I%, &%C%); + IN: Rz_SEXP_to_vector(%I%, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_vector_init(&%C%, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &%C%); %I%=R_GlobalEnv; /* hack to have a non-NULL value */ OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_0orvector_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_0orvector_to_SEXP(&%C%)); igraph_vector_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -322,14 +322,14 @@ VERTEXWEIGHTS: CALL: '&%C%' CTYPE: igraph_vector_t INCONV: - IN: R_SEXP_to_vector(%I%, &%C%); + IN: Rz_SEXP_to_vector(%I%, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_vector_init(&%C%, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &%C%); %I%=R_GlobalEnv; /* hack to have a non-NULL value */ OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_0orvector_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_0orvector_to_SEXP(&%C%)); igraph_vector_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -337,14 +337,14 @@ EDGE_CAPACITY: CALL: '&%C%' CTYPE: igraph_vector_t INCONV: - IN: R_SEXP_to_vector(%I%, &%C%); + IN: Rz_SEXP_to_vector(%I%, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_vector_init(&%C%, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &%C%); %I%=R_GlobalEnv; /* hack to have a non-NULL value */ OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_0orvector_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_0orvector_to_SEXP(&%C%)); igraph_vector_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -352,16 +352,16 @@ MATRIX: CALL: '&%C%' CTYPE: igraph_matrix_t INCONV: - IN: R_SEXP_to_matrix(%I%, &%C%); + IN: Rz_SEXP_to_matrix(%I%, &%C%); INOUT: |- - IGRAPH_R_CHECK(R_SEXP_to_igraph_matrix_copy(%I%, &%C%)); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_matrix_copy(%I%, &%C%)); IGRAPH_FINALLY(igraph_matrix_destroy, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_matrix_init(&%C%, 0, 0)); IGRAPH_FINALLY(igraph_matrix_destroy, &%C%); OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_matrix_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_matrix_to_SEXP(&%C%)); igraph_matrix_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -370,10 +370,10 @@ MATRIX_INT: CTYPE: igraph_matrix_int_t INCONV: IN: |- - R_SEXP_to_matrix_int(%I%, &%C%); + Rz_SEXP_to_matrix_int(%I%, &%C%); IGRAPH_FINALLY(igraph_matrix_int_destroy, &%C%); INOUT: |- - IGRAPH_R_CHECK(R_SEXP_to_igraph_matrix_int_copy(%I%, &%C%)); + IGRAPH_R_CHECK(Rz_SEXP_to_igraph_matrix_int_copy(%I%, &%C%)); IGRAPH_FINALLY(igraph_matrix_int_destroy, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_matrix_int_init(&%C%, 0, 0)); @@ -383,7 +383,7 @@ MATRIX_INT: igraph_matrix_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); OUT: |- - PROTECT(%I%=R_igraph_matrix_int_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_matrix_int_to_SEXP(&%C%)); igraph_matrix_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -421,16 +421,16 @@ VERTEX_QTY: CALL: '&%C%' CTYPE: igraph_vector_t INCONV: - IN: R_SEXP_to_vector(%I%, &%C%); + IN: Rz_SEXP_to_vector(%I%, &%C%); INOUT: |- - IGRAPH_R_CHECK(R_SEXP_to_vector_copy(%I%, &%C%)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_copy(%I%, &%C%)); IGRAPH_FINALLY(igraph_vector_destroy, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_vector_init(&%C%, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &%C%); OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_vector_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_vector_to_SEXP(&%C%)); igraph_vector_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -438,16 +438,16 @@ ALL_VERTEX_QTY: CALL: '&%C%' CTYPE: igraph_vector_t INCONV: - IN: R_SEXP_to_vector(%I%, &%C%); + IN: Rz_SEXP_to_vector(%I%, &%C%); INOUT: |- - IGRAPH_R_CHECK(R_SEXP_to_vector_copy(%I%, &%C%)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_copy(%I%, &%C%)); IGRAPH_FINALLY(igraph_vector_destroy, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_vector_init(&%C%, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &%C%); OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_vector_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_vector_to_SEXP(&%C%)); igraph_vector_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -467,7 +467,7 @@ VERTEX_SELECTOR: INCONV: IN: |- igraph_vector_int_t %C%_data; - R_SEXP_to_igraph_vs(%I%, &%C1%, &%C%, &%C%_data); + Rz_SEXP_to_igraph_vs(%I%, &%C1%, &%C%, &%C%_data); OUT: |- IGRAPH_R_CHECK(igraph_vector_init(&%C%, 0)); IGRAPH_FINALLY(igraph_vector_destroy, &%C%); @@ -476,7 +476,7 @@ VERTEX_SELECTOR: igraph_vector_int_destroy(&%C%_data); igraph_vs_destroy(&%C%); OUT: |- - PROTECT(%I%=R_igraph_vector_to_SEXPp1(&%C%)); + PROTECT(%I%=Ry_igraph_vector_to_SEXPp1(&%C%)); igraph_vector_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -485,7 +485,7 @@ VERTEX_INDICES: CTYPE: igraph_vector_int_t INCONV: IN: |- - R_SEXP_to_vector_int_copy(%I%, &%C%); + Rz_SEXP_to_vector_int_copy(%I%, &%C%); IGRAPH_FINALLY(igraph_vector_int_destroy, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_vector_int_init(&%C%, 0)); @@ -495,7 +495,7 @@ VERTEX_INDICES: igraph_vector_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); OUT: |- - PROTECT(%I%=R_igraph_vector_int_to_SEXPp1(&%C%)); + PROTECT(%I%=Ry_igraph_vector_int_to_SEXPp1(&%C%)); igraph_vector_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -504,7 +504,7 @@ VERTEX_INDICES_PV: CTYPE: igraph_vector_int_t INCONV: IN: |- - R_SEXP_to_vector_int_copy(%I%, &%C%); + Rz_SEXP_to_vector_int_copy(%I%, &%C%); IGRAPH_FINALLY_PV(igraph_vector_int_destroy, &%C%); OUT: |- if (0 != igraph_vector_int_init(&%C%, 0)) { @@ -516,7 +516,7 @@ VERTEX_INDICES_PV: igraph_vector_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); OUT: |- - PROTECT(%I%=R_igraph_vector_int_to_SEXPp1(&%C%)); + PROTECT(%I%=Ry_igraph_vector_int_to_SEXPp1(&%C%)); igraph_vector_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -525,7 +525,7 @@ VERTEX_INDEX_PAIRS: CTYPE: igraph_vector_int_t INCONV: IN: |- - R_SEXP_to_vector_int_copy(%I%, &%C%); + Rz_SEXP_to_vector_int_copy(%I%, &%C%); IGRAPH_FINALLY(igraph_vector_int_destroy, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_vector_int_init(&%C%, 0)); @@ -535,7 +535,7 @@ VERTEX_INDEX_PAIRS: igraph_vector_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); OUT: |- - PROTECT(%I%=R_igraph_vector_int_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_vector_int_to_SEXP(&%C%)); igraph_vector_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -544,7 +544,7 @@ EDGE_INDICES: CTYPE: igraph_vector_int_t INCONV: IN: |- - R_SEXP_to_vector_int_copy(%I%, &%C%); + Rz_SEXP_to_vector_int_copy(%I%, &%C%); IGRAPH_FINALLY(igraph_vector_int_destroy, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_vector_int_init(&%C%, 0)); @@ -554,7 +554,7 @@ EDGE_INDICES: igraph_vector_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); OUT: |- - PROTECT(%I%=R_igraph_vector_int_to_SEXPp1(&%C%)); + PROTECT(%I%=Ry_igraph_vector_int_to_SEXPp1(&%C%)); igraph_vector_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -591,9 +591,9 @@ ATTRIBUTES: ARPACKOPT: CALL: '&%C%' INCONV: - INOUT: R_SEXP_to_igraph_arpack_options(%I%, &%C%); + INOUT: Rz_SEXP_to_igraph_arpack_options(%I%, &%C%); OUTCONV: - INOUT: PROTECT(%I%=Rx_igraph_arpack_options_to_SEXP(&%C%)); + INOUT: PROTECT(%I%=Ry_igraph_arpack_options_to_SEXP(&%C%)); ARPACKSTORAGE: CALL: '0' @@ -608,26 +608,26 @@ ARPACKFUNC: DRL_OPTIONS: CALL: '&%C%' INCONV: - IN: R_SEXP_to_igraph_layout_drl_options(%I%, &%C%); + IN: Rz_SEXP_to_igraph_layout_drl_options(%I%, &%C%); BLISSINFO: CALL: '&%C%' OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_bliss_info_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_bliss_info_to_SEXP(&%C%)); if (%C%.group_size) { free(%C%.group_size); } VECTOR_STR: CALL: '&%C%' CTYPE: igraph_strvector_t INCONV: - IN: R_igraph_SEXP_to_strvector(%I%, &%C%); + IN: Rx_igraph_SEXP_to_strvector(%I%, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_strvector_init(&%C%, 0)); IGRAPH_FINALLY(igraph_strvector_destroy, &%C%); OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_strvector_to_SEXP(&%C%)); + PROTECT(%I%=Rx_igraph_strvector_to_SEXP(&%C%)); igraph_strvector_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -637,13 +637,13 @@ BIPARTITE_TYPES: OUT: '&%C%' CTYPE: igraph_vector_bool_t INCONV: - IN: R_SEXP_to_vector_bool(%I%, &%C%); + IN: Rz_SEXP_to_vector_bool(%I%, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_vector_bool_init(&%C%, 0)); IGRAPH_FINALLY(igraph_vector_bool_destroy, &%C%); OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_vector_bool_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_vector_bool_to_SEXP(&%C%)); igraph_vector_bool_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -653,13 +653,13 @@ ALL_BIPARTITE_TYPES: OUT: '&%C%' CTYPE: igraph_vector_bool_t INCONV: - IN: R_SEXP_to_vector_bool(%I%, &%C%); + IN: Rz_SEXP_to_vector_bool(%I%, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_vector_bool_init(&%C%, 0)); IGRAPH_FINALLY(igraph_vector_bool_destroy, &%C%); OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_vector_bool_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_vector_bool_to_SEXP(&%C%)); igraph_vector_bool_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -673,7 +673,7 @@ BIPARTITE_TYPES_UNNAMED: IGRAPH_FINALLY(igraph_vector_bool_destroy, &%C%); OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_vector_bool_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_vector_bool_to_SEXP(&%C%)); igraph_vector_bool_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -685,7 +685,7 @@ VERTEX_COLOR: INCONV: IN: |- if (!Rf_isNull(%I%)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(%I%, &%C%)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(%I%, &%C%)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&%C%, 0)); } @@ -698,7 +698,7 @@ VERTEX_COLOR: igraph_vector_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); OUT: |- - PROTECT(%I%=R_igraph_vector_int_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_vector_int_to_SEXP(&%C%)); igraph_vector_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -710,7 +710,7 @@ EDGE_COLOR: INCONV: IN: |- if (!Rf_isNull(%I%)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_int_copy(%I%, &%C%)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_int_copy(%I%, &%C%)); } else { IGRAPH_R_CHECK(igraph_vector_int_init(&%C%, 0)); } @@ -723,7 +723,7 @@ EDGE_COLOR: igraph_vector_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); OUT: |- - PROTECT(%I%=R_igraph_vector_int_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_vector_int_to_SEXP(&%C%)); igraph_vector_int_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -732,7 +732,7 @@ VERTEX_ATTRIBUTE_COMBINATION: CTYPE: igraph_attribute_combination_t INCONV: IN: |- - R_SEXP_to_attr_comb(%I%, &%C%); + Rz_SEXP_to_attr_comb(%I%, &%C%); IGRAPH_FINALLY(igraph_attribute_combination_destroy, &%C%); OUTCONV: IN: |- @@ -744,7 +744,7 @@ EDGE_ATTRIBUTE_COMBINATION: CTYPE: igraph_attribute_combination_t INCONV: IN: |- - R_SEXP_to_attr_comb(%I%, &%C%); + Rz_SEXP_to_attr_comb(%I%, &%C%); IGRAPH_FINALLY(igraph_attribute_combination_destroy, &%C%); OUTCONV: IN: |- @@ -755,10 +755,10 @@ HRG: CALL: '&%C%' INCONV: IN: |- - IGRAPH_R_CHECK(R_SEXP_to_hrg_copy(%I%, &%C%)); + IGRAPH_R_CHECK(Rz_SEXP_to_hrg_copy(%I%, &%C%)); IGRAPH_FINALLY(igraph_hrg_destroy, &%C%); INOUT: |- - IGRAPH_R_CHECK(R_SEXP_to_hrg_copy(%I%, &%C%)); + IGRAPH_R_CHECK(Rz_SEXP_to_hrg_copy(%I%, &%C%)); IGRAPH_FINALLY(igraph_hrg_destroy, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_hrg_init(&%C%, 0)); @@ -768,11 +768,11 @@ HRG: igraph_hrg_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); INOUT: |- - PROTECT(%I%=R_igraph_hrg_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_hrg_to_SEXP(&%C%)); igraph_hrg_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); OUT: |- - PROTECT(%I%=R_igraph_hrg_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_hrg_to_SEXP(&%C%)); igraph_hrg_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -780,13 +780,13 @@ SPARSEMAT: CALL: '&%C%' CTYPE: igraph_sparsemat_t INCONV: - IN: R_SEXP_to_sparsemat(%I%, &%C%); + IN: Rz_SEXP_to_sparsemat(%I%, &%C%); OUT: |- IGRAPH_R_CHECK(igraph_sparsemat_init(&%C%, 0, 0, 0)); IGRAPH_FINALLY(igraph_sparsemat_destroy, &%C%); OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_sparsemat_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_sparsemat_to_SEXP(&%C%)); igraph_sparsemat_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -794,25 +794,25 @@ SPARSEMATPTR: CALL: '&%C%' CTYPE: igraph_sparsemat_t INCONV: - IN: R_SEXP_to_sparsemat(%I%, &%C%); + IN: Rz_SEXP_to_sparsemat(%I%, &%C%); OUT: /* Don't need to init. */ OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_sparsemat_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_sparsemat_to_SEXP(&%C%)); igraph_sparsemat_destroy(&%C%); SPARSEMAT_OR_0: CALL: '(Rf_isNull(%I%) ? NULL : &%C%)' CTYPE: igraph_sparsemat_t INCONV: - IN: if (!Rf_isNull(%I%)) { R_SEXP_to_sparsemat(%I%, &%C%); } + IN: if (!Rf_isNull(%I%)) { Rz_SEXP_to_sparsemat(%I%, &%C%); } OUT: |- IGRAPH_R_CHECK(igraph_sparsemat_init(&%C%, 0, 0, 0)); IGRAPH_FINALLY(igraph_sparsemat_destroy, &%C%); %I%=R_GlobalEnv; /* hack to have a non-NULL value */ OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_0orsparsemat_to_SEXP(&%C%)); + PROTECT(%I%=Rx_igraph_0orsparsemat_to_SEXP(&%C%)); igraph_sparsemat_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -820,10 +820,10 @@ VECTOR_COMPLEX: CALL: '(Rf_isNull(%I%) ? NULL : &%C%)' CTYPE: igraph_vector_complex_t INCONV: - IN: if (!Rf_isNull(%I%)) { R_SEXP_to_vector_complex(%I%, &%C%); } + IN: if (!Rf_isNull(%I%)) { Rz_SEXP_to_vector_complex(%I%, &%C%); } INOUT: |- if (!Rf_isNull(%I%)) { - IGRAPH_R_CHECK(R_SEXP_to_vector_complex_copy(%I%, &%C%)); + IGRAPH_R_CHECK(Rz_SEXP_to_vector_complex_copy(%I%, &%C%)); } else { IGRAPH_R_CHECK(igraph_vector_complex_init(&%C%, 0)); } @@ -835,7 +835,7 @@ VECTOR_COMPLEX: %I%=R_GlobalEnv; /* hack to have a non-NULL value */ OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_0orvector_complex_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_0orvector_complex_to_SEXP(&%C%)); igraph_vector_complex_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); @@ -843,10 +843,10 @@ MATRIX_COMPLEX: CALL: '(Rf_isNull(%I%) ? NULL : &%C%)' CTYPE: igraph_matrix_complex_t INCONV: - IN: if (!Rf_isNull(%I%)) { R_SEXP_to_matrix_complex(%I%, &%C%); } + IN: if (!Rf_isNull(%I%)) { Rz_SEXP_to_matrix_complex(%I%, &%C%); } INOUT: |- if (!Rf_isNull(%I%)) { - IGRAPH_R_CHECK(R_SEXP_to_matrix_complex_copy(%I%, &%C%)); + IGRAPH_R_CHECK(Rz_SEXP_to_matrix_complex_copy(%I%, &%C%)); } else { IGRAPH_R_CHECK(igraph_matrix_complex_init(&%C%, 0, 0)); } @@ -858,25 +858,25 @@ MATRIX_COMPLEX: %I%=R_GlobalEnv; /* hack to have a non-NULL value */ OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_0ormatrix_complex_to_SEXP(&%C%)); + PROTECT(%I%=Ry_igraph_0ormatrix_complex_to_SEXP(&%C%)); igraph_matrix_complex_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); PLFIT: CALL: '&%C%' OUTCONV: - OUT: PROTECT(%I%=R_igraph_plfit_result_to_SEXP(&%C%)); + OUT: PROTECT(%I%=Ry_igraph_plfit_result_to_SEXP(&%C%)); MAXFLOW_STATS: CALL: '&%C%' HEADER: {} OUTCONV: - OUT: PROTECT(%I%=R_igraph_maxflow_stats_to_SEXP(&%C%)); + OUT: PROTECT(%I%=Ry_igraph_maxflow_stats_to_SEXP(&%C%)); EIGENWHICH: CALL: '&%C%' INCONV: - IN: R_SEXP_to_igraph_eigen_which(%I%, &%C%); + IN: Rz_SEXP_to_igraph_eigen_which(%I%, &%C%); EIGENWHICHPOS: INCONV: @@ -888,11 +888,11 @@ SIR_LIST: INCONV: OUT: |- IGRAPH_R_CHECK(igraph_vector_ptr_init(&%C%, 0)); - IGRAPH_FINALLY(R_igraph_sirlist_destroy, &%C%); + IGRAPH_FINALLY(Ry_igraph_sirlist_destroy, &%C%); OUTCONV: OUT: |- - PROTECT(%I%=R_igraph_sirlist_to_SEXP(&%C%)); - R_igraph_sirlist_destroy(&%C%); + PROTECT(%I%=Ry_igraph_sirlist_to_SEXP(&%C%)); + Ry_igraph_sirlist_destroy(&%C%); IGRAPH_FINALLY_CLEAN(1); PAGERANKOPT: @@ -902,7 +902,7 @@ PAGERANKOPT: INCONV: INOUT: |- if (%C1% == IGRAPH_PAGERANK_ALGO_ARPACK) { - R_SEXP_to_igraph_arpack_options(%I%, &%C%1); + Rz_SEXP_to_igraph_arpack_options(%I%, &%C%1); %C% = &%C%1; } else { %C% = NULL; @@ -910,7 +910,7 @@ PAGERANKOPT: OUTCONV: INOUT: |- if (%C1% == IGRAPH_PAGERANK_ALGO_ARPACK) { - PROTECT(%I% = Rx_igraph_arpack_options_to_SEXP(&%C%1)); + PROTECT(%I% = Ry_igraph_arpack_options_to_SEXP(&%C%1)); } else { PROTECT(%I%); }