diff --git a/R/aaa-auto.R b/R/aaa-auto.R index 291d1346dad..b5d652f629b 100644 --- a/R/aaa-auto.R +++ b/R/aaa-auto.R @@ -1,6 +1,6 @@ # styler: off -gorder_impl <- function(graph) { +vcount_impl <- function(graph) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } @@ -12,7 +12,7 @@ gorder_impl <- function(graph) { res } -graph_from_lcf_impl <- function(n, shifts, repeats=1) { +lcf_vector_impl <- function(n, shifts, repeats=1) { # Argument checks n <- as.integer(n) shifts <- as.numeric(shifts) @@ -29,7 +29,7 @@ graph_from_lcf_impl <- function(n, shifts, repeats=1) { res } -graph_from_adj_list_impl <- function(adjlist, mode=c("out", "in", "all", "total"), duplicate=TRUE) { +adjlist_impl <- function(adjlist, mode=c("out", "in", "all", "total"), duplicate=TRUE) { # Argument checks adjlist <- lapply(adjlist, function(x) as.integer(x)-1L) mode <- switch(igraph.match.arg(mode), "out"=1, "in"=2, "all"=3, "total"=3) @@ -42,7 +42,7 @@ graph_from_adj_list_impl <- function(adjlist, mode=c("out", "in", "all", "total" res } -realize_degseq_impl <- function(out.deg, in.deg=NULL, allowed.edge.types=c("simple", "loops", "multi", "all"), method=c("smallest", "largest", "index")) { +realize_degree_sequence_impl <- function(out.deg, in.deg=NULL, allowed.edge.types=c("simple", "loops", "multi", "all"), method=c("smallest", "largest", "index")) { # Argument checks out.deg <- as.numeric(out.deg) if (!is.null(in.deg)) in.deg <- as.numeric(in.deg) @@ -65,7 +65,7 @@ realize_degseq_impl <- function(out.deg, in.deg=NULL, allowed.edge.types=c("simp res } -sample_forestfire_impl <- function(nodes, fw.prob, bw.factor=1, ambs=1, directed=TRUE) { +forest_fire_game_impl <- function(nodes, fw.prob, bw.factor=1, ambs=1, directed=TRUE) { # Argument checks nodes <- as.integer(nodes) fw.prob <- as.numeric(fw.prob) @@ -87,7 +87,7 @@ sample_forestfire_impl <- function(nodes, fw.prob, bw.factor=1, ambs=1, directed res } -sample_islands_impl <- function(islands.n, islands.size, islands.pin, n.inter) { +simple_interconnected_islands_game_impl <- function(islands.n, islands.size, islands.pin, n.inter) { # Argument checks islands.n <- as.integer(islands.n) islands.size <- as.integer(islands.size) @@ -109,7 +109,7 @@ sample_islands_impl <- function(islands.n, islands.size, islands.pin, n.inter) { res } -sample_fitness_impl <- function(no.of.edges, fitness.out, fitness.in=NULL, loops=FALSE, multiple=FALSE) { +static_fitness_game_impl <- function(no.of.edges, fitness.out, fitness.in=NULL, loops=FALSE, multiple=FALSE) { # Argument checks no.of.edges <- as.integer(no.of.edges) fitness.out <- as.numeric(fitness.out) @@ -130,7 +130,7 @@ sample_fitness_impl <- function(no.of.edges, fitness.out, fitness.in=NULL, loops res } -sample_fitness_pl_impl <- function(no.of.nodes, no.of.edges, exponent.out, exponent.in=-1, loops=FALSE, multiple=FALSE, finite.size.correction=TRUE) { +static_power_law_game_impl <- function(no.of.nodes, no.of.edges, exponent.out, exponent.in=-1, loops=FALSE, multiple=FALSE, finite.size.correction=TRUE) { # Argument checks no.of.nodes <- as.integer(no.of.nodes) no.of.edges <- as.integer(no.of.edges) @@ -156,7 +156,7 @@ sample_fitness_pl_impl <- function(no.of.nodes, no.of.edges, exponent.out, expon res } -sample_k_regular_impl <- function(no.of.nodes, k, directed=FALSE, multiple=FALSE) { +k_regular_game_impl <- function(no.of.nodes, k, directed=FALSE, multiple=FALSE) { # Argument checks no.of.nodes <- as.integer(no.of.nodes) k <- as.integer(k) @@ -175,7 +175,7 @@ sample_k_regular_impl <- function(no.of.nodes, k, directed=FALSE, multiple=FALSE res } -sample_sbm_impl <- function(n, pref.matrix, block.sizes, directed=FALSE, loops=FALSE) { +sbm_game_impl <- function(n, pref.matrix, block.sizes, directed=FALSE, loops=FALSE) { # Argument checks n <- as.integer(n) pref.matrix <- as.matrix(structure(as.double(pref.matrix), dim=dim(pref.matrix))) @@ -195,7 +195,7 @@ sample_sbm_impl <- function(n, pref.matrix, block.sizes, directed=FALSE, loops=F res } -hsbm_1_game_impl <- function(n, m, rho, C, p) { +hsbm_game_impl <- function(n, m, rho, C, p) { # Argument checks n <- as.integer(n) m <- as.integer(m) @@ -239,7 +239,7 @@ hsbm_list_game_impl <- function(n, mlist, rholist, Clist, p) { res } -sample_correlated_gnp_impl <- function(old.graph, corr, p=edge_density(old.graph), permutation=NULL) { +correlated_game_impl <- function(old.graph, corr, p=edge_density(old.graph), permutation=NULL) { # Argument checks if (!is_igraph(old.graph)) { stop("Not a graph object") } corr <- as.numeric(corr) @@ -259,7 +259,7 @@ sample_correlated_gnp_impl <- function(old.graph, corr, p=edge_density(old.graph res } -sample_correlated_gnp_pair_impl <- function(n, corr, p, directed=FALSE, permutation=NULL) { +correlated_pair_game_impl <- function(n, corr, p, directed=FALSE, permutation=NULL) { # Argument checks n <- as.integer(n) corr <- as.numeric(corr) @@ -274,7 +274,7 @@ sample_correlated_gnp_pair_impl <- function(n, corr, p, directed=FALSE, permutat res } -sample_dot_product_impl <- function(vecs, directed=FALSE) { +dot_product_game_impl <- function(vecs, directed=FALSE) { # Argument checks vecs <- as.matrix(structure(as.double(vecs), dim=dim(vecs))) directed <- as.logical(directed) @@ -326,7 +326,7 @@ sample_dirichlet_impl <- function(n, alpha) { res } -harmonic_centrality_impl <- function(graph, vids=V(graph), mode=c("out", "in", "all", "total"), weights=NULL, normalized=FALSE, cutoff=-1) { +harmonic_centrality_cutoff_impl <- function(graph, vids=V(graph), mode=c("out", "in", "all", "total"), weights=NULL, normalized=FALSE, cutoff=-1) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } vids <- as.igraph.vs(graph, vids) @@ -351,7 +351,7 @@ harmonic_centrality_impl <- function(graph, vids=V(graph), mode=c("out", "in", " res } -page_rank_impl <- function(graph, algo=c("prpack", "arpack"), vids=V(graph), directed=TRUE, damping=0.85, personalized=NULL, weights=NULL, options=NULL) { +personalized_pagerank_impl <- function(graph, algo=c("prpack", "arpack"), vids=V(graph), directed=TRUE, damping=0.85, personalized=NULL, weights=NULL, options=NULL) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } algo <- switch(igraph.match.arg(algo), "arpack"=1L, "prpack"=2L) @@ -398,7 +398,7 @@ reverse_edges_impl <- function(graph, eids=E(graph)) { res } -mean_distance_impl <- function(graph, weights=NULL, directed=TRUE, unconnected=TRUE, details=FALSE) { +average_path_length_dijkstra_impl <- function(graph, weights=NULL, directed=TRUE, unconnected=TRUE, details=FALSE) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } if (is.null(weights) && "weight" %in% edge_attr_names(graph)) { @@ -421,7 +421,7 @@ mean_distance_impl <- function(graph, weights=NULL, directed=TRUE, unconnected=T res } -distance_table_impl <- function(graph, directed=TRUE) { +path_length_hist_impl <- function(graph, directed=TRUE) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } directed <- as.logical(directed) @@ -469,7 +469,7 @@ feedback_arc_set_impl <- function(graph, weights=NULL, algo=c("approx_eades", "e res } -which_loop_impl <- function(graph, eids=E(graph)) { +is_loop_impl <- function(graph, eids=E(graph)) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } eids <- as.igraph.es(graph, eids) @@ -503,7 +503,7 @@ is_simple_impl <- function(graph) { res } -which_multiple_impl <- function(graph, eids=E(graph)) { +is_multiple_impl <- function(graph, eids=E(graph)) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } eids <- as.igraph.es(graph, eids) @@ -515,7 +515,7 @@ which_multiple_impl <- function(graph, eids=E(graph)) { res } -any_loop_impl <- function(graph) { +has_loop_impl <- function(graph) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } @@ -526,7 +526,7 @@ any_loop_impl <- function(graph) { res } -any_multiple_impl <- function(graph) { +has_multiple_impl <- function(graph) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } @@ -549,7 +549,7 @@ count_multiple_impl <- function(graph, eids=E(graph)) { res } -eigen_centrality_impl <- function(graph, directed=FALSE, scale=TRUE, weights=NULL, options=arpack_defaults) { +eigenvector_centrality_impl <- function(graph, directed=FALSE, scale=TRUE, weights=NULL, options=arpack_defaults) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } directed <- as.logical(directed) @@ -619,7 +619,7 @@ authority_score_impl <- function(graph, scale=TRUE, weights=NULL, options=arpack res } -which_mutual_impl <- function(graph, eids=E(graph)) { +is_mutual_impl <- function(graph, eids=E(graph)) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } eids <- as.igraph.es(graph, eids) @@ -631,7 +631,7 @@ which_mutual_impl <- function(graph, eids=E(graph)) { res } -max_cardinality_impl <- function(graph) { +maximum_cardinality_search_impl <- function(graph) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } @@ -644,7 +644,7 @@ max_cardinality_impl <- function(graph) { res } -knn_impl <- function(graph, vids=V(graph), mode=c("all", "out", "in", "total"), neighbor.degree.mode=c("all", "out", "in", "total"), weights=NULL) { +avg_nearest_neighbor_degree_impl <- function(graph, vids=V(graph), mode=c("all", "out", "in", "total"), neighbor.degree.mode=c("all", "out", "in", "total"), weights=NULL) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } vids <- as.igraph.vs(graph, vids) @@ -692,7 +692,7 @@ strength_impl <- function(graph, vids=V(graph), mode=c("all", "out", "in", "tota res } -centralize_impl <- function(scores, theoretical.max=0, normalized=TRUE) { +centralization_impl <- function(scores, theoretical.max=0, normalized=TRUE) { # Argument checks scores <- as.numeric(scores) theoretical.max <- as.numeric(theoretical.max) @@ -706,7 +706,7 @@ centralize_impl <- function(scores, theoretical.max=0, normalized=TRUE) { res } -centr_degree_impl <- function(graph, mode=c("all", "out", "in", "total"), loops=TRUE, normalized=TRUE) { +centralization_degree_impl <- function(graph, mode=c("all", "out", "in", "total"), loops=TRUE, normalized=TRUE) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } mode <- switch(igraph.match.arg(mode), "out"=1, "in"=2, "all"=3, "total"=3) @@ -720,7 +720,7 @@ centr_degree_impl <- function(graph, mode=c("all", "out", "in", "total"), loops= res } -centr_betw_impl <- function(graph, directed=TRUE, normalized=TRUE) { +centralization_betweenness_impl <- function(graph, directed=TRUE, normalized=TRUE) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } directed <- as.logical(directed) @@ -733,7 +733,7 @@ centr_betw_impl <- function(graph, directed=TRUE, normalized=TRUE) { res } -centr_betw_tmax_impl <- function(graph=NULL, nodes=0, directed=TRUE) { +centralization_betweenness_tmax_impl <- function(graph=NULL, nodes=0, directed=TRUE) { # Argument checks if (!is.null(graph) && !is_igraph(graph)) { stop("Not a graph object") } nodes <- as.integer(nodes) @@ -746,7 +746,7 @@ centr_betw_tmax_impl <- function(graph=NULL, nodes=0, directed=TRUE) { res } -centr_clo_impl <- function(graph, mode=c("out", "in", "all", "total"), normalized=TRUE) { +centralization_closeness_impl <- function(graph, mode=c("out", "in", "all", "total"), normalized=TRUE) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } mode <- switch(igraph.match.arg(mode), "out"=1, "in"=2, "all"=3, "total"=3) @@ -759,7 +759,7 @@ centr_clo_impl <- function(graph, mode=c("out", "in", "all", "total"), normalize res } -centr_clo_tmax_impl <- function(graph=NULL, nodes=0, mode=c("out", "in", "all", "total")) { +centralization_closeness_tmax_impl <- function(graph=NULL, nodes=0, mode=c("out", "in", "all", "total")) { # Argument checks if (!is.null(graph) && !is_igraph(graph)) { stop("Not a graph object") } nodes <- as.integer(nodes) @@ -772,7 +772,7 @@ centr_clo_tmax_impl <- function(graph=NULL, nodes=0, mode=c("out", "in", "all", res } -centr_eigen_impl <- function(graph, directed=FALSE, scale=TRUE, options=arpack_defaults, normalized=TRUE) { +centralization_eigenvector_centrality_impl <- function(graph, directed=FALSE, scale=TRUE, options=arpack_defaults, normalized=TRUE) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } directed <- as.logical(directed) @@ -787,7 +787,7 @@ centr_eigen_impl <- function(graph, directed=FALSE, scale=TRUE, options=arpack_d res } -centr_eigen_tmax_impl <- function(graph=NULL, nodes=0, directed=FALSE, scale=TRUE) { +centralization_eigenvector_centrality_tmax_impl <- function(graph=NULL, nodes=0, directed=FALSE, scale=TRUE) { # Argument checks if (!is.null(graph) && !is_igraph(graph)) { stop("Not a graph object") } nodes <- as.integer(nodes) @@ -840,7 +840,7 @@ assortativity_degree_impl <- function(graph, directed=TRUE) { res } -contract_impl <- function(graph, mapping, vertex.attr.comb=igraph_opt("vertex.attr.comb")) { +contract_vertices_impl <- function(graph, mapping, vertex.attr.comb=igraph_opt("vertex.attr.comb")) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } mapping <- as.numeric(mapping)-1 @@ -1041,7 +1041,7 @@ bipartite_projection_size_impl <- function(graph, types=NULL) { res } -bipartite_mapping_impl <- function(graph) { +is_bipartite_impl <- function(graph) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } @@ -1139,7 +1139,7 @@ cliques_impl <- function(graph, min=0, max=0) { res } -all_clique_size_counts_impl <- function(graph, min.size=0, max.size=0) { +clique_size_hist_impl <- function(graph, min.size=0, max.size=0) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } min.size <- as.integer(min.size) @@ -1168,7 +1168,7 @@ largest_cliques_impl <- function(graph) { res } -maximal_clique_size_counts_impl <- function(graph, min.size=0, max.size=0) { +maximal_cliques_hist_impl <- function(graph, min.size=0, max.size=0) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } min.size <- as.integer(min.size) @@ -1181,7 +1181,7 @@ maximal_clique_size_counts_impl <- function(graph, min.size=0, max.size=0) { res } -clique_num_impl <- function(graph) { +clique_number_impl <- function(graph) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } @@ -1243,7 +1243,7 @@ largest_weighted_cliques_impl <- function(graph, vertex.weights=NULL) { res } -weighted_clique_num_impl <- function(graph, vertex.weights=NULL) { +weighted_clique_number_impl <- function(graph, vertex.weights=NULL) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } if (is.null(vertex.weights) && "weight" %in% vertex_attr_names(graph)) { @@ -1262,7 +1262,7 @@ weighted_clique_num_impl <- function(graph, vertex.weights=NULL) { res } -similarity.jaccard_impl <- function(graph, vids=V(graph), mode=c("all", "out", "in", "total"), loops=FALSE) { +similarity_jaccard_impl <- function(graph, vids=V(graph), mode=c("all", "out", "in", "total"), loops=FALSE) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } vids <- as.igraph.vs(graph, vids) @@ -1276,7 +1276,7 @@ similarity.jaccard_impl <- function(graph, vids=V(graph), mode=c("all", "out", " res } -similarity.dice_impl <- function(graph, vids=V(graph), mode=c("all", "out", "in", "total"), loops=FALSE) { +similarity_dice_impl <- function(graph, vids=V(graph), mode=c("all", "out", "in", "total"), loops=FALSE) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } vids <- as.igraph.vs(graph, vids) @@ -1290,7 +1290,7 @@ similarity.dice_impl <- function(graph, vids=V(graph), mode=c("all", "out", "in" res } -similarity.invlogweighted_impl <- function(graph, vids=V(graph), mode=c("all", "out", "in", "total")) { +similarity_inverse_log_weighted_impl <- function(graph, vids=V(graph), mode=c("all", "out", "in", "total")) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } vids <- as.igraph.vs(graph, vids) @@ -1303,7 +1303,7 @@ similarity.invlogweighted_impl <- function(graph, vids=V(graph), mode=c("all", " res } -sample_hrg_impl <- function(hrg) { +hrg_game_impl <- function(hrg) { # Argument checks if (is.null(hrg)) { hrg <- list(left=c(), right=c(), prob=c(), edges=c(), vertices=c()) @@ -1321,7 +1321,7 @@ sample_hrg_impl <- function(hrg) { res } -hrg_tree_impl <- function(hrg) { +hrg_dendrogram_impl <- function(hrg) { # Argument checks if (is.null(hrg)) { hrg <- list(left=c(), right=c(), prob=c(), edges=c(), vertices=c()) @@ -1335,7 +1335,7 @@ hrg_tree_impl <- function(hrg) { res } -consensus_tree_impl <- function(graph, hrg=NULL, start=FALSE, num.samples=10000) { +hrg_consensus_impl <- function(graph, hrg=NULL, start=FALSE, num.samples=10000) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } if (is.null(hrg)) { @@ -1352,7 +1352,7 @@ consensus_tree_impl <- function(graph, hrg=NULL, start=FALSE, num.samples=10000) res } -hrg_impl <- function(graph, prob) { +hrg_create_impl <- function(graph, prob) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } prob <- as.numeric(prob) @@ -1390,7 +1390,7 @@ graphlets_impl <- function(graph, weights=NULL, niter=1000) { res } -as.directed_impl <- function(graph, mode=c("mutual", "arbitrary", "random", "acyclic")) { +to_directed_impl <- function(graph, mode=c("mutual", "arbitrary", "random", "acyclic")) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } mode <- switch(igraph.match.arg(mode), "arbitrary"=0, "mutual"=1, "random"=2, "acyclic"=3) @@ -1424,7 +1424,7 @@ triad_census_impl <- function(graph) { res } -count_triangles_impl <- function(graph, vids=V(graph)) { +adjacent_triangles_impl <- function(graph, vids=V(graph)) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } vids <- as.igraph.vs(graph, vids) @@ -1436,7 +1436,7 @@ count_triangles_impl <- function(graph, vids=V(graph)) { res } -triangles_impl <- function(graph) { +list_triangles_impl <- function(graph) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } @@ -1449,7 +1449,7 @@ triangles_impl <- function(graph) { res } -max_flow_impl <- function(graph, source, target, capacity=NULL) { +maxflow_impl <- function(graph, source, target, capacity=NULL) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } source <- as.igraph.vs(graph, source) @@ -1499,7 +1499,7 @@ dominator_tree_impl <- function(graph, root, mode=c("out", "in", "all", "total") res } -st_cuts_impl <- function(graph, source, target) { +all_st_cuts_impl <- function(graph, source, target) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } source <- as.igraph.vs(graph, source) @@ -1529,7 +1529,7 @@ st_cuts_impl <- function(graph, source, target) { res } -st_min_cuts_impl <- function(graph, source, target, capacity=NULL) { +all_st_mincuts_impl <- function(graph, source, target, capacity=NULL) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } source <- as.igraph.vs(graph, source) @@ -1579,7 +1579,7 @@ is_separator_impl <- function(graph, candidate) { res } -is_min_separator_impl <- function(graph, candidate) { +is_minimal_separator_impl <- function(graph, candidate) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } candidate <- as.igraph.vs(graph, candidate) @@ -1591,7 +1591,7 @@ is_min_separator_impl <- function(graph, candidate) { res } -min_st_separators_impl <- function(graph) { +all_minimal_st_separators_impl <- function(graph) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } @@ -1607,7 +1607,7 @@ min_st_separators_impl <- function(graph) { res } -min_separators_impl <- function(graph) { +minimum_size_separators_impl <- function(graph) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } @@ -1623,7 +1623,7 @@ min_separators_impl <- function(graph) { res } -graph.isoclass_impl <- function(graph) { +isoclass_impl <- function(graph) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } @@ -1634,7 +1634,7 @@ graph.isoclass_impl <- function(graph) { res } -graph.isomorphic_impl <- function(graph1, graph2) { +isomorphic_impl <- function(graph1, graph2) { # Argument checks if (!is_igraph(graph1)) { stop("Not a graph object") } if (!is_igraph(graph2)) { stop("Not a graph object") } @@ -1646,7 +1646,7 @@ graph.isomorphic_impl <- function(graph1, graph2) { res } -graph_from_isomorphism_class_impl <- function(size, number, directed=TRUE) { +isoclass_create_impl <- function(size, number, directed=TRUE) { # Argument checks size <- as.integer(size) number <- as.integer(number) @@ -1659,7 +1659,7 @@ graph_from_isomorphism_class_impl <- function(size, number, directed=TRUE) { res } -graph.isomorphic.vf2_impl <- function(graph1, graph2, vertex.color1, vertex.color2, edge.color1, edge.color2) { +isomorphic_vf2_impl <- function(graph1, graph2, vertex.color1, vertex.color2, edge.color1, edge.color2) { # Argument checks if (!is_igraph(graph1)) { stop("Not a graph object") } if (!is_igraph(graph2)) { stop("Not a graph object") } @@ -1711,7 +1711,7 @@ graph.isomorphic.vf2_impl <- function(graph1, graph2, vertex.color1, vertex.colo res } -graph.count.isomorphisms.vf2_impl <- function(graph1, graph2, vertex.color1, vertex.color2, edge.color1, edge.color2) { +count_isomorphisms_vf2_impl <- function(graph1, graph2, vertex.color1, vertex.color2, edge.color1, edge.color2) { # Argument checks if (!is_igraph(graph1)) { stop("Not a graph object") } if (!is_igraph(graph2)) { stop("Not a graph object") } @@ -1763,7 +1763,7 @@ graph.count.isomorphisms.vf2_impl <- function(graph1, graph2, vertex.color1, ver res } -graph.subisomorphic.vf2_impl <- function(graph1, graph2, vertex.color1, vertex.color2, edge.color1, edge.color2) { +subisomorphic_vf2_impl <- function(graph1, graph2, vertex.color1, vertex.color2, edge.color1, edge.color2) { # Argument checks if (!is_igraph(graph1)) { stop("Not a graph object") } if (!is_igraph(graph2)) { stop("Not a graph object") } @@ -1815,7 +1815,7 @@ graph.subisomorphic.vf2_impl <- function(graph1, graph2, vertex.color1, vertex.c res } -graph.count.subisomorphisms.vf2_impl <- function(graph1, graph2, vertex.color1, vertex.color2, edge.color1, edge.color2) { +count_subisomorphisms_vf2_impl <- function(graph1, graph2, vertex.color1, vertex.color2, edge.color1, edge.color2) { # Argument checks if (!is_igraph(graph1)) { stop("Not a graph object") } if (!is_igraph(graph2)) { stop("Not a graph object") } @@ -1867,7 +1867,7 @@ graph.count.subisomorphisms.vf2_impl <- function(graph1, graph2, vertex.color1, res } -graph.isomorphic.34_impl <- function(graph1, graph2) { +isomorphic_34_impl <- function(graph1, graph2) { # Argument checks if (!is_igraph(graph1)) { stop("Not a graph object") } if (!is_igraph(graph2)) { stop("Not a graph object") } @@ -1901,7 +1901,7 @@ canonical_permutation_impl <- function(graph, colors, sh=c("fm", "f", "fs", "fl" res } -permute_impl <- function(graph, permutation) { +permute_vertices_impl <- function(graph, permutation) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } permutation <- as.numeric(permutation)-1 @@ -1913,7 +1913,7 @@ permute_impl <- function(graph, permutation) { res } -graph.isomorphic.bliss_impl <- function(graph1, graph2, colors1, colors2, sh=c("fm", "f", "fs", "fl", "flm", "fsm")) { +isomorphic_bliss_impl <- function(graph1, graph2, colors1, colors2, sh=c("fm", "f", "fs", "fl", "flm", "fsm")) { # Argument checks if (!is_igraph(graph1)) { stop("Not a graph object") } if (!is_igraph(graph2)) { stop("Not a graph object") } @@ -1946,7 +1946,7 @@ graph.isomorphic.bliss_impl <- function(graph1, graph2, colors1, colors2, sh=c(" res } -count_automorphisms_impl <- function(graph, colors, sh=c("fm", "f", "fs", "fl", "flm", "fsm")) { +automorphisms_impl <- function(graph, colors, sh=c("fm", "f", "fs", "fl", "flm", "fsm")) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } if (missing(colors)) { @@ -1998,7 +1998,7 @@ automorphism_group_impl <- function(graph, colors, sh=c("fm", "f", "fs", "fl", " res } -scg_eps_impl <- function(V, groups, mtype=c("symmetric", "laplacian", "stochastic"), p=NULL, norm=c("row", "col")) { +scg_norm_eps_impl <- function(V, groups, mtype=c("symmetric", "laplacian", "stochastic"), p=NULL, norm=c("row", "col")) { # Argument checks V <- as.matrix(structure(as.double(V), dim=dim(V))) groups <- as.numeric(groups)-1 @@ -2013,7 +2013,7 @@ scg_eps_impl <- function(V, groups, mtype=c("symmetric", "laplacian", "stochasti res } -embed_adjacency_matrix_impl <- function(graph, no, weights=NULL, which=c("lm", "la", "sa"), scaled=TRUE, cvec=graph.strength(graph, weights=weights)/(vcount(graph)-1), options=igraph.arpack.default) { +adjacency_spectral_embedding_impl <- function(graph, no, weights=NULL, which=c("lm", "la", "sa"), scaled=TRUE, cvec=graph.strength(graph, weights=weights)/(vcount(graph)-1), options=igraph.arpack.default) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } no <- as.integer(no) @@ -2037,7 +2037,7 @@ embed_adjacency_matrix_impl <- function(graph, no, weights=NULL, which=c("lm", " res } -embed_laplacian_matrix_impl <- function(graph, no, weights=NULL, which=c("lm", "la", "sa"), type=c("default", "D-A", "DAD", "I-DAD", "OAP"), scaled=TRUE, options=igraph.arpack.default) { +laplacian_spectral_embedding_impl <- function(graph, no, weights=NULL, which=c("lm", "la", "sa"), type=c("default", "D-A", "DAD", "I-DAD", "OAP"), scaled=TRUE, options=igraph.arpack.default) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } no <- as.integer(no) @@ -2064,7 +2064,7 @@ embed_laplacian_matrix_impl <- function(graph, no, weights=NULL, which=c("lm", " res } -spectrum_impl <- function(graph, algorithm=c("arpack", "auto", "lapack", "comp_auto", "comp_lapack", "comp_arpack"), which=list(), options=arpack_defaults) { +eigen_adjacency_impl <- function(graph, algorithm=c("arpack", "auto", "lapack", "comp_auto", "comp_lapack", "comp_arpack"), which=list(), options=arpack_defaults) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } algorithm <- switch(igraph.match.arg(algorithm), "auto"=0, "lapack"=1, @@ -2178,7 +2178,7 @@ is_tree_impl <- function(graph, mode=c("out", "in", "all", "total"), details=FAL res } -make_from_prufer_impl <- function(prufer) { +from_prufer_impl <- function(prufer) { # Argument checks prufer <- as.integer(prufer)-1L @@ -2205,7 +2205,7 @@ to_prufer_impl <- function(graph) { res } -sample_spanning_tree_impl <- function(graph, vid=0) { +random_spanning_tree_impl <- function(graph, vid=0) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } vid <- as.igraph.vs(graph, vid) @@ -2222,7 +2222,7 @@ sample_spanning_tree_impl <- function(graph, vid=0) { res } -sample_tree_impl <- function(n, directed=FALSE, method=c("lerw", "prufer")) { +tree_game_impl <- function(n, directed=FALSE, method=c("lerw", "prufer")) { # Argument checks n <- as.integer(n) directed <- as.logical(directed) @@ -2235,7 +2235,7 @@ sample_tree_impl <- function(n, directed=FALSE, method=c("lerw", "prufer")) { res } -greedy_vertex_coloring_impl <- function(graph, heuristic=c("colored_neighbors")) { +vertex_coloring_greedy_impl <- function(graph, heuristic=c("colored_neighbors")) { # Argument checks if (!is_igraph(graph)) { stop("Not a graph object") } heuristic <- switch(igraph.match.arg(heuristic), "colored_neighbors"=0L) diff --git a/R/bipartite.R b/R/bipartite.R index 86ba96361e1..c8135167fe9 100644 --- a/R/bipartite.R +++ b/R/bipartite.R @@ -195,4 +195,4 @@ bipartite_projection_size <- bipartite_projection_size_impl #' bipartite_mapping(g3) #' @family bipartite #' @export -bipartite_mapping <- bipartite_mapping_impl +bipartite_mapping <- is_bipartite_impl diff --git a/R/centrality.R b/R/centrality.R index 2d43cb4bd44..e4ff617028d 100644 --- a/R/centrality.R +++ b/R/centrality.R @@ -679,7 +679,7 @@ subgraph_centrality <- function(graph, diag = FALSE) { #' #' @family centrality #' @export -spectrum <- spectrum_impl +spectrum <- eigen_adjacency_impl eigen_defaults <- list( pos = "LM", howmany = 1L, il = -1L, iu = -1L, @@ -772,7 +772,7 @@ eigen_defaults <- list( #' eigen_centrality(g) #' @family centrality #' @export -eigen_centrality <- eigen_centrality_impl +eigen_centrality <- eigenvector_centrality_impl #' Strength or weighted vertex degree @@ -1006,7 +1006,7 @@ authority_score <- authority_score_impl #' page_rank(g3, personalized = reset)$vector #' @family centrality #' @export -page_rank <- page_rank_impl +page_rank <- personalized_pagerank_impl #' Harmonic centrality of vertices #' @@ -1053,7 +1053,7 @@ page_rank <- page_rank_impl #' harmonic_centrality(g2, mode = "out") #' harmonic_centrality(g %du% make_full_graph(5), mode = "all") #' -harmonic_centrality <- harmonic_centrality_impl +harmonic_centrality <- harmonic_centrality_cutoff_impl diff --git a/R/centralization.R b/R/centralization.R index 6487d0cb954..49ca400057d 100644 --- a/R/centralization.R +++ b/R/centralization.R @@ -86,7 +86,7 @@ NULL #' g1 <- make_star(10, mode = "undirected") #' centr_eigen(g0)$centralization #' centr_eigen(g1)$centralization -centralize <- centralize_impl +centralize <- centralization_impl #' Centralize a graph according to the degrees of vertices #' @@ -119,7 +119,7 @@ centralize <- centralize_impl #' centr_clo(g, mode = "all")$centralization #' centr_betw(g, directed = FALSE)$centralization #' centr_eigen(g, directed = FALSE)$centralization -centr_degree <- centr_degree_impl +centr_degree <- centralization_degree_impl #' Theoretical maximum for degree centralization #' @@ -249,7 +249,7 @@ centr_betw <- function(graph, directed = TRUE, nobigint = TRUE, normalized = TRU #' centr_betw(g, normalized = FALSE)$centralization %>% #' `/`(centr_betw_tmax(g)) #' centr_betw(g, normalized = TRUE)$centralization -centr_betw_tmax <- centr_betw_tmax_impl +centr_betw_tmax <- centralization_betweenness_tmax_impl #' Centralize a graph according to the closeness of vertices #' @@ -280,7 +280,7 @@ centr_betw_tmax <- centr_betw_tmax_impl #' centr_clo(g, mode = "all")$centralization #' centr_betw(g, directed = FALSE)$centralization #' centr_eigen(g, directed = FALSE)$centralization -centr_clo <- centr_clo_impl +centr_clo <- centralization_closeness_impl #' Theoretical maximum for closeness centralization #' @@ -307,7 +307,7 @@ centr_clo <- centr_clo_impl #' centr_clo(g, normalized = FALSE)$centralization %>% #' `/`(centr_clo_tmax(g)) #' centr_clo(g, normalized = TRUE)$centralization -centr_clo_tmax <- centr_clo_tmax_impl +centr_clo_tmax <- centralization_closeness_tmax_impl #' Centralize a graph according to the eigenvector centrality of vertices #' @@ -349,7 +349,7 @@ centr_clo_tmax <- centr_clo_tmax_impl #' g1 <- make_star(10, mode = "undirected") #' centr_eigen(g0)$centralization #' centr_eigen(g1)$centralization -centr_eigen <- centr_eigen_impl +centr_eigen <- centralization_eigenvector_centrality_impl #' Theoretical maximum for betweenness centralization #' @@ -378,4 +378,4 @@ centr_eigen <- centr_eigen_impl #' centr_eigen(g, normalized = FALSE)$centralization %>% #' `/`(centr_eigen_tmax(g)) #' centr_eigen(g, normalized = TRUE)$centralization -centr_eigen_tmax <- centr_eigen_tmax_impl +centr_eigen_tmax <- centralization_eigenvector_centrality_tmax_impl diff --git a/R/cliques.R b/R/cliques.R index f7497cc4b34..f8df358407a 100644 --- a/R/cliques.R +++ b/R/cliques.R @@ -190,7 +190,7 @@ count_max_cliques <- function(graph, min = NULL, max = NULL, #' @family cliques #' @export -clique_num <- clique_num_impl +clique_num <- clique_number_impl #' Functions to find weighted cliques, i.e. weighted complete subgraphs in a graph @@ -257,7 +257,7 @@ weighted_cliques <- weighted_cliques_impl #' @export largest_weighted_cliques <- largest_weighted_cliques_impl #' @export -weighted_clique_num <- weighted_clique_num_impl +weighted_clique_num <- weighted_clique_number_impl #' Independent vertex sets #' @@ -402,8 +402,8 @@ ivs_size <- function(graph) { #' @export clique_size_counts <- function(graph, min = 0, max = 0, maximal = FALSE, ...) { if (maximal) { - maximal_clique_size_counts_impl(graph, min, max, ...) + maximal_cliques_hist_impl(graph, min, max, ...) } else { - all_clique_size_counts_impl(graph, min, max, ...) + clique_size_hist_impl(graph, min, max, ...) } } diff --git a/R/coloring.R b/R/coloring.R index bc0658d24a7..3544de1de20 100644 --- a/R/coloring.R +++ b/R/coloring.R @@ -26,4 +26,4 @@ #' col <- greedy_vertex_coloring(g) #' plot(g, vertex.color = col) #' -greedy_vertex_coloring <- greedy_vertex_coloring_impl +greedy_vertex_coloring <- vertex_coloring_greedy_impl diff --git a/R/community.R b/R/community.R index b3c5b8d46b6..a1d5e0ab3a9 100644 --- a/R/community.R +++ b/R/community.R @@ -2550,4 +2550,4 @@ communities <- groups.communities #' #' @export #' @family functions for manipulating graph structure -contract <- contract_impl +contract <- contract_vertices_impl diff --git a/R/conversion.R b/R/conversion.R index 9ab68859714..d29653c9fdc 100644 --- a/R/conversion.R +++ b/R/conversion.R @@ -354,7 +354,7 @@ as_edgelist <- function(graph, names = TRUE) { #' ) #' print(ug4, e = TRUE) #' -as.directed <- as.directed_impl +as.directed <- to_directed_impl #' @rdname as.directed #' @param edge.attr.comb Specifies what to do with edge attributes, if @@ -971,7 +971,7 @@ as_data_frame <- function(x, what = c("edges", "vertices", "both")) { #' which_multiple(g3) #' @family conversion #' @export -graph_from_adj_list <- graph_from_adj_list_impl +graph_from_adj_list <- adjlist_impl #' Convert a graph to a long data frame diff --git a/R/embedding.R b/R/embedding.R index d0cafec8207..d7818ec0ab6 100644 --- a/R/embedding.R +++ b/R/embedding.R @@ -90,7 +90,7 @@ #' embed <- embed_adjacency_matrix(RDP, 5) #' @family embedding #' @export -embed_adjacency_matrix <- embed_adjacency_matrix_impl +embed_adjacency_matrix <- adjacency_spectral_embedding_impl #' Dimensionality selection for singular values using profile likelihood. @@ -230,7 +230,7 @@ dim_select <- dim_select_impl #' RDP <- sample_dot_product(lpvs) #' embed <- embed_laplacian_matrix(RDP, 5) #' @family embedding -embed_laplacian_matrix <- embed_laplacian_matrix_impl +embed_laplacian_matrix <- laplacian_spectral_embedding_impl #' Sample vectors uniformly from the surface of a sphere diff --git a/R/flow.R b/R/flow.R index 1977df4d51e..3463d982aa5 100644 --- a/R/flow.R +++ b/R/flow.R @@ -445,7 +445,7 @@ cohesion.igraph <- function(x, checks = TRUE, ...) { #' st_cuts(g2, source = "s", target = "t") #' @family flow #' @export -st_cuts <- st_cuts_impl +st_cuts <- all_st_cuts_impl #' List all minimum \eqn{(s,t)}-cuts of a graph @@ -496,7 +496,7 @@ st_cuts <- st_cuts_impl #' st_min_cuts(g, source = "s", target = "t") #' @family flow #' @export -st_min_cuts <- st_min_cuts_impl +st_min_cuts <- all_st_mincuts_impl #' Dominator tree @@ -616,7 +616,7 @@ dominator_tree <- function(graph, root, mode = c("out", "in", "all", "total")) { #' chvatal <- make_graph("chvatal") #' min_st_separators(chvatal) #' @family flow -min_st_separators <- min_st_separators_impl +min_st_separators <- all_minimal_st_separators_impl #' Maximum flow in a graph @@ -679,7 +679,7 @@ min_st_separators <- min_st_separators_impl #' max_flow(g1, source = V(g1)["1"], target = V(g1)["2"]) #' @family flow #' @export -max_flow <- max_flow_impl +max_flow <- maxflow_impl #' Vertex separators @@ -758,7 +758,7 @@ is_separator <- is_separator_impl #' #' @family flow #' @export -is_min_separator <- is_min_separator_impl +is_min_separator <- is_minimal_separator_impl #' Minimum size vertex separators @@ -830,4 +830,4 @@ is_min_separator <- is_min_separator_impl #' John - Gery:Russ:Michael #' ) #' min_separators(camp) -min_separators <- min_separators_impl +min_separators <- minimum_size_separators_impl diff --git a/R/games.R b/R/games.R index 1f6afd50163..f81d5dcf9ae 100644 --- a/R/games.R +++ b/R/games.R @@ -1405,7 +1405,7 @@ bipartite <- function(...) constructor_spec(sample_bipartite, ...) #' g #' @family games #' @export -sample_sbm <- sample_sbm_impl +sample_sbm <- sbm_game_impl #' @rdname sample_sbm #' @param ... Passed to `sample_sbm()`. @@ -1464,7 +1464,7 @@ sample_hierarchical_sbm <- function(n, m, rho, C, p) { commonlen <- unique(c(mlen, rholen, Clen)) if (length(commonlen) == 1 && commonlen == 1) { - hsbm_1_game_impl(n, m, rho, C, p) + hsbm_game_impl(n, m, rho, C, p) } else { commonlen <- setdiff(commonlen, 1) if (length(commonlen) != 1) { @@ -1536,7 +1536,7 @@ hierarchical_sbm <- function(...) { #' g2 #' @family games #' @export -sample_dot_product <- sample_dot_product_impl +sample_dot_product <- dot_product_game_impl #' @rdname sample_dot_product #' @param ... Passed to `sample_dot_product()`. @@ -1569,7 +1569,7 @@ dot_product <- function(...) constructor_spec(sample_dot_product, ...) #' @keywords graphs #' @family games #' @export -sample_islands <- sample_islands_impl +sample_islands <- simple_interconnected_islands_game_impl #' Create a random regular graph @@ -1608,7 +1608,7 @@ sample_islands <- sample_islands_impl #' sapply(k10, plot, vertex.label = NA) #' @family games #' @export -sample_k_regular <- sample_k_regular_impl +sample_k_regular <- k_regular_game_impl #' Random graphs from vertex fitness scores @@ -1670,7 +1670,7 @@ sample_k_regular <- sample_k_regular_impl #' g <- sample_fitness(5 * N, sample((1:50)^-2, N, replace = TRUE)) #' degree_distribution(g) #' plot(degree_distribution(g, cumulative = TRUE), log = "xy") -sample_fitness <- sample_fitness_impl +sample_fitness <- static_fitness_game_impl #' Scale-free random graphs, from vertex fitness scores @@ -1737,7 +1737,7 @@ sample_fitness <- sample_fitness_impl #' #' g <- sample_fitness_pl(10000, 30000, 2.2, 2.3) #' plot(degree_distribution(g, cumulative = TRUE, mode = "out"), log = "xy") -sample_fitness_pl <- sample_fitness_pl_impl +sample_fitness_pl <- static_power_law_game_impl #' Forest Fire Network Model @@ -1795,7 +1795,7 @@ sample_fitness_pl <- sample_fitness_pl_impl #' dd2 <- degree_distribution(g, mode = "out") #' plot(seq(along.with = dd1) - 1, dd1, log = "xy") #' points(seq(along.with = dd2) - 1, dd2, col = 2, pch = 2) -sample_forestfire <- sample_forestfire_impl +sample_forestfire <- forest_fire_game_impl #' Generate a new random graph from a given graph by randomly @@ -1836,7 +1836,7 @@ sample_forestfire <- sample_forestfire_impl #' cor(as.vector(g[]), as.vector(g2[])) #' g #' g2 -sample_correlated_gnp <- sample_correlated_gnp_impl +sample_correlated_gnp <- correlated_game_impl #' Sample a pair of correlated \eqn{G(n,p)} random graphs @@ -1875,4 +1875,4 @@ sample_correlated_gnp <- sample_correlated_gnp_impl #' ) #' gg #' cor(as.vector(gg[[1]][]), as.vector(gg[[2]][])) -sample_correlated_gnp_pair <- sample_correlated_gnp_pair_impl +sample_correlated_gnp_pair <- correlated_pair_game_impl diff --git a/R/hrg.R b/R/hrg.R index af4521eafc1..e2345aadf9c 100644 --- a/R/hrg.R +++ b/R/hrg.R @@ -174,7 +174,7 @@ fit_hrg <- function(graph, hrg = NULL, start = FALSE, steps = 0) { #' vertices. The order is the same as in the `parents` vector.} #' @family hierarchical random graph functions #' @export -consensus_tree <- consensus_tree_impl +consensus_tree <- hrg_consensus_impl #' Create a hierarchical random graph from an igraph graph @@ -192,7 +192,7 @@ consensus_tree <- consensus_tree_impl #' #' @family hierarchical random graph functions #' @export -hrg <- hrg_impl +hrg <- hrg_create_impl #' Create an igraph graph from a hierarchical random graph model @@ -205,7 +205,7 @@ hrg <- hrg_impl #' #' @family hierarchical random graph functions #' @export -hrg_tree <- hrg_tree_impl +hrg_tree <- hrg_dendrogram_impl #' Sample from a hierarchical random graph model @@ -219,7 +219,7 @@ hrg_tree <- hrg_tree_impl #' #' @family hierarchical random graph functions #' @export -sample_hrg <- sample_hrg_impl +sample_hrg <- hrg_game_impl #' Predict edges based on a hierarchical random graph model #' diff --git a/R/interface.R b/R/interface.R index 02d626e7826..de192ff4b64 100644 --- a/R/interface.R +++ b/R/interface.R @@ -496,10 +496,10 @@ get.edge.ids <- function(graph, vp, directed = TRUE, error = FALSE, multi = FALS #' g <- make_ring(10) #' gorder(g) #' vcount(g) -gorder <- gorder_impl +gorder <- vcount_impl #' @rdname gorder #' @export -vcount <- gorder_impl +vcount <- vcount_impl #' Adjacent vertices of multiple vertices in a graph #' diff --git a/R/make.R b/R/make.R index 15276afcc40..b57bf56c299 100644 --- a/R/make.R +++ b/R/make.R @@ -1217,7 +1217,7 @@ make_tree <- function(n, children = 2, mode = c("out", "in", "undirected")) { #' g <- sample_tree(100, method = "lerw") #' #' @export -sample_tree <- sample_tree_impl +sample_tree <- tree_game_impl #' @rdname make_tree #' @param ... Passed to `make_tree()` or `sample_tree()`. @@ -1249,7 +1249,7 @@ tree <- function(...) constructor_spec(list(make = make_tree, sample = sample_tr #' to_prufer(g) #' @family trees #' @export -make_from_prufer <- make_from_prufer_impl +make_from_prufer <- from_prufer_impl #' @rdname make_from_prufer #' @param ... Passed to `make_from_prufer()` @@ -1698,7 +1698,7 @@ full_citation_graph <- function(...) constructor_spec(make_full_citation_graph, #' g2 <- make_graph("Franklin") #' isomorphic(g1, g2) #' @export -graph_from_lcf <- graph_from_lcf_impl +graph_from_lcf <- lcf_vector_impl ## ----------------------------------------------------------------- @@ -1791,4 +1791,4 @@ graph_from_lcf <- graph_from_lcf_impl #' } #' g5 <- realize_degseq(degs, allowed.edge.types = "multi") #' all(degree(g5) == degs) -realize_degseq <- realize_degseq_impl +realize_degseq <- realize_degree_sequence_impl diff --git a/R/paths.R b/R/paths.R index ff682ebeb49..8ad3623f81c 100644 --- a/R/paths.R +++ b/R/paths.R @@ -160,7 +160,7 @@ is_dag <- is_dag_impl #' max_cardinality(g2) #' is_chordal(g2, fillin = TRUE) #' @family chordal -max_cardinality <- max_cardinality_impl +max_cardinality <- maximum_cardinality_search_impl #' Eccentricity of the vertices in a graph @@ -236,4 +236,4 @@ radius <- radius_impl #' this argument is ignored for undirected graphs. #' @family paths #' @export -distance_table <- distance_table_impl +distance_table <- path_length_hist_impl diff --git a/R/scg.R b/R/scg.R index 19e16d9f0c8..33107975087 100644 --- a/R/scg.R +++ b/R/scg.R @@ -846,4 +846,4 @@ myscg <- function(graph, matrix, sparsemat, ev, nt, groups = NULL, #' sum(km$withinss) #' scg_eps(cbind(v), km$cluster)^2 #' @family scg -scg_eps <- scg_eps_impl +scg_eps <- scg_norm_eps_impl diff --git a/R/similarity.R b/R/similarity.R index bb6a98a1b15..1dd78f2baaf 100644 --- a/R/similarity.R +++ b/R/similarity.R @@ -71,8 +71,8 @@ similarity <- function(graph, vids = V(graph), } #' @export -similarity.jaccard <- similarity.jaccard_impl +similarity.jaccard <- similarity_jaccard_impl #' @export -similarity.dice <- similarity.dice_impl +similarity.dice <- similarity_dice_impl #' @export -similarity.invlogweighted <- similarity.invlogweighted_impl +similarity.invlogweighted <- similarity_inverse_log_weighted_impl diff --git a/R/structural.properties.R b/R/structural.properties.R index 80ddc181ec4..61a78ed5a82 100644 --- a/R/structural.properties.R +++ b/R/structural.properties.R @@ -162,7 +162,7 @@ farthest_vertices <- function(graph, directed = TRUE, unconnected = TRUE, #' @family structural.properties #' @export #' @rdname distances -mean_distance <- mean_distance_impl +mean_distance <- average_path_length_dijkstra_impl @@ -1545,15 +1545,15 @@ girth <- function(graph, circle = TRUE) { #' any(which_multiple(g)) #' E(g)$weight #' -which_multiple <- which_multiple_impl +which_multiple <- is_multiple_impl #' @export -any_multiple <- any_multiple_impl +any_multiple <- has_multiple_impl #' @export count_multiple <- count_multiple_impl #' @export -which_loop <- which_loop_impl +which_loop <- is_loop_impl #' @export -any_loop <- any_loop_impl +any_loop <- has_loop_impl #' Breadth-first search @@ -2272,7 +2272,7 @@ max_bipartite_match <- function(graph, types = NULL, weights = NULL, #' sum(which_mutual(g)) / 2 == dyad_census(g)$mut #' @family structural.properties #' @export -which_mutual <- which_mutual_impl +which_mutual <- is_mutual_impl #' Average nearest neighbor degree @@ -2345,4 +2345,4 @@ which_mutual <- which_mutual_impl #' knn(g5) #' @family structural.properties #' @export -knn <- knn_impl +knn <- avg_nearest_neighbor_degree_impl diff --git a/R/topology.R b/R/topology.R index 4e551d06274..2751d75b567 100644 --- a/R/topology.R +++ b/R/topology.R @@ -337,13 +337,13 @@ isomorphic <- function(graph1, graph2, method = c( } #' @export -graph.isomorphic.34 <- graph.isomorphic.34_impl +graph.isomorphic.34 <- isomorphic_34_impl #' @export -graph.isomorphic.bliss <- graph.isomorphic.bliss_impl +graph.isomorphic.bliss <- isomorphic_bliss_impl #' @export -graph.isomorphic.vf2 <- graph.isomorphic.vf2_impl +graph.isomorphic.vf2 <- isomorphic_vf2_impl #' @export -graph.subisomorphic.vf2 <- graph.subisomorphic.vf2_impl +graph.subisomorphic.vf2 <- subisomorphic_vf2_impl #' @export #' @rdname isomorphic @@ -502,7 +502,7 @@ count_isomorphisms <- function(graph1, graph2, method = "vf2", ...) { } #' @export -graph.count.isomorphisms.vf2 <- graph.count.isomorphisms.vf2_impl +graph.count.isomorphisms.vf2 <- count_isomorphisms_vf2_impl #' Count the isomorphic mappings between a graph and the subgraphs of #' another graph @@ -577,7 +577,7 @@ count_subgraph_isomorphisms <- function(pattern, target, } #' @export -graph.count.subisomorphisms.vf2 <- graph.count.subisomorphisms.vf2_impl +graph.count.subisomorphisms.vf2 <- count_subisomorphisms_vf2_impl #' Calculate all isomorphic mappings between the vertices of two graphs #' @@ -699,7 +699,7 @@ isomorphism_class <- function(graph, v) { } #' @export -graph.isoclass <- graph.isoclass_impl +graph.isoclass <- isoclass_impl #' Create a graph from an isomorphism class #' @@ -719,7 +719,7 @@ graph.isoclass <- graph.isoclass_impl #' #' @family graph isomorphism #' @export -graph_from_isomorphism_class <- graph_from_isomorphism_class_impl +graph_from_isomorphism_class <- isoclass_create_impl #' Canonical permutation of a graph @@ -838,10 +838,10 @@ canonical_permutation <- canonical_permutation_impl #' all(sort(E(g2)$weight) == sort(E(g)$weight)) #' @export #' @family functions for manipulating graph structure -permute <- permute_impl +permute <- permute_vertices_impl #' @export -graph.isomorphic <- graph.isomorphic_impl +graph.isomorphic <- isomorphic_impl #' Number of automorphisms #' @@ -903,7 +903,7 @@ graph.isomorphic <- graph.isomorphic_impl #' count_automorphisms(g, colors = c(1, 2, 1, 2)) #' @family graph automorphism #' @export -count_automorphisms <- count_automorphisms_impl +count_automorphisms <- automorphisms_impl #' Generating set of the automorphism group of a graph diff --git a/R/trees.R b/R/trees.R index df45e16ab25..d51e0385ab0 100644 --- a/R/trees.R +++ b/R/trees.R @@ -88,4 +88,4 @@ to_prufer <- to_prufer_impl #' #' @family trees #' @export -sample_spanning_tree <- sample_spanning_tree_impl +sample_spanning_tree <- random_spanning_tree_impl diff --git a/R/triangles.R b/R/triangles.R index 22f1b1e7175..4f0e6576e41 100644 --- a/R/triangles.R +++ b/R/triangles.R @@ -70,9 +70,9 @@ #' @family triangles #' @export #' @rdname count_triangles -triangles <- triangles_impl +triangles <- list_triangles_impl #' @export #' @family triangles #' @rdname count_triangles -count_triangles <- count_triangles_impl +count_triangles <- adjacent_triangles_impl diff --git a/tools/stimulus/functions-R.yaml b/tools/stimulus/functions-R.yaml index e2492e222f3..1d815470784 100644 --- a/tools/stimulus/functions-R.yaml +++ b/tools/stimulus/functions-R.yaml @@ -18,18 +18,12 @@ igraph_add_edges: igraph_add_vertices: IGNORE: RR, RC, RInit - NAME: add.vertices igraph_delete_edges: IGNORE: RR, RC - NAME: delete.edges igraph_delete_vertices: IGNORE: RR, RC - NAME: delete.vertices - -igraph_vcount: - NAME: gorder igraph_ecount: IGNORE: RR, RC @@ -45,11 +39,9 @@ igraph_degree: igraph_edge: IGNORE: RR, RC, RInit - NAME: get.edge igraph_edges: IGNORE: RR, RC - NAME: ends igraph_get_eid: IGNORE: RR, RC, RInit @@ -121,19 +113,14 @@ igraph_famous: IGNORE: RR, RC igraph_lcf_vector: - NAME: graph_from_lcf R: GATTR: name: LCF graph -igraph_adjlist: - NAME: graph_from_adj_list - igraph_full_bipartite: IGNORE: RR igraph_realize_degree_sequence: - NAME: realize_degseq PARAMS: |- OUT GRAPH graph, VECTOR out_deg, VECTOR_OR_0 in_deg=NULL, EDGE_TYPE_SW allowed_edge_types=SIMPLE, REALIZE_DEGSEQ_METHOD method=SMALLEST @@ -206,7 +193,6 @@ igraph_citing_cited_type_game: IGNORE: RR, RC igraph_forest_fire_game: - NAME: sample_forestfire R: GATTR: name: Forest fire model @@ -214,35 +200,30 @@ igraph_forest_fire_game: igraph_simple_interconnected_islands_game: IGNORE: RC - NAME: sample_islands R: GATTR: name: Interconnected islands model GATTR-PARAM: islands_n, islands_size, islands_pin, n_inter igraph_static_fitness_game: - NAME: sample_fitness R: GATTR: name: Static fitness model GATTR-PARAM: loops, multiple igraph_static_power_law_game: - NAME: sample_fitness_pl R: GATTR: name: Static power law model GATTR-PARAM: exponent_out, exponent_in, loops, multiple, finite_size_correction igraph_k_regular_game: - NAME: sample_k_regular R: GATTR: name: k-regular graph GATTR-PARAM: k igraph_sbm_game: - NAME: sample_sbm R: GATTR: name: Stochastic block model @@ -250,7 +231,6 @@ igraph_sbm_game: igraph_hsbm_game: INTERNAL: true - NAME: hsbm_1_game R: GATTR: name: Hierarchical stochastic block model @@ -264,18 +244,11 @@ igraph_hsbm_list_game: GATTR-PARAM: p igraph_correlated_game: - NAME: sample_correlated_gnp R: GATTR: name: Correlated random graph GATTR-PARAM: corr, p -igraph_correlated_pair_game: - NAME: sample_correlated_gnp_pair - -igraph_dot_product_game: - NAME: sample_dot_product - ####################################### # Basic query functions ####################################### @@ -337,7 +310,6 @@ igraph_shortest_paths_johnson: igraph_get_all_simple_paths: IGNORE: RR - NAME: all_simple_paths R: PP: get.all.simple.paths.pp @@ -360,15 +332,8 @@ igraph_harmonic_centrality: # This is handled by igraph_harmonic_centrality_cutoff IGNORE: RR, RC, RInit -igraph_harmonic_centrality_cutoff: - NAME: harmonic_centrality - igraph_pagerank: IGNORE: RR, RC, RInit - NAME: page_rank - -igraph_personalized_pagerank: - NAME: page_rank igraph_rewire: IGNORE: RR, RC @@ -378,7 +343,6 @@ igraph_induced_subgraph: igraph_subgraph_edges: IGNORE: RR - NAME: subgraph.edges igraph_average_path_length: # No need for it, igraph_average_path_length_dijkstra takes care of the @@ -386,14 +350,10 @@ igraph_average_path_length: IGNORE: RR, RC, RInit igraph_average_path_length_dijkstra: - NAME: mean_distance PARAM_NAMES: unconn_pairs: unconnected unconn: unconnected -igraph_path_length_hist: - NAME: distance_table - igraph_transitivity_undirected: IGNORE: RR, RC @@ -430,22 +390,14 @@ igraph_neighborhood_graphs: igraph_topological_sorting: IGNORE: RR, RC -igraph_has_loop: - NAME: any_loop - igraph_is_loop: - NAME: which_loop PARAM_NAMES: es: eids igraph_is_multiple: - NAME: which_multiple PARAM_NAMES: es: eids -igraph_has_multiple: - NAME: any_multiple - igraph_count_multiple: PARAM_NAMES: es: eids @@ -457,7 +409,6 @@ igraph_add_edge: IGNORE: RR, RC, RInit igraph_eigenvector_centrality: - NAME: eigen_centrality # This is a temporary hack; we need to find a way to handle default values # for dependencies. The problem is that the VERTEXINDEX type needs two # dependencies: the graph and the vertex set, but we only have the graph @@ -486,57 +437,21 @@ igraph_arpack_rnsolve: igraph_arpack_unpack_complex: IGNORE: RR - NAME: arpack.unpack.complex igraph_unfold_tree: IGNORE: RR igraph_is_mutual: - NAME: which_mutual PARAM_NAMES: es: eids -igraph_maximum_cardinality_search: - NAME: max_cardinality - igraph_is_chordal: IGNORE: RR, RC, RInit -igraph_avg_nearest_neighbor_degree: - NAME: knn - -igraph_centralization: - NAME: centralize - -igraph_centralization_degree: - NAME: centr_degree - igraph_centralization_degree_tmax: # temporarily coded manually because we need to handle a deprecation # between igraph 1.3.0 and 1.4.0 IGNORE: RR - NAME: centr_degree_tmax - -igraph_centralization_betweenness: - NAME: centr_betw - -igraph_centralization_betweenness_tmax: - NAME: centr_betw_tmax - -igraph_centralization_closeness: - NAME: centr_clo - -igraph_centralization_closeness_tmax: - NAME: centr_clo_tmax - -igraph_centralization_eigenvector_centrality: - NAME: centr_eigen - -igraph_centralization_eigenvector_centrality_tmax: - NAME: centr_eigen_tmax - -igraph_contract_vertices: - NAME: contract igraph_random_walk: PARAM_ORDER: graph, start, steps, ... @@ -550,7 +465,6 @@ igraph_random_edge_walk: igraph_is_degree_sequence: IGNORE: RR, RC, RInit - NAME: is_degseq igraph_is_graphical_degree_sequence: IGNORE: RR, RC, RInit @@ -574,21 +488,15 @@ igraph_dfs: igraph_bipartite_projection: IGNORE: RR, RC, RInit - NAME: bipartite.projection igraph_create_bipartite: IGNORE: RR - NAME: make_bipartite_graph igraph_incidence: IGNORE: RR igraph_get_incidence: IGNORE: RR - NAME: as_incidence_matrix - -igraph_is_bipartite: - NAME: bipartite_mapping igraph_bipartite_game_gnp: IGNORE: RR @@ -602,7 +510,6 @@ igraph_bipartite_game_gnm: igraph_laplacian: IGNORE: RR, RC, RInit - NAME: laplacian_matrix ####################################### # Components @@ -623,9 +530,6 @@ igraph_cliques: min_size: min max_size: max -igraph_clique_number: - NAME: clique_num - igraph_cliques_callback: IGNORE: RR, RC, RInit @@ -637,27 +541,20 @@ igraph_maximal_cliques_callback: igraph_maximal_cliques_count: IGNORE: RR, RC, RInit - NAME: count_max_cliques igraph_maximal_cliques_file: IGNORE: RR, RC, RInit - NAME: maximal.cliques.file igraph_clique_size_hist: # Wrapper function is hand-rolled in the R layer; the generated version # is renamed and internal - NAME: all_clique_size_counts INTERNAL: true igraph_maximal_cliques_hist: # Wrapper function is hand-rolled in the R layer; the generated version # is renamed and internal - NAME: maximal_clique_size_counts INTERNAL: true -igraph_weighted_clique_number: - NAME: weighted_clique_num - igraph_weighted_cliques_callback: IGNORE: RR, RC, RInit @@ -685,23 +582,18 @@ igraph_layout_circle: igraph_layout_star: IGNORE: RR - NAME: layout_as_star igraph_layout_grid: IGNORE: RR - NAME: layout.grid igraph_layout_grid_3d: IGNORE: RR - NAME: layout.grid.3d igraph_layout_fruchterman_reingold: IGNORE: RR, RC, RInit - NAME: layout.fruchterman.reingold igraph_layout_kamada_kawai: IGNORE: RR, RC, RInit - NAME: layout.kamada.kawai igraph_layout_lgl: IGNORE: RR, RC @@ -726,38 +618,30 @@ igraph_layout_kamada_kawai_3d: igraph_layout_graphopt: IGNORE: RR, RC, RInit - NAME: layout.graphopt igraph_layout_drl: IGNORE: RR - NAME: layout.drl igraph_layout_drl_3d: IGNORE: RR - NAME: layout.drl igraph_layout_merge_dla: IGNORE: RR, RC igraph_layout_sugiyama: IGNORE: RR - NAME: layout.sugiyama igraph_layout_mds: IGNORE: RR - NAME: layout.mds igraph_layout_bipartite: IGNORE: RR - NAME: layout_as_bipartite igraph_layout_gem: IGNORE: RR - NAME: layout.gem igraph_layout_davidson_harel: IGNORE: RR - NAME: layout.davidson.harel ####################################### # Cocitation and other similarity measures @@ -769,15 +653,6 @@ igraph_cocitation: igraph_bibcoupling: IGNORE: RR, RC -igraph_similarity_jaccard: - NAME: similarity.jaccard - -igraph_similarity_dice: - NAME: similarity.dice - -igraph_similarity_inverse_log_weighted: - NAME: similarity.invlogweighted - ####################################### # Community structure ####################################### @@ -808,90 +683,67 @@ igraph_community_to_membership: igraph_le_community_to_membership: IGNORE: RR, RC, RInit - NAME: community.le.to.membership igraph_modularity: IGNORE: RR - NAME: modularity.igraph igraph_modularity_matrix: IGNORE: RR igraph_reindex_membership: IGNORE: RR, RC, RInit - NAME: reindex.membership igraph_community_leading_eigenvector: IGNORE: RR, RC, RInit - NAME: cluster_leading_eigen R: CLASS: igraph.eigenc igraph_community_fluid_communities: IGNORE: RR - NAME: cluster_fluid_communities igraph_community_label_propagation: IGNORE: RR - NAME: cluster_label_prop igraph_community_leiden: IGNORE: RR - NAME: cluster_leiden igraph_community_multilevel: IGNORE: RR - NAME: cluster_louvain igraph_community_optimal_modularity: IGNORE: RR - NAME: cluster_optimal igraph_split_join_distance: IGNORE: RR - NAME: split.join.distance igraph_hrg_fit: IGNORE: RR - NAME: fit_hrg R: CLASS: igraphHRG igraph_hrg_game: - NAME: sample_hrg R: GATTR: name: Hierarchical random graph model -igraph_hrg_dendrogram: - NAME: hrg_tree - -igraph_hrg_consensus: - NAME: consensus_tree - igraph_hrg_predict: IGNORE: RR - NAME: predict_edges igraph_hrg_create: - NAME: hrg R: CLASS: igraphHRG igraph_community_infomap: IGNORE: RR - NAME: cluster_infomap igraph_graphlets: IGNORE: RC igraph_graphlets_candidate_basis: IGNORE: RR, RC - NAME: graphlets.candidate.basis igraph_graphlets_project: IGNORE: RR, RC, RInit - NAME: graphlets.project ####################################### # Conversion @@ -905,15 +757,12 @@ igraph_get_edgelist: igraph_to_directed: PARAMS: INOUT GRAPH graph, TODIRECTED mode=MUTUAL - NAME: as.directed igraph_to_undirected: IGNORE: RR - NAME: as.undirected igraph_get_stochastic: IGNORE: RR - NAME: stochastic_matrix igraph_get_stochastic_sparsemat: IGNORE: RR @@ -989,9 +838,6 @@ igraph_motifs_randesu_estimate: igraph_motifs_randesu_no: IGNORE: RR, RC -igraph_adjacent_triangles: - NAME: count_triangles - igraph_local_scan_0: IGNORE: RR @@ -1013,9 +859,6 @@ igraph_local_scan_k_ecount_them: igraph_local_scan_neighborhood_ecount: IGNORE: RR -igraph_list_triangles: - NAME: triangles - ####################################### # Graph operators ####################################### @@ -1051,9 +894,6 @@ igraph_compose: # Maximum flows, minimum cuts ####################################### -igraph_maxflow: - NAME: max_flow - igraph_maxflow_value: IGNORE: RR, RC, RInit @@ -1097,24 +937,8 @@ igraph_cohesion: # Listing s-t cuts, separators ####################################### -igraph_all_st_cuts: - NAME: st_cuts - -igraph_all_st_mincuts: - NAME: st_min_cuts - -igraph_is_minimal_separator: - NAME: is_min_separator - -igraph_all_minimal_st_separators: - NAME: min_st_separators - -igraph_minimum_size_separators: - NAME: min_separators - igraph_cohesive_blocks: IGNORE: RR, RC - NAME: cohesive.blocks R: CLASS: cohesiveBlocks @@ -1129,48 +953,17 @@ igraph_coreness: # Graph isomorphism ####################################### -igraph_isoclass: - NAME: graph.isoclass - igraph_isoclass_subgraph: IGNORE: RR -igraph_isoclass_create: - NAME: graph_from_isomorphism_class - -igraph_isomorphic: - NAME: graph.isomorphic - -igraph_isomorphic_34: - NAME: graph.isomorphic.34 - -igraph_isomorphic_bliss: - NAME: graph.isomorphic.bliss - -igraph_isomorphic_vf2: - NAME: graph.isomorphic.vf2 - -igraph_count_isomorphisms_vf2: - NAME: graph.count.isomorphisms.vf2 - -igraph_count_subisomorphisms_vf2: - NAME: graph.count.subisomorphisms.vf2 - igraph_get_isomorphisms_vf2: IGNORE: RR igraph_get_subisomorphisms_vf2: IGNORE: RR -igraph_permute_vertices: - NAME: permute - igraph_subisomorphic_lad: IGNORE: RR, RC, RInit - NAME: graph.subisomorphic.lad - -igraph_subisomorphic_vf2: - NAME: graph.subisomorphic.vf2 igraph_simplify_and_colorize: # Despite their names, vertex_color and edge_color are not really colors @@ -1180,23 +973,15 @@ igraph_simplify_and_colorize: # R function is hand-rolled IGNORE: RR -igraph_automorphisms: - NAME: count_automorphisms - ####################################### # SCG ####################################### igraph_scg_grouping: IGNORE: RR - NAME: scg_group igraph_scg_semiprojectors: IGNORE: RR, RC, RInit - NAME: scg_semi_proj - -igraph_scg_norm_eps: - NAME: scg_eps igraph_scg_adjacency: IGNORE: RR, RC, RInit @@ -1216,11 +1001,9 @@ igraph_is_matching: igraph_is_maximal_matching: IGNORE: RR - NAME: is_max_matching igraph_maximum_bipartite_matching: IGNORE: RR - NAME: max_bipartite_match ####################################### # Embedding @@ -1228,33 +1011,26 @@ igraph_maximum_bipartite_matching: igraph_adjacency_spectral_embedding: IGNORE: RC - NAME: embed_adjacency_matrix igraph_laplacian_spectral_embedding: IGNORE: RC - NAME: embed_laplacian_matrix ####################################### # Eigensolvers ####################################### -igraph_eigen_adjacency: - NAME: spectrum - ####################################### # Fitting power laws ####################################### igraph_power_law_fit: IGNORE: RR - NAME: power.law.fit.new ####################################### # Dynamics, on networks ####################################### igraph_sir: - NAME: sir R: CLASS: sir @@ -1294,30 +1070,21 @@ igraph_eulerian_cycle: ####################################### igraph_from_prufer: - NAME: make_from_prufer R: GATTR: name: Tree from Prufer sequence GATTR-PARAM: prufer -igraph_tree_game: - NAME: sample_tree - igraph_random_spanning_tree: PARAMS: GRAPH graph, OUT EDGESET res, OPTIONAL VERTEX vid=0 - NAME: sample_spanning_tree ####################################### # Coloring ####################################### -igraph_vertex_coloring_greedy: - NAME: greedy_vertex_coloring - ####################################### # Other, (yet) undocumented functions ####################################### igraph_convergence_degree: IGNORE: RR, RC, RInit -