From 3615fb0d2ccf6247130be216f35e5e4de5b40d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Tue, 20 Jun 2023 08:11:38 +0200 Subject: [PATCH] Align autogeneration --- R/aaa-auto.R | 5 +---- R/motifs.R | 8 +++++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/R/aaa-auto.R b/R/aaa-auto.R index b31b7459400..224c3e23f3f 100644 --- a/R/aaa-auto.R +++ b/R/aaa-auto.R @@ -1406,10 +1406,6 @@ dyad_census_impl <- function(graph) { # Argument checks ensure_igraph(graph) - if (!is_directed(graph)) { - warn("`dyad_census()` requires a directed graph.") - } - on.exit( .Call(R_igraph_finalizer) ) # Function call res <- .Call(R_igraph_dyad_census, graph) @@ -2253,3 +2249,4 @@ vertex_coloring_greedy_impl <- function(graph, heuristic=c("colored_neighbors")) } res } + diff --git a/R/motifs.R b/R/motifs.R index f688e471929..79e28e19aca 100644 --- a/R/motifs.R +++ b/R/motifs.R @@ -191,7 +191,13 @@ sample_motifs <- function(graph, size = 3, cut.prob = rep(0, size), #' dyad_census(g) #' @family graph motifs #' @export -dyad_census <- dyad_census_impl +dyad_census <- function(graph) { + if (!is_directed(graph)) { + warn("`dyad_census()` requires a directed graph.") + } + + dyad_census_impl(graph) +} #' Triad census, subgraphs with three vertices