From 34901ccf386aa367ef8acc30f0248000b087e2b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szabolcs=20Horva=CC=81t?= Date: Tue, 5 Nov 2024 09:55:36 +0000 Subject: [PATCH] fix: temporarily disable generating an interface for `igraph_simple_cycles_callback()` as the framework for handling callback functions is not yet present --- R/aaa-auto.R | 14 -------------- src/cpp11.cpp | 2 -- src/rinterface.c | 28 ---------------------------- tools/stimulus/functions-R.yaml | 5 +++++ 4 files changed, 5 insertions(+), 44 deletions(-) diff --git a/R/aaa-auto.R b/R/aaa-auto.R index 72a1ecf8b2..1ff5d31d69 100644 --- a/R/aaa-auto.R +++ b/R/aaa-auto.R @@ -3598,20 +3598,6 @@ simple_cycles_impl <- function(graph, mode=c("out", "in", "all", "total"), max.c res } -simple_cycles_callback_impl <- function(graph, mode=c("out", "in", "all", "total"), max.cycle.length=-1, cycle.handler) { - # Argument checks - ensure_igraph(graph) - mode <- switch(igraph.match.arg(mode), "out"=1L, "in"=2L, "all"=3L, "total"=3L) - max.cycle.length <- as.numeric(max.cycle.length) - - on.exit( .Call(R_igraph_finalizer) ) - # Function call - res <- .Call(R_igraph_simple_cycles_callback, graph, mode, max.cycle.length, cycle.handler) - - - res -} - is_eulerian_impl <- function(graph) { # Argument checks ensure_igraph(graph) diff --git a/src/cpp11.cpp b/src/cpp11.cpp index 50fc6500eb..db2c70976e 100644 --- a/src/cpp11.cpp +++ b/src/cpp11.cpp @@ -402,7 +402,6 @@ extern SEXP R_igraph_similarity_jaccard(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_similarity_jaccard_es(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_similarity_jaccard_pairs(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_simple_cycles(SEXP, SEXP, SEXP); -extern SEXP R_igraph_simple_cycles_callback(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_simple_interconnected_islands_game(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_simplify(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_simplify_and_colorize(SEXP); @@ -858,7 +857,6 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_similarity_jaccard_es", (DL_FUNC) &R_igraph_similarity_jaccard_es, 4}, {"R_igraph_similarity_jaccard_pairs", (DL_FUNC) &R_igraph_similarity_jaccard_pairs, 4}, {"R_igraph_simple_cycles", (DL_FUNC) &R_igraph_simple_cycles, 3}, - {"R_igraph_simple_cycles_callback", (DL_FUNC) &R_igraph_simple_cycles_callback, 4}, {"R_igraph_simple_interconnected_islands_game", (DL_FUNC) &R_igraph_simple_interconnected_islands_game, 4}, {"R_igraph_simplify", (DL_FUNC) &R_igraph_simplify, 4}, {"R_igraph_simplify_and_colorize", (DL_FUNC) &R_igraph_simplify_and_colorize, 1}, diff --git a/src/rinterface.c b/src/rinterface.c index 775f160d56..bec61580ac 100644 --- a/src/rinterface.c +++ b/src/rinterface.c @@ -11011,34 +11011,6 @@ SEXP R_igraph_simple_cycles(SEXP graph, SEXP mode, SEXP max_cycle_length) { return(r_result); } -/*-------------------------------------------/ -/ igraph_simple_cycles_callback / -/-------------------------------------------*/ -SEXP R_igraph_simple_cycles_callback(SEXP graph, SEXP mode, SEXP max_cycle_length, SEXP cycle_handler) { - /* Declarations */ - igraph_t c_graph; - igraph_neimode_t c_mode; - igraph_integer_t c_max_cycle_length; - igraph_cycle_handler_t c_cycle_handler; - - igraph_error_t c_result; - SEXP r_result; - /* Convert input */ - R_SEXP_to_igraph(graph, &c_graph); - c_mode = (igraph_neimode_t) Rf_asInteger(mode); - IGRAPH_R_CHECK_INT(max_cycle_length); - c_max_cycle_length = (igraph_integer_t) REAL(max_cycle_length)[0]; - /* Call igraph */ - IGRAPH_R_CHECK(igraph_simple_cycles_callback(&c_graph, c_mode, c_max_cycle_length, c_cycle_handler, 0)); - - /* Convert output */ - - - - UNPROTECT(1); - return(r_result); -} - /*-------------------------------------------/ / igraph_is_eulerian / /-------------------------------------------*/ diff --git a/tools/stimulus/functions-R.yaml b/tools/stimulus/functions-R.yaml index 17a5f418e8..f46ea66aa0 100644 --- a/tools/stimulus/functions-R.yaml +++ b/tools/stimulus/functions-R.yaml @@ -1440,6 +1440,11 @@ igraph_solve_lsap: igraph_find_cycle: +igraph_simple_cycles: + +igraph_simple_cycles_callback: + IGNORE: RR, RC + ####################################### # Eulerian functions #######################################