From c852839b290f15b3a20f034c8762078faa43df1c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Oct 2025 13:43:53 +0000 Subject: [PATCH 1/5] Initial plan From 5e8c598dfba4d0d8da9019366fe8d1e1b5085689 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Oct 2025 13:57:00 +0000 Subject: [PATCH 2/5] Initial plan for adding make_tri_lattice() Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com> --- tests/testthat/_snaps/aaa-auto.new.md | 8 +++ tests/testthat/_snaps/make.new.md | 67 ++++++++++++++++++++++++++ tests/testthat/testthat-problems.rds | Bin 46380 -> 52682 bytes 3 files changed, 75 insertions(+) create mode 100644 tests/testthat/_snaps/aaa-auto.new.md create mode 100644 tests/testthat/_snaps/make.new.md diff --git a/tests/testthat/_snaps/aaa-auto.new.md b/tests/testthat/_snaps/aaa-auto.new.md new file mode 100644 index 00000000000..5e6fb878844 --- /dev/null +++ b/tests/testthat/_snaps/aaa-auto.new.md @@ -0,0 +1,8 @@ +# version_impl errors + + Code + x + Condition + Error in `version_impl()`: + ! could not find function "version_impl" + diff --git a/tests/testthat/_snaps/make.new.md b/tests/testthat/_snaps/make.new.md new file mode 100644 index 00000000000..689b2d4a629 --- /dev/null +++ b/tests/testthat/_snaps/make.new.md @@ -0,0 +1,67 @@ +# error messages are proper + + Code + make_() + Condition + Error in `make_()`: + ! could not find function "make_" + Code + make_(1:10) + Condition + Error in `make_()`: + ! could not find function "make_" + Code + graph_() + Condition + Error in `graph_()`: + ! could not find function "graph_" + Code + graph_(1:10) + Condition + Error in `graph_()`: + ! could not find function "graph_" + Code + graph_(directed_graph(), directed_graph()) + Condition + Error in `graph_()`: + ! could not find function "graph_" + Code + sample_() + Condition + Error in `sample_()`: + ! could not find function "sample_" + Code + sample_(1:10) + Condition + Error in `sample_()`: + ! could not find function "sample_" + Code + sample_(directed_graph(), directed_graph()) + Condition + Error in `sample_()`: + ! could not find function "sample_" + +# make_empty_graph gives an error for invalid arguments + + Code + make_empty_graph(NULL) + Condition + Error in `make_empty_graph()`: + ! could not find function "make_empty_graph" + +--- + + Code + make_empty_graph("spam") + Condition + Error in `make_empty_graph()`: + ! could not find function "make_empty_graph" + +--- + + Code + make_empty_graph(10, "spam") + Condition + Error in `make_empty_graph()`: + ! could not find function "make_empty_graph" + diff --git a/tests/testthat/testthat-problems.rds b/tests/testthat/testthat-problems.rds index 95cf1759297186292377247df7cb3d1a15c7620e..dc012c529b2df219e29245e5621453ade9a333e5 100644 GIT binary patch literal 52682 zcmYJadt8j`7dE~(8`zO|5w1G zqXk{x8}`_JNu-_Co3C!iUtaHhBC#!lk|h%AX*@DTYTA$S9H8_ zz>c?gCTN3C@$TiWTXQy~8);~1uXJ767kex?*eUpBwJquWzxNycRz40PcJ_X4@B995 z$eUZA?hm~Nliwc(&PjgmGwtlZzJK4Xf>apupH!WGI z^PxfP)e^yor!D-K2(c6wM}1%3GWsS&~BKPf5LC=KUDGEt#Pt{$fLlc z*)QRST>w&Yz^vW0ahaE=Us1(RSKrl>-_yf(Y2PlNG!K~={Pw?w`h0);*2yrxn%5O4 zFA8WpqWYPziSg9ug}u8i*G!!b4#uFGbVE8ZqA6A;-O{nIw4VHQTT7bibG_}_9byK}F* zpQYUw#u2X?eq?dkj@<8ffWx0uHtm0qr^JUTgJ*xk6RmK={3H>#<)VQ5 zF7IN7w9xJRnLoRQIhXuZ_XHd6UNUh)ySrk@=1yNM-tp956CBH$r#km9jnC8WUDy2a zPR#=C719YES}CsY(dzl*`CI8{vrMzY50$~p|* zV+%WF^G%g%g36!ozvw)woVx$%SeMC?l>C)zYxhi@D_QYt>U2PWL3Z7T8RYEdC-hx+ zqwcFOTa?S%u_1q?GCyE#^X}c*W)TtZB#%B9R=D?D7FUEtR6VRvJJNN~)hos=k)OA~ zPs4QOilP!{;=Pr^E!9DeFHCk^uoG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ovv2Qo!9I%c2y-H-zZ$Z!l2I#V%k;KlrFxKfa!>qFsdF=z8|Dj)E#Z}w z#zarf&vzS%-`p0?LPG1-5AI*WLBVxOutm(a3(fh=D?`CC5k=N}GEq;(#TTT~%S;;4 z|7d5GY`JY78^)M*>$`3zP49;fzFBoR8RXhhW3~M-v#M{GZfBMq(Bc8tT*4$036GS1 zWk_PIKF!tx8N_+2>WTi1M2p4zM{_hUyr6Zs9@HNNq#y7Cc8-Lye zm8ek+jp;Um)z)){eUlt4o5F0Ay|Fzx_o`ixU0^eUkHPu@y-q%>2{NR*_E6H*VG(-v zs%0Ba-vk7Z_%Y4KOYQ?{228GSuVd1_C2r$;NQyX6&|naO}%55Yd7~lcsf1d;cg9J_Yz^`?D+MH}(V8bxJ+Ii&|DoMoemaE@ zizJl{!Zx4$$wQqjpSsCelSb@p$okiVEu#7tpfNp8u7(FXumawTuBfTvYN>vVLe0Ld{tV*{*bLz zg(F_2`FwI}FeK8(gEp3eHe@M2t4aPfplj;QGYbi)LM9co6=DCB55zeV6{n0+EARW< zb?#za7opA|;O Date: Sun, 26 Oct 2025 14:03:22 +0000 Subject: [PATCH 3/5] Add make_tri_lattice() and tri_lattice() functions with tests Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com> --- NAMESPACE | 2 + R/make.R | 60 ++++++++++++ man/graph_from_atlas.Rd | 3 +- man/graph_from_edgelist.Rd | 3 +- man/graph_from_literal.Rd | 3 +- man/make_.Rd | 3 +- man/make_chordal_ring.Rd | 3 +- man/make_empty_graph.Rd | 3 +- man/make_full_citation_graph.Rd | 3 +- man/make_full_graph.Rd | 3 +- man/make_graph.Rd | 3 +- man/make_lattice.Rd | 3 +- man/make_ring.Rd | 3 +- man/make_star.Rd | 3 +- man/make_tree.Rd | 3 +- man/make_tri_lattice.Rd | 77 ++++++++++++++++ tests/testthat/_snaps/make.new.md | 146 ++++++++++++++++++++++++++---- tests/testthat/test-make.R | 41 +++++++++ 18 files changed, 333 insertions(+), 32 deletions(-) create mode 100644 man/make_tri_lattice.Rd diff --git a/NAMESPACE b/NAMESPACE index 95be07fb203..3f6c8aa75dd 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -665,6 +665,7 @@ export(make_neighborhood_graph) export(make_ring) export(make_star) export(make_tree) +export(make_tri_lattice) export(make_undirected_graph) export(match_vertices) export(max_bipartite_match) @@ -867,6 +868,7 @@ export(traits) export(traits_callaway) export(transitivity) export(tree) +export(tri_lattice) export(triad.census) export(triad_census) export(triangles) diff --git a/R/make.R b/R/make.R index 7547b44e593..33477cc3772 100644 --- a/R/make.R +++ b/R/make.R @@ -2001,6 +2001,66 @@ lattice <- function(...) constructor_spec(make_lattice, ...) ## ----------------------------------------------------------------- +#' Create a triangular lattice graph +#' +#' `make_tri_lattice()` creates a triangular lattice with a specified shape. +#' The shape can be triangular (1 dimension), quasi-rectangular (2 dimensions), +#' or hexagonal (3 dimensions). +#' +#' @concept Lattice +#' @param dims Integer vector defining the shape of the lattice. +#' - If `dims` is of length 1, the resulting lattice has a triangular shape +#' where each side of the triangle contains `dims[1]` vertices. +#' - If `dims` is of length 2, the resulting lattice has a "quasi rectangular" +#' shape with the sides containing `dims[1]` and `dims[2]` vertices, respectively. +#' - If `dims` is of length 3, the resulting lattice has a hexagonal shape +#' where the sides of the hexagon contain `dims[1]`, `dims[2]`, and `dims[3]` +#' vertices. +#' All dimensions must be non-negative. +#' @param directed Logical scalar, whether to create a directed graph. +#' If the `mutual` argument is not set to `TRUE`, edges will be directed +#' from lower-index vertices towards higher-index ones. +#' @param mutual Logical scalar, if the graph is directed, this gives whether +#' to create all connections as mutual. +#' @return An igraph graph. +#' +#' @family deterministic constructors +#' @export +#' @examples +#' # Triangular lattice (1D case - creates a triangle) +#' g1 <- make_tri_lattice(5) +#' plot(g1) +#' +#' # Quasi-rectangular lattice (2D case) +#' g2 <- make_tri_lattice(c(3, 4)) +#' plot(g2) +#' +#' # Hexagonal lattice (3D case) +#' g3 <- make_tri_lattice(c(3, 3, 3)) +#' plot(g3) +#' +#' # Directed triangular lattice with mutual edges +#' g4 <- make_tri_lattice(c(3, 3), directed = TRUE, mutual = TRUE) +#' @cdocs igraph_triangular_lattice +make_tri_lattice <- function(dims, directed = FALSE, mutual = FALSE) { + on.exit(.Call(R_igraph_finalizer)) + res <- triangular_lattice_impl(dims, directed, mutual) + if (igraph_opt("add.params")) { + res$name <- "Triangular lattice" + res$dims <- dims + res$directed <- directed + res$mutual <- mutual + } + res +} + +#' @rdname make_tri_lattice +#' @param ... Passed to `make_tri_lattice()`. +#' @export +tri_lattice <- function(...) constructor_spec(make_tri_lattice, ...) + +## ----------------------------------------------------------------- + #' Create a ring graph #' #' A ring is a one-dimensional lattice and this function is a special case diff --git a/man/graph_from_atlas.Rd b/man/graph_from_atlas.Rd index f54d1fc6466..16e4bb4f721 100644 --- a/man/graph_from_atlas.Rd +++ b/man/graph_from_atlas.Rd @@ -51,7 +51,8 @@ Other deterministic constructors: \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, -\code{\link{make_tree}()} +\code{\link{make_tree}()}, +\code{\link{make_tri_lattice}()} } \concept{Graph Atlas.} \concept{deterministic constructors} diff --git a/man/graph_from_edgelist.Rd b/man/graph_from_edgelist.Rd index 453451315d3..d90abf897c6 100644 --- a/man/graph_from_edgelist.Rd +++ b/man/graph_from_edgelist.Rd @@ -47,7 +47,8 @@ Other deterministic constructors: \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, -\code{\link{make_tree}()} +\code{\link{make_tree}()}, +\code{\link{make_tri_lattice}()} } \concept{Edge list} \concept{deterministic constructors} diff --git a/man/graph_from_literal.Rd b/man/graph_from_literal.Rd index 191735aed37..4ebbbbe7c40 100644 --- a/man/graph_from_literal.Rd +++ b/man/graph_from_literal.Rd @@ -138,6 +138,7 @@ Other deterministic constructors: \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, -\code{\link{make_tree}()} +\code{\link{make_tree}()}, +\code{\link{make_tri_lattice}()} } \concept{deterministic constructors} diff --git a/man/make_.Rd b/man/make_.Rd index 1d988b9d4ac..9ccaaac4293 100644 --- a/man/make_.Rd +++ b/man/make_.Rd @@ -54,7 +54,8 @@ Other deterministic constructors: \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, -\code{\link{make_tree}()} +\code{\link{make_tree}()}, +\code{\link{make_tri_lattice}()} Constructor modifiers (and related functions) \code{\link{sample_}()}, diff --git a/man/make_chordal_ring.Rd b/man/make_chordal_ring.Rd index 2b4127f4d01..6cee4e0e583 100644 --- a/man/make_chordal_ring.Rd +++ b/man/make_chordal_ring.Rd @@ -54,6 +54,7 @@ Other deterministic constructors: \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, -\code{\link{make_tree}()} +\code{\link{make_tree}()}, +\code{\link{make_tri_lattice}()} } \concept{deterministic constructors} diff --git a/man/make_empty_graph.Rd b/man/make_empty_graph.Rd index 030f1ed1b97..11d75b43f74 100644 --- a/man/make_empty_graph.Rd +++ b/man/make_empty_graph.Rd @@ -39,7 +39,8 @@ Other deterministic constructors: \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, -\code{\link{make_tree}()} +\code{\link{make_tree}()}, +\code{\link{make_tri_lattice}()} } \concept{Empty graph.} \concept{deterministic constructors} diff --git a/man/make_full_citation_graph.Rd b/man/make_full_citation_graph.Rd index 1b71a67b0ee..d27f18bbfa2 100644 --- a/man/make_full_citation_graph.Rd +++ b/man/make_full_citation_graph.Rd @@ -40,6 +40,7 @@ Other deterministic constructors: \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, -\code{\link{make_tree}()} +\code{\link{make_tree}()}, +\code{\link{make_tri_lattice}()} } \concept{deterministic constructors} diff --git a/man/make_full_graph.Rd b/man/make_full_graph.Rd index be28e7efc5b..85a605b8c9f 100644 --- a/man/make_full_graph.Rd +++ b/man/make_full_graph.Rd @@ -41,7 +41,8 @@ Other deterministic constructors: \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, -\code{\link{make_tree}()} +\code{\link{make_tree}()}, +\code{\link{make_tri_lattice}()} } \concept{Full graph} \concept{deterministic constructors} diff --git a/man/make_graph.Rd b/man/make_graph.Rd index 96d8bf78c0d..6d91945a622 100644 --- a/man/make_graph.Rd +++ b/man/make_graph.Rd @@ -250,6 +250,7 @@ Other deterministic constructors: \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, -\code{\link{make_tree}()} +\code{\link{make_tree}()}, +\code{\link{make_tri_lattice}()} } \concept{deterministic constructors} diff --git a/man/make_lattice.Rd b/man/make_lattice.Rd index 52e2dfe39cb..5ad7818828c 100644 --- a/man/make_lattice.Rd +++ b/man/make_lattice.Rd @@ -70,7 +70,8 @@ Other deterministic constructors: \code{\link{make_graph}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, -\code{\link{make_tree}()} +\code{\link{make_tree}()}, +\code{\link{make_tri_lattice}()} } \concept{Lattice} \concept{deterministic constructors} diff --git a/man/make_ring.Rd b/man/make_ring.Rd index 25cadf9e45a..6106bbc6e31 100644 --- a/man/make_ring.Rd +++ b/man/make_ring.Rd @@ -47,6 +47,7 @@ Other deterministic constructors: \code{\link{make_graph}()}, \code{\link{make_lattice}()}, \code{\link{make_star}()}, -\code{\link{make_tree}()} +\code{\link{make_tree}()}, +\code{\link{make_tri_lattice}()} } \concept{deterministic constructors} diff --git a/man/make_star.Rd b/man/make_star.Rd index 59dd345bedb..bb28dc3f0e5 100644 --- a/man/make_star.Rd +++ b/man/make_star.Rd @@ -46,7 +46,8 @@ Other deterministic constructors: \code{\link{make_graph}()}, \code{\link{make_lattice}()}, \code{\link{make_ring}()}, -\code{\link{make_tree}()} +\code{\link{make_tree}()}, +\code{\link{make_tri_lattice}()} } \concept{Star graph} \concept{deterministic constructors} diff --git a/man/make_tree.Rd b/man/make_tree.Rd index 42446786e14..b29bd617099 100644 --- a/man/make_tree.Rd +++ b/man/make_tree.Rd @@ -47,7 +47,8 @@ Other deterministic constructors: \code{\link{make_graph}()}, \code{\link{make_lattice}()}, \code{\link{make_ring}()}, -\code{\link{make_star}()} +\code{\link{make_star}()}, +\code{\link{make_tri_lattice}()} } \concept{Trees.} \concept{deterministic constructors} diff --git a/man/make_tri_lattice.Rd b/man/make_tri_lattice.Rd new file mode 100644 index 00000000000..95d9352464e --- /dev/null +++ b/man/make_tri_lattice.Rd @@ -0,0 +1,77 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/make.R +\name{make_tri_lattice} +\alias{make_tri_lattice} +\alias{tri_lattice} +\title{Create a triangular lattice graph} +\usage{ +make_tri_lattice(dims, directed = FALSE, mutual = FALSE) + +tri_lattice(...) +} +\arguments{ +\item{dims}{Integer vector defining the shape of the lattice. +\itemize{ +\item If \code{dims} is of length 1, the resulting lattice has a triangular shape +where each side of the triangle contains \code{dims[1]} vertices. +\item If \code{dims} is of length 2, the resulting lattice has a "quasi rectangular" +shape with the sides containing \code{dims[1]} and \code{dims[2]} vertices, respectively. +\item If \code{dims} is of length 3, the resulting lattice has a hexagonal shape +where the sides of the hexagon contain \code{dims[1]}, \code{dims[2]}, and \code{dims[3]} +vertices. +All dimensions must be non-negative. +}} + +\item{directed}{Logical scalar, whether to create a directed graph. +If the \code{mutual} argument is not set to \code{TRUE}, edges will be directed +from lower-index vertices towards higher-index ones.} + +\item{mutual}{Logical scalar, if the graph is directed, this gives whether +to create all connections as mutual.} + +\item{...}{Passed to \code{make_tri_lattice()}.} +} +\value{ +An igraph graph. +} +\description{ +\code{make_tri_lattice()} creates a triangular lattice with a specified shape. +The shape can be triangular (1 dimension), quasi-rectangular (2 dimensions), +or hexagonal (3 dimensions). +} +\examples{ +# Triangular lattice (1D case - creates a triangle) +g1 <- make_tri_lattice(5) +plot(g1) + +# Quasi-rectangular lattice (2D case) +g2 <- make_tri_lattice(c(3, 4)) +plot(g2) + +# Hexagonal lattice (3D case) +g3 <- make_tri_lattice(c(3, 3, 3)) +plot(g3) + +# Directed triangular lattice with mutual edges +g4 <- make_tri_lattice(c(3, 3), directed = TRUE, mutual = TRUE) +} +\seealso{ +Other deterministic constructors: +\code{\link{graph_from_atlas}()}, +\code{\link{graph_from_edgelist}()}, +\code{\link{graph_from_literal}()}, +\code{\link{make_}()}, +\code{\link{make_chordal_ring}()}, +\code{\link{make_empty_graph}()}, +\code{\link{make_full_citation_graph}()}, +\code{\link{make_full_graph}()}, +\code{\link{make_graph}()}, +\code{\link{make_lattice}()}, +\code{\link{make_ring}()}, +\code{\link{make_star}()}, +\code{\link{make_tree}()} +} +\concept{Lattice} +\concept{deterministic constructors} +\section{Related documentation in the C library}{\href{https://igraph.org/c/html/latest/igraph-Generators.html#igraph_triangular_lattice}{\code{triangular_lattice()}}.} + diff --git a/tests/testthat/_snaps/make.new.md b/tests/testthat/_snaps/make.new.md index 689b2d4a629..95326899e1d 100644 --- a/tests/testthat/_snaps/make.new.md +++ b/tests/testthat/_snaps/make.new.md @@ -3,43 +3,151 @@ Code make_() Condition - Error in `make_()`: - ! could not find function "make_" + Error in `.extract_constructor_and_modifiers()`: + ! Don't know how to make_, nothing given Code make_(1:10) Condition - Error in `make_()`: - ! could not find function "make_" + Error in `.extract_constructor_and_modifiers()`: + ! Don't know how to make_, nothing given Code graph_() Condition - Error in `graph_()`: - ! could not find function "graph_" + Error in `.extract_constructor_and_modifiers()`: + ! Don't know how to graph_, nothing given Code graph_(1:10) Condition - Error in `graph_()`: - ! could not find function "graph_" + Error in `.extract_constructor_and_modifiers()`: + ! Don't know how to graph_, nothing given Code graph_(directed_graph(), directed_graph()) Condition - Error in `graph_()`: - ! could not find function "graph_" + Error in `.extract_constructor_and_modifiers()`: + ! Don't know how to graph_, multiple constructors given Code sample_() Condition - Error in `sample_()`: - ! could not find function "sample_" + Error in `.extract_constructor_and_modifiers()`: + ! Don't know how to sample_, nothing given Code sample_(1:10) Condition - Error in `sample_()`: - ! could not find function "sample_" + Error in `.extract_constructor_and_modifiers()`: + ! Don't know how to sample_, nothing given Code sample_(directed_graph(), directed_graph()) Condition - Error in `sample_()`: - ! could not find function "sample_" + Error in `.extract_constructor_and_modifiers()`: + ! Don't know how to sample_, multiple constructors given + +# graph_from_literal() and simple undirected graphs + + Code + graph_from_literal(A - B) + Output + IGRAPH UN-- 2 1 -- + + attr: name (v/c) + + edge (vertex names): + [1] A--B + Code + graph_from_literal(A - B - C) + Output + IGRAPH UN-- 3 2 -- + + attr: name (v/c) + + edges (vertex names): + [1] A--B B--C + Code + graph_from_literal(A - B - C - A) + Output + IGRAPH UN-- 3 3 -- + + attr: name (v/c) + + edges (vertex names): + [1] A--B A--C B--C + +# graph_from_literal() and undirected explosion + + Code + graph_from_literal(A:B:C - D:E, B:D - C:E) + Output + IGRAPH a861750 UN-- 5 8 -- + + attr: name (v/c) + + edges from a861750 (vertex names): + [1] A--D A--E B--C B--D B--E C--D C--E D--E + Code + graph_from_literal(A:B:C - D:E - F:G:H - I - J:K:L:M) + Output + IGRAPH 86a90e9 UN-- 13 19 -- + + attr: name (v/c) + + edges from 86a90e9 (vertex names): + [1] A--D A--E B--D B--E C--D C--E D--F D--G D--H E--F E--G E--H F--I G--I H--I + [16] I--J I--K I--L I--M + +# graph_from_literal() and simple directed graphs + + Code + graph_from_literal(A - +B) + Output + IGRAPH 6410bb1 DN-- 2 1 -- + + attr: name (v/c) + + edge from 6410bb1 (vertex names): + [1] A->B + Code + graph_from_literal(A - +B - +C) + Output + IGRAPH e7ef194 DN-- 3 2 -- + + attr: name (v/c) + + edges from e7ef194 (vertex names): + [1] A->B B->C + Code + graph_from_literal(A - +B - +C - +A) + Output + IGRAPH c7e1d98 DN-- 3 3 -- + + attr: name (v/c) + + edges from c7e1d98 (vertex names): + [1] A->B B->C C->A + Code + graph_from_literal(A - +B + -C - +A) + Output + IGRAPH 7b46e32 DN-- 3 3 -- + + attr: name (v/c) + + edges from 7b46e32 (vertex names): + [1] A->B C->A C->B + +# graph_from_literal() and directed explosion + + Code + graph_from_literal(A:B:C - +D:E, B:D + -C:E) + Output + IGRAPH d59a1fb DN-- 5 9 -- + + attr: name (v/c) + + edges from d59a1fb (vertex names): + [1] A->D A->E B->D B->E C->B C->D C->E E->B E->D + Code + graph_from_literal(A:B:C - +D:E + -F:G:H - +I + -J:K:L:M) + Output + IGRAPH 15d63a5 DN-- 13 19 -- + + attr: name (v/c) + + edges from 15d63a5 (vertex names): + [1] A->D A->E B->D B->E C->D C->E F->D F->E F->I G->D G->E G->I H->D H->E H->I + [16] J->I K->I L->I M->I + +# graph_from_literal(simplify = FALSE) + + Code + graph_from_literal(1 - 1, 1 - 2, 1 - 2) + Output + IGRAPH 20ff2d5 UN-- 2 1 -- + + attr: name (v/c) + + edge from 20ff2d5 (vertex names): + [1] 1--2 + Code + graph_from_literal(1 - 1, 1 - 2, 1 - 2, simplify = FALSE) + Output + IGRAPH bb10007 UN-- 2 3 -- + + attr: name (v/c) + + edges from bb10007 (vertex names): + [1] 1--1 1--2 1--2 # make_empty_graph gives an error for invalid arguments @@ -47,7 +155,7 @@ make_empty_graph(NULL) Condition Error in `make_empty_graph()`: - ! could not find function "make_empty_graph" + ! `n` must be numeric, not NULL. --- @@ -55,7 +163,7 @@ make_empty_graph("spam") Condition Error in `make_empty_graph()`: - ! could not find function "make_empty_graph" + ! `n` must be numeric, not a string. --- @@ -63,5 +171,5 @@ make_empty_graph(10, "spam") Condition Error in `make_empty_graph()`: - ! could not find function "make_empty_graph" + ! `directed` must be a logical, not a string. diff --git a/tests/testthat/test-make.R b/tests/testthat/test-make.R index 396bf65dc43..9c20631df00 100644 --- a/tests/testthat/test-make.R +++ b/tests/testthat/test-make.R @@ -205,6 +205,47 @@ test_that("make_lattice prints a warning for fractional length)", { expect_identical_graphs(lattice_rounded, lattice_integer) }) +test_that("make_tri_lattice works with 1D (triangular shape)", { + g <- make_tri_lattice(3) + expect_vcount(g, 6) + expect_ecount(g, 9) + expect_false(is_directed(g)) +}) + +test_that("make_tri_lattice works with 2D (quasi-rectangular shape)", { + g <- make_tri_lattice(c(3, 3)) + expect_vcount(g, 9) + expect_ecount(g, 16) + expect_false(is_directed(g)) +}) + +test_that("make_tri_lattice works with 3D (hexagonal shape)", { + g <- make_tri_lattice(c(2, 2, 2)) + expect_vcount(g, 7) + expect_ecount(g, 12) + expect_false(is_directed(g)) +}) + +test_that("make_tri_lattice works with directed and mutual parameters", { + g_undirected <- make_tri_lattice(c(2, 2)) + g_directed <- make_tri_lattice(c(2, 2), directed = TRUE) + g_mutual <- make_tri_lattice(c(2, 2), directed = TRUE, mutual = TRUE) + + expect_false(is_directed(g_undirected)) + expect_true(is_directed(g_directed)) + expect_true(is_directed(g_mutual)) + + # Mutual should have twice the edges + expect_equal(ecount(g_mutual), 2 * ecount(g_undirected)) +}) + +test_that("tri_lattice constructor spec works with make_()", { + g1 <- make_tri_lattice(c(3, 3)) + g2 <- make_(tri_lattice(c(3, 3))) + + expect_identical_graphs(g1, g2) +}) + test_that("make_graph works", { graph_make <- make_graph(1:10) graph_elist <- make_empty_graph(n = 10) + edges(1:10) From a804fd08582ce78ee00bd1587cc9491782a6a5b6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Oct 2025 14:04:32 +0000 Subject: [PATCH 4/5] Verify all tests pass for make_tri_lattice Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com> --- tests/testthat/_snaps/make.new.md | 175 ------------------------------ 1 file changed, 175 deletions(-) delete mode 100644 tests/testthat/_snaps/make.new.md diff --git a/tests/testthat/_snaps/make.new.md b/tests/testthat/_snaps/make.new.md deleted file mode 100644 index 95326899e1d..00000000000 --- a/tests/testthat/_snaps/make.new.md +++ /dev/null @@ -1,175 +0,0 @@ -# error messages are proper - - Code - make_() - Condition - Error in `.extract_constructor_and_modifiers()`: - ! Don't know how to make_, nothing given - Code - make_(1:10) - Condition - Error in `.extract_constructor_and_modifiers()`: - ! Don't know how to make_, nothing given - Code - graph_() - Condition - Error in `.extract_constructor_and_modifiers()`: - ! Don't know how to graph_, nothing given - Code - graph_(1:10) - Condition - Error in `.extract_constructor_and_modifiers()`: - ! Don't know how to graph_, nothing given - Code - graph_(directed_graph(), directed_graph()) - Condition - Error in `.extract_constructor_and_modifiers()`: - ! Don't know how to graph_, multiple constructors given - Code - sample_() - Condition - Error in `.extract_constructor_and_modifiers()`: - ! Don't know how to sample_, nothing given - Code - sample_(1:10) - Condition - Error in `.extract_constructor_and_modifiers()`: - ! Don't know how to sample_, nothing given - Code - sample_(directed_graph(), directed_graph()) - Condition - Error in `.extract_constructor_and_modifiers()`: - ! Don't know how to sample_, multiple constructors given - -# graph_from_literal() and simple undirected graphs - - Code - graph_from_literal(A - B) - Output - IGRAPH UN-- 2 1 -- - + attr: name (v/c) - + edge (vertex names): - [1] A--B - Code - graph_from_literal(A - B - C) - Output - IGRAPH UN-- 3 2 -- - + attr: name (v/c) - + edges (vertex names): - [1] A--B B--C - Code - graph_from_literal(A - B - C - A) - Output - IGRAPH UN-- 3 3 -- - + attr: name (v/c) - + edges (vertex names): - [1] A--B A--C B--C - -# graph_from_literal() and undirected explosion - - Code - graph_from_literal(A:B:C - D:E, B:D - C:E) - Output - IGRAPH a861750 UN-- 5 8 -- - + attr: name (v/c) - + edges from a861750 (vertex names): - [1] A--D A--E B--C B--D B--E C--D C--E D--E - Code - graph_from_literal(A:B:C - D:E - F:G:H - I - J:K:L:M) - Output - IGRAPH 86a90e9 UN-- 13 19 -- - + attr: name (v/c) - + edges from 86a90e9 (vertex names): - [1] A--D A--E B--D B--E C--D C--E D--F D--G D--H E--F E--G E--H F--I G--I H--I - [16] I--J I--K I--L I--M - -# graph_from_literal() and simple directed graphs - - Code - graph_from_literal(A - +B) - Output - IGRAPH 6410bb1 DN-- 2 1 -- - + attr: name (v/c) - + edge from 6410bb1 (vertex names): - [1] A->B - Code - graph_from_literal(A - +B - +C) - Output - IGRAPH e7ef194 DN-- 3 2 -- - + attr: name (v/c) - + edges from e7ef194 (vertex names): - [1] A->B B->C - Code - graph_from_literal(A - +B - +C - +A) - Output - IGRAPH c7e1d98 DN-- 3 3 -- - + attr: name (v/c) - + edges from c7e1d98 (vertex names): - [1] A->B B->C C->A - Code - graph_from_literal(A - +B + -C - +A) - Output - IGRAPH 7b46e32 DN-- 3 3 -- - + attr: name (v/c) - + edges from 7b46e32 (vertex names): - [1] A->B C->A C->B - -# graph_from_literal() and directed explosion - - Code - graph_from_literal(A:B:C - +D:E, B:D + -C:E) - Output - IGRAPH d59a1fb DN-- 5 9 -- - + attr: name (v/c) - + edges from d59a1fb (vertex names): - [1] A->D A->E B->D B->E C->B C->D C->E E->B E->D - Code - graph_from_literal(A:B:C - +D:E + -F:G:H - +I + -J:K:L:M) - Output - IGRAPH 15d63a5 DN-- 13 19 -- - + attr: name (v/c) - + edges from 15d63a5 (vertex names): - [1] A->D A->E B->D B->E C->D C->E F->D F->E F->I G->D G->E G->I H->D H->E H->I - [16] J->I K->I L->I M->I - -# graph_from_literal(simplify = FALSE) - - Code - graph_from_literal(1 - 1, 1 - 2, 1 - 2) - Output - IGRAPH 20ff2d5 UN-- 2 1 -- - + attr: name (v/c) - + edge from 20ff2d5 (vertex names): - [1] 1--2 - Code - graph_from_literal(1 - 1, 1 - 2, 1 - 2, simplify = FALSE) - Output - IGRAPH bb10007 UN-- 2 3 -- - + attr: name (v/c) - + edges from bb10007 (vertex names): - [1] 1--1 1--2 1--2 - -# make_empty_graph gives an error for invalid arguments - - Code - make_empty_graph(NULL) - Condition - Error in `make_empty_graph()`: - ! `n` must be numeric, not NULL. - ---- - - Code - make_empty_graph("spam") - Condition - Error in `make_empty_graph()`: - ! `n` must be numeric, not a string. - ---- - - Code - make_empty_graph(10, "spam") - Condition - Error in `make_empty_graph()`: - ! `directed` must be a logical, not a string. - From 780619b9f9add362ec5bc8ccd46aa299690f1b42 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 1 Nov 2025 11:38:23 +0000 Subject: [PATCH 5/5] Merge main and update make_tri_lattice() per updated AGENTS.md Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com> --- .github/workflows/R-CMD-check.yaml | 14 +- .github/workflows/vendor.yaml | 2 +- .gitignore | 2 + AGENTS.md | 41 +- DESCRIPTION | 2 +- NAMESPACE | 11 + NEWS.md | 139 + R/aaa-auto.R | 1142 ++- R/adjacency.R | 4 +- R/assortativity.R | 15 +- R/attributes.R | 44 +- R/bipartite.R | 2 +- R/centrality.R | 69 +- R/centralization.R | 13 +- R/cliques.R | 20 +- R/cocitation.R | 4 +- R/cohesive.blocks.R | 2 +- R/community.R | 98 +- R/components.R | 18 +- R/conversion.R | 50 +- R/cycles.R | 9 +- R/embedding.R | 9 +- R/epi.R | 4 +- R/eulerian.R | 10 +- R/fit.R | 2 +- R/flow.R | 35 +- R/foreign.R | 34 +- R/games.R | 48 +- R/glet.R | 4 +- R/hrg.R | 18 +- R/incidence.R | 13 +- R/interface.R | 68 +- R/iterators.R | 10 +- R/layout.R | 62 +- R/make.R | 304 +- R/minimum.spanning.tree.R | 4 +- R/motifs.R | 17 +- R/operators.R | 36 +- R/other.R | 6 +- R/par.R | 4 +- R/paths.R | 33 +- R/plot.common.R | 2 +- R/plot.shapes.R | 2 +- R/pp.R | 2 +- R/print.R | 6 +- R/random_walk.R | 20 +- R/rewire.R | 20 +- R/scan.R | 4 +- R/sgm.R | 7 +- R/similarity.R | 22 +- R/simple.R | 5 +- R/stochastic_matrix.R | 13 +- R/structural-properties.R | 332 +- R/topology.R | 74 +- R/trees.R | 18 +- R/utils-assert-args.R | 4 +- R/utils.R | 2 +- R/uuid.R | 2 +- R/versions.R | 14 +- R/weakref.R | 8 +- _pkgdown.yml | 3 + man/add_edges.Rd | 1 + man/add_vertices.Rd | 1 + man/articulation_points.Rd | 1 + man/biconnected_components.Rd | 1 + man/complementer.Rd | 1 + man/components.Rd | 1 + man/compose.Rd | 1 + man/contract.Rd | 1 + man/count_reachable.Rd | 69 + man/decompose.Rd | 1 + man/degree.Rd | 10 +- man/delete_edges.Rd | 1 + man/delete_vertices.Rd | 1 + man/difference.Rd | 1 + man/difference.igraph.Rd | 1 + man/disjoint_union.Rd | 1 + man/edge.Rd | 1 + man/ego.Rd | 1 + man/graph_from_atlas.Rd | 5 +- man/graph_from_edgelist.Rd | 5 +- man/graph_from_literal.Rd | 5 +- man/igraph-minus.Rd | 1 + man/intersection.Rd | 1 + man/intersection.igraph.Rd | 1 + man/invalidate_cache.Rd | 38 + man/is_biconnected.Rd | 1 + man/make_.Rd | 5 +- man/make_chordal_ring.Rd | 5 +- man/make_circulant.Rd | 61 + man/make_empty_graph.Rd | 5 +- man/make_full_citation_graph.Rd | 5 +- man/make_full_graph.Rd | 5 +- man/make_full_multipartite.Rd | 65 + man/make_graph.Rd | 5 +- man/make_lattice.Rd | 5 +- man/make_ring.Rd | 5 +- man/make_star.Rd | 5 +- man/make_tree.Rd | 5 +- man/make_tri_lattice.Rd | 14 +- man/make_turan.Rd | 64 + man/path.Rd | 1 + man/permute.Rd | 1 + man/plus-.igraph.Rd | 1 + man/rep.igraph.Rd | 1 + man/reverse_edges.Rd | 1 + man/simplify.Rd | 1 + man/transitive_closure.Rd | 81 + man/union.Rd | 1 + man/union.igraph.Rd | 1 + man/vertex.Rd | 1 + man/which_multiple.Rd | 9 +- src/Makevars.in | 2 +- src/Makevars.ucrt | 2 +- src/Makevars.win | 2 +- src/README.md | 37 + src/cpp11.cpp | 254 +- src/deps.mk | 2 +- src/rinterface.c | 1717 +++- src/rinterface.h | 7 +- src/rinterface_extra.c | 191 +- tests/testthat/_snaps/aaa-auto.md | 1343 +-- tests/testthat/_snaps/operators.md | 16 + tests/testthat/_snaps/utils-assert-args.md | 2 +- tests/testthat/test-aaa-auto.R | 7285 ++++++++++++++--- tests/testthat/test-centrality.R | 16 + tests/testthat/test-interface.R | 26 + tests/testthat/test-make.R | 84 + tests/testthat/test-operators.R | 22 + tests/testthat/test-structural-properties.R | 97 + tests/testthat/test-topology.R | 67 + tests/testthat/test-utils-assert-args.R | 2 +- tests/testthat/testthat-problems.rds | Bin 52682 -> 0 bytes tools/ensure-impl-named.R | 73 + .../py-stimulus/src/stimulus/generators/r.py | 35 +- tools/stimulus/functions-R.yaml | 74 +- tools/stimulus/types-RC.yaml | 29 +- tools/stimulus/types-RR.yaml | 14 + 138 files changed, 12282 insertions(+), 2604 deletions(-) create mode 100644 man/count_reachable.Rd create mode 100644 man/invalidate_cache.Rd create mode 100644 man/make_circulant.Rd create mode 100644 man/make_full_multipartite.Rd create mode 100644 man/make_turan.Rd create mode 100644 man/transitive_closure.Rd delete mode 100644 tests/testthat/testthat-problems.rds create mode 100644 tools/ensure-impl-named.R diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index ed3263e344a..b5bccb8346d 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -76,7 +76,7 @@ jobs: ref: ${{ inputs.ref }} - name: Update status for rcc - if: github.actor != 'github-copilot[bot]' + if: github.actor != 'Copilot' # FIXME: Wrap into action env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -182,7 +182,7 @@ jobs: - name: Update status for rcc # FIXME: Wrap into action - if: always() && (github.actor != 'github-copilot[bot]') + if: always() && (github.actor != 'Copilot') env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -219,12 +219,16 @@ jobs: - name: Update status for rcc (Copilot) # Update status directly when triggered by Copilot or bots, since they can't dispatch workflows - if: always() && (github.actor == 'github-copilot[bot]') + if: always() && (github.actor == 'Copilot') env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - # Check status of this workflow - state="pending" + # Set status to success if job succeeded, failure otherwise + if [ "${{ job.status }}" == "success" ]; then + state="success" + else + state="failure" + fi sha=${{ inputs.ref }} if [ -z "${sha}" ]; then sha=${{ github.sha }} diff --git a/.github/workflows/vendor.yaml b/.github/workflows/vendor.yaml index 7f578d3ccec..e7f37a08933 100644 --- a/.github/workflows/vendor.yaml +++ b/.github/workflows/vendor.yaml @@ -7,7 +7,7 @@ on: - "vendor-one.sh" workflow_dispatch: schedule: - - cron: "0 * * * *" + - cron: "* 0 * * *" concurrency: group: ${{ github.workflow }} diff --git a/.gitignore b/.gitignore index dd12d586c35..85e2c445848 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,6 @@ cran /rchk /src/*.d /src/symbols.rds +/tests/testthat/testthat-problems.rds /covr +/.vscode/launch.json diff --git a/AGENTS.md b/AGENTS.md index fd56874ab77..6356d1d21fc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -31,15 +31,16 @@ pak::pak(dependencies = "Config/Needs/build") - When run on GitHub Actions, assume that R, the package in its current state and all dependencies are installed. - Only install new packages when needed for implementing new features or tests. -- Run `R -q -e 'testthat::test_local(reporter = "check")'` to execute tests as a final step. +- Run `R -q -e 'devtools::check()'` to execute all checks as a final step. ### Building and Testing - Load package for development: `pkgload::load_all()` - Run tests: `testthat::test_local(reporter = "check")` +- Run tests for a single file `test-foo.R`: `testthat::test_local(filter = "foo", reporter = "check")` - Build package: `devtools::build()` - Check package: `devtools::check()` -- Update documentation: `devtools::document()` +- Update `.Rd` documentation: `devtools::document()` - Format code: `air format .` ## Code Style and Documentation @@ -54,21 +55,24 @@ pak::pak(dependencies = "Config/Needs/build") - Prefer expressive code over comments where possible - Add comments to utility functions that cannot be made immediately obvious - Focus comments on explaining the "why" and "how", the "what" should be clear from the code itself -- Use line breaks after each sentence in multi-sentence comments +- Use line breaks after each sentence ### R Code Conventions -- Follow the [tidyverse style guide](https://style.tidyverse.org) +- Follow the [tidyverse style guide](https://style.tidyverse.org) and the [tidyverse design guide](https://design.tidyverse.org) - Use `snake_case` for new functions - Use explicit package prefixes (e.g., `withr::local_db_connection()`) for clarity - Maintain consistent indentation (2 spaces) and spacing patterns - Use meaningful variable names that reflect context - Run `air format .` before committing changes to ensure consistent formatting +- Never change deprecated functions ### Documentation - Use roxygen2 with Markdown syntax for all function documentation +- Use math notation for formulas: `\eqn{...}` for inline, `\deqn{...}` for display equations - Keep each sentence on its own line in roxygen2 comments for better readability +- Document all arguments and return values - Document internal functions using devtag (work in progress) - Link to C documentation using `@cdocs` tag: `#' @cdocs igraph_function_name` - Always run `devtools::document()` after updating documentation @@ -77,6 +81,25 @@ pak::pak(dependencies = "Config/Needs/build") - Use `max` for maximal (graph theory term: a vertex is maximal if no other vertex dominates it) and `largest` for maximum (the biggest value in a set) +### New functions + +All new functions must include: + +- Examples +- Tests +- Proper documentation, including arguments and return values +- A concept so that it exists in the pkgdown reference index +- An "experimental" badge via `r lifecycle::badge("experimental")` +- All arguments in `snake_case`, with documentation and suitable defaults +- An ellipsis guarded with `check_dots_empty()` separating mandatory and optional arguments +- Argument validation using built-in `check_*()` functions or `igraph_arg_match()` + +If exporting a new function from the C library: + +- Ensure it is autogenerated +- Add tests for the `_impl` function +- Name all arguments in all calls to the `_impl` function + ## File Structure and Organization ### Test Files @@ -95,9 +118,19 @@ Update them using: `make -f Makefile-cigraph src/rinterface.c R/aaa-auto.R` See `tools/README.md` for guidelines on code generation using the Stimulus framework. +### Build Artifacts + +Do not commit: `*.d`, `*.o`, `*.so` files in `src/`, and `tests/testthat/testthat-problems.rds`. +These are build artifacts that are regenerated automatically (see `src/README.md` for details on dependency tracking). + +Careful with changes to `*.dd`, keep system headers out, only expect changes if new source files are added or their local dependencies change. + ## Testing - Add test cases for all new functionality - For newly created autogenerated functions, always add a test to `test-aaa-auto.R` - Test file naming should mirror source file naming +- Implement both structured and snapshot tests. For the latter, ensure stability by setting a random seed and calling `local_igraph_options(print.id = FALSE)` if graph IDs are involved. +- When testing error behavior, prefer snapshot tests. - Run tests frequently during development and at the end: `testthat::test_local(reporter = "check")` +- Run `devtools::check()` as a final step to ensure all checks pass. diff --git a/DESCRIPTION b/DESCRIPTION index eb028b7ff11..3a694d5b571 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: igraph Title: Network Analysis and Visualization -Version: 2.2.1.9000 +Version: 2.2.1.9003 Authors@R: c( person("Gábor", "Csárdi", , "csardi.gabor@gmail.com", role = "aut", comment = c(ORCID = "0000-0001-7098-9676")), diff --git a/NAMESPACE b/NAMESPACE index 3f6c8aa75dd..d69b94b23d8 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -222,6 +222,7 @@ export(centralize) export(centralize.scores) export(chordal_ring) export(chung_lu) +export(circulant) export(cit_cit_types) export(cit_types) export(cited.type.game) @@ -272,9 +273,11 @@ export(count.multiple) export(count_automorphisms) export(count_components) export(count_isomorphisms) +export(count_loops) export(count_max_cliques) export(count_motifs) export(count_multiple) +export(count_reachable) export(count_subgraph_isomorphisms) export(count_triangles) export(create.communities) @@ -366,6 +369,7 @@ export(from_prufer) export(full_bipartite_graph) export(full_citation_graph) export(full_graph) +export(full_multipartite) export(get.adjacency) export(get.adjedgelist) export(get.adjlist) @@ -529,6 +533,7 @@ export(induced_subgraph) export(infomap.community) export(interconnected.islands.game) export(intersection) +export(invalidate_cache) export(is.bipartite) export(is.chordal) export(is.connected) @@ -648,6 +653,7 @@ export(local_scan) export(make_) export(make_bipartite_graph) export(make_chordal_ring) +export(make_circulant) export(make_clusters) export(make_de_bruijn_graph) export(make_directed_graph) @@ -657,6 +663,7 @@ export(make_from_prufer) export(make_full_bipartite_graph) export(make_full_citation_graph) export(make_full_graph) +export(make_full_multipartite) export(make_graph) export(make_kautz_graph) export(make_lattice) @@ -666,6 +673,7 @@ export(make_ring) export(make_star) export(make_tree) export(make_tri_lattice) +export(make_turan) export(make_undirected_graph) export(match_vertices) export(max_bipartite_match) @@ -682,6 +690,7 @@ export(maximal.independent.vertex.sets) export(maximal_ivs) export(maximum.bipartite.matching) export(maximum.cardinality.search) +export(mean_degree) export(mean_distance) export(membership) export(merge_coords) @@ -866,12 +875,14 @@ export(topo_sort) export(topological.sort) export(traits) export(traits_callaway) +export(transitive_closure) export(transitivity) export(tree) export(tri_lattice) export(triad.census) export(triad_census) export(triangles) +export(turan) export(undirected_graph) export(unfold.tree) export(unfold_tree) diff --git a/NEWS.md b/NEWS.md index 89c6ad8caad..47db062864d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,144 @@ +# igraph 2.2.1.9003 + +## Bug fixes + +- Fix `alpha_centrality()` crash when `weights` is a custom attribute name (#915, #2403). + +## Features + +- Add `make_full_multipartite()` and `make_turan()` graph constructors (#1562, #2406). + +- Add `count_loops()` to R interface (#1379, #2414). + +- Add `make_circulant()` to expose `igraph_circulant()` (#1563, #2407). + +- Add `mean_degree()` to R (#1380, #2415). + +- `vertices()` errors on duplicate attribute names (#1248, #2430). + +- Add `count_reachable()` function to R (#1349, #2412). + +## Chore + +- Auto-update from GitHub Actions (#2454). + + +# igraph 2.2.1.9002 + +## Bug fixes + +- Use `LC_ALL=C` instead of `LOCALE=C` in `deps.mk` (#2446, #2447). + +## Features + +- Add autogeneration for all C functions currently in use (#2424, #2442). + +## Chore + +- Format. + +- Ensure args are named. + +## Continuous integration + +- Fix final status as set by Copilot \[ci skip\]. + +## Documentation + +- More instructions \[ci skip\]. + +## Refactoring + +- Switch from `.Call()` to autogenerated `_impl` functions (#2434, #2443). + +## Testing + +- Add structured tests alongside snapshot tests for ALL \_impl functions in test-aaa-auto.R (#2448, #2449). + +## Uncategorized + +- Merge branch 'cran-2.2.1'. + + +# igraph 2.2.1.9001 + +## Bug fixes + +- Fix matrix lists for output. + +## Features + +- Add `invalidate_cache()` to R interface (#1387, #2416). + +- All arguments in calls to `_impl()` functions are named (#2423). + +## Chore + +- Use `Rx_` prefix for manually generated functions. + +- Clarify error testing preference \[ci skip\]. + +- Ignore \[ci skip\]. + +- Use `_impl` variants instead of inline `.Call()` for five functions with changed C signatures (#2428, #2429). + +- Format \[ci skip\]. + +- Expand remaining `_impl` aliases (#2422). + +- Remove unused `NTIMER` and `NPRINT` macro definitions (#1095, #2405). + +- Cleanup. + +- Request math notation. + +### deps + +- Bump jinja2 from 3.1.2 to 3.1.6 in /tools/py-stimulus (#2401). + +- Replace `_impl` aliases in `R/flow.R` (#2347, #2379). + +- Autogenerated file looks more like as if it was formatted with `air` (#2395). + +## Continuous integration + +- Run daily vendoring to avoid noise \[ci skip\]. + +- Snapshots \[ci skip\]. + +- Use proper actor name \[ci skip\]. + +- Reduce contention by running big matrices overnight. + +- Add workflow to auto-assign to Copilot. + +- Run running sanitizer only on cran branches to avoid pipeline contention. + +## Documentation + +- More instructions \[ci skip\]. + +- More instructions \[ci skip\]. + +- More instructions \[ci skip\]. + +- More instructions \[ci skip\]. + +- Experimental. + +- New code \[ci skip\]. + +- Add GitHub Copilot instructions and expand AGENTS.md (#2397, #2400). + +## Refactoring + +- Replace `_impl` aliases with explicit wrapper functions in `R/topology.R` (#2366, #2398). + +- Replace \_impl aliases in R/other.R (#2355, #2388). + + # igraph 2.2.1.9000 ## Chore diff --git a/R/aaa-auto.R b/R/aaa-auto.R index a019de8c302..70f78682028 100644 --- a/R/aaa-auto.R +++ b/R/aaa-auto.R @@ -38,6 +38,25 @@ add_edges_impl <- function( res } +add_vertices_impl <- function( + graph, + nv +) { + # Argument checks + ensure_igraph(graph) + nv <- as.numeric(nv) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_add_vertices, + graph, + nv + ) + + res +} + copy_impl <- function( from ) { @@ -54,6 +73,44 @@ copy_impl <- function( res } +delete_edges_impl <- function( + graph, + edges +) { + # Argument checks + ensure_igraph(graph) + edges <- as_igraph_es(graph, edges) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_delete_edges, + graph, + edges - 1 + ) + + res +} + +delete_vertices_impl <- function( + graph, + vertices +) { + # Argument checks + ensure_igraph(graph) + vertices <- as_igraph_vs(graph, vertices) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_delete_vertices, + graph, + vertices - 1 + ) + + res +} + delete_vertices_idx_impl <- function( graph, vertices @@ -89,6 +146,22 @@ vcount_impl <- function( res } +ecount_impl <- function( + graph +) { + # Argument checks + ensure_igraph(graph) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_ecount, + graph + ) + + res +} + neighbors_impl <- function( graph, vid, @@ -119,6 +192,22 @@ neighbors_impl <- function( res } +is_directed_impl <- function( + graph +) { + # Argument checks + ensure_igraph(graph) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_is_directed, + graph + ) + + res +} + degree_impl <- function( graph, vids = V(graph), @@ -144,6 +233,25 @@ degree_impl <- function( res } +edges_impl <- function( + graph, + eids +) { + # Argument checks + ensure_igraph(graph) + eids <- as_igraph_es(graph, eids) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_edges, + graph, + eids - 1 + ) + + res +} + get_all_eids_between_impl <- function( graph, from, @@ -183,6 +291,36 @@ get_all_eids_between_impl <- function( res } +incident_impl <- function( + graph, + vid, + mode = c("all", "out", "in", "total") +) { + # Argument checks + ensure_igraph(graph) + vid <- as_igraph_vs(graph, vid) + if (length(vid) == 0) { + cli::cli_abort( + "{.arg vid} must specify at least one vertex", + call = rlang::caller_env() + ) + } + mode <- switch_igraph_arg(mode, "out" = 1L, "in" = 2L, "all" = 3L, "total" = 3L) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_incident, + graph, + vid - 1, + mode + ) + if (igraph_opt("return.vs.es")) { + res <- create_es(graph, res) + } + res +} + wheel_impl <- function( n, mode = c("out", "in", "undirected", "mutual"), @@ -491,6 +629,22 @@ kautz_impl <- function( res } +famous_impl <- function( + name +) { + # Argument checks + + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_famous, + name + ) + + res +} + lcf_vector_impl <- function( n, shifts, @@ -601,6 +755,12 @@ full_multipartite_impl <- function( mode ) + if (igraph_opt("add.params")) { + res$name <- 'Full multipartite graph' + res$n <- n + res$mode <- mode + } + res } @@ -691,6 +851,11 @@ circulant_impl <- function( directed ) + if (igraph_opt("add.params")) { + res$name <- 'Circulant graph' + res$shifts <- shifts + } + res } @@ -729,6 +894,12 @@ turan_impl <- function( r ) + if (igraph_opt("add.params")) { + res$name <- 'Turan graph' + res$n <- n + res$r <- r + } + res } @@ -2380,6 +2551,28 @@ personalized_pagerank_vs_impl <- function( res } +rewire_impl <- function( + rewire, + n, + mode = c("simple", "simple_loops") +) { + # Argument checks + ensure_igraph(rewire) + n <- as.numeric(n) + mode <- switch_igraph_arg(mode, "simple" = 0L, "simple_loops" = 1L) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_rewire, + rewire, + n, + mode + ) + + res +} + induced_subgraph_impl <- function( graph, vids, @@ -2664,6 +2857,35 @@ reciprocity_impl <- function( res } +constraint_impl <- function( + graph, + vids = V(graph), + weights = NULL +) { + # Argument checks + ensure_igraph(graph) + vids <- as_igraph_vs(graph, vids) + if (is.null(weights) && "weight" %in% edge_attr_names(graph)) { + weights <- E(graph)$weight + } + if (!is.null(weights) && !all(is.na(weights))) { + weights <- as.numeric(weights) + } else { + weights <- NULL + } + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_constraint, + graph, + vids - 1, + weights + ) + + res +} + maxdegree_impl <- function( graph, ..., @@ -2729,6 +2951,25 @@ mean_degree_impl <- function( res } +topological_sorting_impl <- function( + graph, + mode = c("out", "in", "all", "total") +) { + # Argument checks + ensure_igraph(graph) + mode <- switch_igraph_arg(mode, "out" = 1L, "in" = 2L, "all" = 3L, "total" = 3L) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_topological_sorting, + graph, + mode + ) + + res +} + feedback_arc_set_impl <- function( graph, weights = NULL, @@ -2944,6 +3185,24 @@ count_multiple_impl <- function( res } +girth_impl <- function( + graph +) { + # Argument checks + ensure_igraph(graph) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_girth, + graph + ) + if (igraph_opt("return.vs.es")) { + res$circle <- create_vs(graph, res$circle) + } + res +} + is_perfect_impl <- function( graph ) { @@ -4616,6 +4875,28 @@ largest_cliques_impl <- function( res } +maximal_cliques_count_impl <- function( + graph, + min.size = 0, + max.size = 0 +) { + # Argument checks + ensure_igraph(graph) + min.size <- as.numeric(min.size) + max.size <- as.numeric(max.size) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_maximal_cliques_count, + graph, + min.size, + max.size + ) + + res +} + maximal_cliques_hist_impl <- function( graph, min.size = 0, @@ -4764,7 +5045,7 @@ is_independent_vertex_set_impl <- function( res } -layout_random_impl <- function( +largest_independent_vertex_sets_impl <- function( graph ) { # Argument checks @@ -4773,36 +5054,88 @@ layout_random_impl <- function( on.exit(.Call(R_igraph_finalizer)) # Function call res <- .Call( - R_igraph_layout_random, + R_igraph_largest_independent_vertex_sets, graph ) - + if (igraph_opt("return.vs.es")) { + res <- lapply(res, unsafe_create_vs, graph = graph, verts = V(graph)) + } res } -layout_circle_impl <- function( - graph, - order = V(graph) +maximal_independent_vertex_sets_impl <- function( + graph ) { # Argument checks ensure_igraph(graph) - order <- as_igraph_vs(graph, order) on.exit(.Call(R_igraph_finalizer)) # Function call res <- .Call( - R_igraph_layout_circle, - graph, - order - 1 + R_igraph_maximal_independent_vertex_sets, + graph ) - + if (igraph_opt("return.vs.es")) { + res <- lapply(res, unsafe_create_vs, graph = graph, verts = V(graph)) + } res } -layout_star_impl <- function( - graph, - center = V(graph)[1], - order = NULL +independence_number_impl <- function( + graph +) { + # Argument checks + ensure_igraph(graph) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_independence_number, + graph + ) + + res +} + +layout_random_impl <- function( + graph +) { + # Argument checks + ensure_igraph(graph) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_layout_random, + graph + ) + + res +} + +layout_circle_impl <- function( + graph, + order = V(graph) +) { + # Argument checks + ensure_igraph(graph) + order <- as_igraph_vs(graph, order) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_layout_circle, + graph, + order - 1 + ) + + res +} + +layout_star_impl <- function( + graph, + center = V(graph)[1], + order = NULL ) { # Argument checks ensure_igraph(graph) @@ -5200,6 +5533,44 @@ layout_align_impl <- function( res } +cocitation_impl <- function( + graph, + vids = V(graph) +) { + # Argument checks + ensure_igraph(graph) + vids <- as_igraph_vs(graph, vids) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_cocitation, + graph, + vids - 1 + ) + + res +} + +bibcoupling_impl <- function( + graph, + vids = V(graph) +) { + # Argument checks + ensure_igraph(graph) + vids <- as_igraph_vs(graph, vids) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_bibcoupling, + graph, + vids - 1 + ) + + res +} + similarity_dice_impl <- function( graph, vids = V(graph), @@ -5708,6 +6079,72 @@ graphlets_impl <- function( res } +graphlets_candidate_basis_impl <- function( + graph, + weights = NULL +) { + # Argument checks + ensure_igraph(graph) + if (is.null(weights) && "weight" %in% edge_attr_names(graph)) { + weights <- E(graph)$weight + } + if (!is.null(weights) && !all(is.na(weights))) { + weights <- as.numeric(weights) + } else { + weights <- NULL + } + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_graphlets_candidate_basis, + graph, + weights + ) + if (igraph_opt("return.vs.es")) { + res$cliques <- lapply(res$cliques, unsafe_create_vs, graph = graph, verts = V(graph)) + } + res +} + +graphlets_project_impl <- function( + graph, + weights = NULL, + cliques, + Muc, + startMu = FALSE, + niter = 1000 +) { + # Argument checks + ensure_igraph(graph) + if (is.null(weights) && "weight" %in% edge_attr_names(graph)) { + weights <- E(graph)$weight + } + if (!is.null(weights) && !all(is.na(weights))) { + weights <- as.numeric(weights) + } else { + weights <- NULL + } + Muc <- as.numeric(Muc) + startMu <- as.logical(startMu) + niter <- as.numeric(niter) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_graphlets_project, + graph, + weights, + lapply(cliques, function(.x) .x - 1), + Muc, + startMu, + niter + ) + + class(res) <- "igraphHRG" + res +} + hrg_fit_impl <- function( graph, hrg = NULL, @@ -5973,6 +6410,25 @@ get_adjacency_sparse_impl <- function( res } +get_edgelist_impl <- function( + graph, + bycol = FALSE +) { + # Argument checks + ensure_igraph(graph) + bycol <- as.logical(bycol) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_get_edgelist, + graph, + bycol + ) + + res +} + get_stochastic_impl <- function( graph, column.wise = FALSE, @@ -6072,6 +6528,223 @@ to_undirected_impl <- function( res } +read_graph_pajek_impl <- function( + instream +) { + # Argument checks + check_string(instream) + + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_read_graph_pajek, + instream + ) + + res +} + +read_graph_graphml_impl <- function( + instream, + index = 0 +) { + # Argument checks + check_string(instream) + + index <- as.numeric(index) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_read_graph_graphml, + instream, + index + ) + + res +} + +read_graph_graphdb_impl <- function( + instream, + directed = FALSE +) { + # Argument checks + check_string(instream) + + directed <- as.logical(directed) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_read_graph_graphdb, + instream, + directed + ) + + res +} + +read_graph_gml_impl <- function( + instream +) { + # Argument checks + check_string(instream) + + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_read_graph_gml, + instream + ) + + res +} + +read_graph_dl_impl <- function( + instream, + directed = TRUE +) { + # Argument checks + check_string(instream) + + directed <- as.logical(directed) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_read_graph_dl, + instream, + directed + ) + + res +} + +write_graph_edgelist_impl <- function( + graph, + outstream +) { + # Argument checks + ensure_igraph(graph) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_write_graph_edgelist, + graph, + outstream + ) + + res +} + +write_graph_leda_impl <- function( + graph, + outstream, + names = "name", + weights = "weight" +) { + # Argument checks + ensure_igraph(graph) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_write_graph_leda, + graph, + outstream, + names, + weights + ) + + res +} + +write_graph_graphml_impl <- function( + graph, + outstream, + prefixattr = TRUE +) { + # Argument checks + ensure_igraph(graph) + prefixattr <- as.logical(prefixattr) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_write_graph_graphml, + graph, + outstream, + prefixattr + ) + + res +} + +write_graph_pajek_impl <- function( + graph, + outstream +) { + # Argument checks + ensure_igraph(graph) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_write_graph_pajek, + graph, + outstream + ) + + res +} + +write_graph_gml_impl <- function( + graph, + outstream, + options = c("default", "encode_only_quot"), + id, + creator = NULL +) { + # Argument checks + ensure_igraph(graph) + options <- switch_igraph_arg(options, "default" = 0L, "encode_only_quot" = 1L) + id <- as.numeric(id) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_write_graph_gml, + graph, + outstream, + options, + id, + creator + ) + + res +} + +write_graph_dot_impl <- function( + graph, + outstream +) { + # Argument checks + ensure_igraph(graph) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_write_graph_dot, + graph, + outstream + ) + + res +} + motifs_randesu_impl <- function( graph, size = 3, @@ -6406,88 +7079,202 @@ local_scan_neighborhood_ecount_impl <- function( neighborhoods ) { # Argument checks - ensure_igraph(graph) - if (is.null(weights) && "weight" %in% edge_attr_names(graph)) { - weights <- E(graph)$weight - } - if (!is.null(weights) && !all(is.na(weights))) { - weights <- as.numeric(weights) - } else { - weights <- NULL - } + ensure_igraph(graph) + if (is.null(weights) && "weight" %in% edge_attr_names(graph)) { + weights <- E(graph)$weight + } + if (!is.null(weights) && !all(is.na(weights))) { + weights <- as.numeric(weights) + } else { + weights <- NULL + } + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_local_scan_neighborhood_ecount, + graph, + weights, + lapply(neighborhoods, function(.x) .x - 1) + ) + + res +} + +local_scan_subset_ecount_impl <- function( + graph, + weights = NULL, + subsets +) { + # Argument checks + ensure_igraph(graph) + if (is.null(weights) && "weight" %in% edge_attr_names(graph)) { + weights <- E(graph)$weight + } + if (!is.null(weights) && !all(is.na(weights))) { + weights <- as.numeric(weights) + } else { + weights <- NULL + } + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_local_scan_subset_ecount, + graph, + weights, + lapply(subsets, function(.x) .x - 1) + ) + + res +} + +list_triangles_impl <- function( + graph +) { + # Argument checks + ensure_igraph(graph) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_list_triangles, + graph + ) + if (igraph_opt("return.vs.es")) { + res <- create_vs(graph, res) + } + res +} + +disjoint_union_impl <- function( + left, + right +) { + # Argument checks + ensure_igraph(left) + ensure_igraph(right) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_disjoint_union, + left, + right + ) + + res +} + +join_impl <- function( + left, + right +) { + # Argument checks + ensure_igraph(left) + ensure_igraph(right) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_join, + left, + right + ) + + res +} + +union_impl <- function( + left, + right +) { + # Argument checks + ensure_igraph(left) + ensure_igraph(right) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_union, + left, + right + ) + + res +} + +intersection_impl <- function( + left, + right +) { + # Argument checks + ensure_igraph(left) + ensure_igraph(right) on.exit(.Call(R_igraph_finalizer)) # Function call res <- .Call( - R_igraph_local_scan_neighborhood_ecount, - graph, - weights, - lapply(neighborhoods, function(.x) .x - 1) + R_igraph_intersection, + left, + right ) res } -local_scan_subset_ecount_impl <- function( - graph, - weights = NULL, - subsets +difference_impl <- function( + orig, + sub ) { # Argument checks - ensure_igraph(graph) - if (is.null(weights) && "weight" %in% edge_attr_names(graph)) { - weights <- E(graph)$weight - } - if (!is.null(weights) && !all(is.na(weights))) { - weights <- as.numeric(weights) - } else { - weights <- NULL - } + ensure_igraph(orig) + ensure_igraph(sub) on.exit(.Call(R_igraph_finalizer)) # Function call res <- .Call( - R_igraph_local_scan_subset_ecount, - graph, - weights, - lapply(subsets, function(.x) .x - 1) + R_igraph_difference, + orig, + sub ) res } -list_triangles_impl <- function( - graph +complementer_impl <- function( + graph, + loops = FALSE ) { # Argument checks ensure_igraph(graph) + loops <- as.logical(loops) on.exit(.Call(R_igraph_finalizer)) # Function call res <- .Call( - R_igraph_list_triangles, - graph + R_igraph_complementer, + graph, + loops ) - if (igraph_opt("return.vs.es")) { - res <- create_vs(graph, res) - } + res } -join_impl <- function( - left, - right +compose_impl <- function( + g1, + g2 ) { # Argument checks - ensure_igraph(left) - ensure_igraph(right) + ensure_igraph(g1) + ensure_igraph(g2) on.exit(.Call(R_igraph_finalizer)) # Function call res <- .Call( - R_igraph_join, - left, - right + R_igraph_compose, + g1, + g2 ) res @@ -6662,6 +7449,66 @@ maxflow_impl <- function( res } +mincut_impl <- function( + graph, + capacity = NULL +) { + # Argument checks + ensure_igraph(graph) + if (is.null(capacity) && "capacity" %in% edge_attr_names(graph)) { + capacity <- E(graph)$capacity + } + if (!is.null(capacity) && !all(is.na(capacity))) { + capacity <- as.numeric(capacity) + } else { + capacity <- NULL + } + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_mincut, + graph, + capacity + ) + if (igraph_opt("return.vs.es")) { + res$partition1 <- create_vs(graph, res$partition1) + } + if (igraph_opt("return.vs.es")) { + res$partition2 <- create_vs(graph, res$partition2) + } + if (igraph_opt("return.vs.es")) { + res$cut <- create_es(graph, res$cut) + } + res +} + +mincut_value_impl <- function( + graph, + capacity = NULL +) { + # Argument checks + ensure_igraph(graph) + if (is.null(capacity) && "capacity" %in% edge_attr_names(graph)) { + capacity <- E(graph)$capacity + } + if (!is.null(capacity) && !all(is.na(capacity))) { + capacity <- as.numeric(capacity) + } else { + capacity <- NULL + } + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_mincut_value, + graph, + capacity + ) + + res +} + residual_graph_impl <- function( graph, capacity, @@ -6772,6 +7619,82 @@ st_mincut_impl <- function( res } +vertex_connectivity_impl <- function( + graph, + checks = TRUE +) { + # Argument checks + ensure_igraph(graph) + checks <- as.logical(checks) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_vertex_connectivity, + graph, + checks + ) + + res +} + +edge_connectivity_impl <- function( + graph, + checks = TRUE +) { + # Argument checks + ensure_igraph(graph) + checks <- as.logical(checks) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_edge_connectivity, + graph, + checks + ) + + res +} + +adhesion_impl <- function( + graph, + checks = TRUE +) { + # Argument checks + ensure_igraph(graph) + checks <- as.logical(checks) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_adhesion, + graph, + checks + ) + + res +} + +cohesion_impl <- function( + graph, + checks = TRUE +) { + # Argument checks + ensure_igraph(graph) + checks <- as.logical(checks) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_cohesion, + graph, + checks + ) + + res +} + dominator_tree_impl <- function( graph, root, @@ -6980,6 +7903,44 @@ minimum_size_separators_impl <- function( res } +cohesive_blocks_impl <- function( + graph +) { + # Argument checks + ensure_igraph(graph) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_cohesive_blocks, + graph + ) + if (igraph_opt("return.vs.es")) { + res$blocks <- lapply(res$blocks, unsafe_create_vs, graph = graph, verts = V(graph)) + } + class(res) <- "cohesiveBlocks" + res +} + +coreness_impl <- function( + graph, + mode = c("all", "out", "in", "total") +) { + # Argument checks + ensure_igraph(graph) + mode <- switch_igraph_arg(mode, "out" = 1L, "in" = 2L, "all" = 3L, "total" = 3L) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_coreness, + graph, + mode + ) + + res +} + isoclass_impl <- function( graph ) { @@ -7980,6 +8941,25 @@ sir_impl <- function( res } +running_mean_impl <- function( + data, + binwidth +) { + # Argument checks + data <- as.numeric(data) + binwidth <- as.numeric(binwidth) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_running_mean, + data, + binwidth + ) + + res +} + convex_hull_2d_impl <- function( data ) { @@ -8342,6 +9322,48 @@ is_complete_impl <- function( res } +minimum_spanning_tree_unweighted_impl <- function( + graph +) { + # Argument checks + ensure_igraph(graph) + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_minimum_spanning_tree_unweighted, + graph + ) + + res +} + +minimum_spanning_tree_prim_impl <- function( + graph, + weights +) { + # Argument checks + ensure_igraph(graph) + if (is.null(weights) && "weight" %in% edge_attr_names(graph)) { + weights <- E(graph)$weight + } + if (!is.null(weights) && !all(is.na(weights))) { + weights <- as.numeric(weights) + } else { + weights <- NULL + } + + on.exit(.Call(R_igraph_finalizer)) + # Function call + res <- .Call( + R_igraph_minimum_spanning_tree_prim, + graph, + weights + ) + + res +} + random_spanning_tree_impl <- function( graph, vid = 0 diff --git a/R/adjacency.R b/R/adjacency.R index c96f3f1a54d..32eda290846 100644 --- a/R/adjacency.R +++ b/R/adjacency.R @@ -290,7 +290,7 @@ graph_from_adjacency_matrix <- function( add.rownames = NA ) { ensure_no_na(adjmatrix, "adjacency matrix") - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) if (!is.matrix(adjmatrix) && !inherits(adjmatrix, "Matrix")) { lifecycle::deprecate_soft( @@ -415,7 +415,7 @@ graph.adjacency.dense <- function( if (is.logical(diag)) { diag <- ifelse(diag, "once", "ignore") } - diag <- igraph.match.arg(diag) + diag <- igraph_match_arg(diag) diag <- switch(diag, "ignore" = 0L, "twice" = 1L, "once" = 2L) if (nrow(adjmatrix) != ncol(adjmatrix)) { diff --git a/R/assortativity.R b/R/assortativity.R index e6f9c98ca93..b33f9a7395d 100644 --- a/R/assortativity.R +++ b/R/assortativity.R @@ -212,7 +212,13 @@ assortativity <- function( values.in <- types2 } - assortativity_impl(graph, values, values.in, directed, normalized) + assortativity_impl( + graph = graph, + values = values, + values.in = values.in, + directed = directed, + normalized = normalized + ) } assortativity_legacy <- function( @@ -221,7 +227,12 @@ assortativity_legacy <- function( types2 = NULL, directed = TRUE ) { - assortativity_impl(graph, types1, types2, directed) + assortativity_impl( + graph = graph, + values = types1, + values.in = types2, + directed = directed + ) } #' @param types Vector giving the vertex types. They as assumed to be integer diff --git a/R/attributes.R b/R/attributes.R index 1e3348ac6e8..cf4291f95c8 100644 --- a/R/attributes.R +++ b/R/attributes.R @@ -328,7 +328,7 @@ graph_attr <- function(graph, name) { check_string(name) - .Call(R_igraph_mybracket2, graph, igraph_t_idx_attr, igraph_attr_idx_graph)[[ + .Call(Rx_igraph_mybracket2, graph, igraph_t_idx_attr, igraph_attr_idx_graph)[[ name ]] } @@ -402,7 +402,7 @@ set_graph_attr <- function(graph, name, value) { graph.attributes <- function(graph) { ensure_igraph(graph) .Call( - R_igraph_mybracket2_copy, + Rx_igraph_mybracket2_copy, graph, igraph_t_idx_attr, igraph_attr_idx_graph @@ -418,7 +418,7 @@ graph.attributes <- function(graph) { } .Call( - R_igraph_mybracket2_set, + Rx_igraph_mybracket2_set, graph, igraph_t_idx_attr, igraph_attr_idx_graph, @@ -460,7 +460,7 @@ vertex_attr <- function(graph, name, index = V(graph)) { check_string(name) myattr <- .Call( - R_igraph_mybracket2, + Rx_igraph_mybracket2, graph, igraph_t_idx_attr, igraph_attr_idx_vertex @@ -610,7 +610,7 @@ i_set_vertex_attr <- function( } vattrs <- .Call( - R_igraph_mybracket2, + Rx_igraph_mybracket2, graph, igraph_t_idx_attr, igraph_attr_idx_vertex @@ -644,7 +644,7 @@ i_set_vertex_attr <- function( } .Call( - R_igraph_mybracket2_set, + Rx_igraph_mybracket2_set, graph, igraph_t_idx_attr, igraph_attr_idx_vertex, @@ -661,7 +661,7 @@ vertex.attributes <- function(graph, index = V(graph)) { } res <- .Call( - R_igraph_mybracket2_copy, + Rx_igraph_mybracket2_copy, graph, igraph_t_idx_attr, igraph_attr_idx_vertex @@ -721,7 +721,7 @@ set_value_at <- function(value, idx, length_out) { } .Call( - R_igraph_mybracket2_set, + Rx_igraph_mybracket2_set, graph, igraph_t_idx_attr, igraph_attr_idx_vertex, @@ -762,7 +762,7 @@ edge_attr <- function(graph, name, index = E(graph)) { } else { check_string(name) myattr <- .Call( - R_igraph_mybracket2, + Rx_igraph_mybracket2, graph, igraph_t_idx_attr, igraph_attr_idx_edge @@ -866,7 +866,7 @@ i_set_edge_attr <- function( } eattrs <- .Call( - R_igraph_mybracket2, + Rx_igraph_mybracket2, graph, igraph_t_idx_attr, igraph_attr_idx_edge @@ -897,7 +897,7 @@ i_set_edge_attr <- function( } .Call( - R_igraph_mybracket2_set, + Rx_igraph_mybracket2_set, graph, igraph_t_idx_attr, igraph_attr_idx_edge, @@ -914,7 +914,7 @@ edge.attributes <- function(graph, index = E(graph)) { } res <- .Call( - R_igraph_mybracket2_copy, + Rx_igraph_mybracket2_copy, graph, igraph_t_idx_attr, igraph_attr_idx_edge @@ -964,7 +964,7 @@ edge.attributes <- function(graph, index = E(graph)) { } .Call( - R_igraph_mybracket2_set, + Rx_igraph_mybracket2_set, graph, igraph_t_idx_attr, igraph_attr_idx_edge, @@ -987,7 +987,7 @@ edge.attributes <- function(graph, index = E(graph)) { graph_attr_names <- function(graph) { ensure_igraph(graph) res <- .Call( - R_igraph_mybracket2_names, + Rx_igraph_mybracket2_names, graph, igraph_t_idx_attr, igraph_attr_idx_graph @@ -1016,7 +1016,7 @@ vertex_attr_names <- function(graph) { ensure_igraph(graph) res <- .Call( - R_igraph_mybracket2_names, + Rx_igraph_mybracket2_names, graph, igraph_t_idx_attr, igraph_attr_idx_vertex @@ -1044,7 +1044,7 @@ vertex_attr_names <- function(graph) { edge_attr_names <- function(graph) { ensure_igraph(graph) res <- .Call( - R_igraph_mybracket2_names, + Rx_igraph_mybracket2_names, graph, igraph_t_idx_attr, igraph_attr_idx_edge @@ -1078,7 +1078,7 @@ delete_graph_attr <- function(graph, name) { } gattr <- .Call( - R_igraph_mybracket2, + Rx_igraph_mybracket2, graph, igraph_t_idx_attr, igraph_attr_idx_graph @@ -1086,7 +1086,7 @@ delete_graph_attr <- function(graph, name) { gattr[[name]] <- NULL .Call( - R_igraph_mybracket2_set, + Rx_igraph_mybracket2_set, graph, igraph_t_idx_attr, igraph_attr_idx_graph, @@ -1118,7 +1118,7 @@ delete_vertex_attr <- function(graph, name) { } vattr <- .Call( - R_igraph_mybracket2, + Rx_igraph_mybracket2, graph, igraph_t_idx_attr, igraph_attr_idx_vertex @@ -1126,7 +1126,7 @@ delete_vertex_attr <- function(graph, name) { vattr[[name]] <- NULL .Call( - R_igraph_mybracket2_set, + Rx_igraph_mybracket2_set, graph, igraph_t_idx_attr, igraph_attr_idx_vertex, @@ -1158,7 +1158,7 @@ delete_edge_attr <- function(graph, name) { } eattr <- .Call( - R_igraph_mybracket2, + Rx_igraph_mybracket2, graph, igraph_t_idx_attr, igraph_attr_idx_edge @@ -1166,7 +1166,7 @@ delete_edge_attr <- function(graph, name) { eattr[[name]] <- NULL .Call( - R_igraph_mybracket2_set, + Rx_igraph_mybracket2_set, graph, igraph_t_idx_attr, igraph_attr_idx_edge, diff --git a/R/bipartite.R b/R/bipartite.R index bf1dfb4673b..fdb184dd7b3 100644 --- a/R/bipartite.R +++ b/R/bipartite.R @@ -179,7 +179,7 @@ bipartite_projection <- function( probe1 <- -1 } which <- switch( - igraph.match.arg(which), + igraph_match_arg(which), "both" = 0L, "false" = 1L, "true" = 2L diff --git a/R/centrality.R b/R/centrality.R index 54f9c4bbb00..a8f328560bc 100644 --- a/R/centrality.R +++ b/R/centrality.R @@ -444,27 +444,12 @@ betweenness <- function( normalized = FALSE, cutoff = -1 ) { - ensure_igraph(graph) - - v <- as_igraph_vs(graph, v) - directed <- as.logical(directed) - if (is.null(weights) && "weight" %in% edge_attr_names(graph)) { - weights <- E(graph)$weight - } - if (!is.null(weights) && any(!is.na(weights))) { - weights <- as.numeric(weights) - } else { - weights <- NULL - } - cutoff <- as.numeric(cutoff) - on.exit(.Call(R_igraph_finalizer)) - res <- .Call( - R_igraph_betweenness_cutoff, - graph, - v - 1, - directed, - weights, - cutoff + res <- betweenness_cutoff_impl( + graph = graph, + vids = v, + directed = directed, + weights = weights, + cutoff = cutoff ) if (normalized) { vc <- as.numeric(vcount(graph)) @@ -474,9 +459,6 @@ betweenness <- function( res <- 2 * res / (vc * vc - 3 * vc + 2) } } - if (igraph_opt("add.vertex.names") && is_named(graph)) { - names(res) <- V(graph)$name[v] - } res } @@ -490,29 +472,12 @@ edge_betweenness <- function( weights = NULL, cutoff = -1 ) { - # Argument checks - ensure_igraph(graph) - e <- as_igraph_es(graph, e) - directed <- as.logical(directed) - if (is.null(weights) && "weight" %in% edge_attr_names(graph)) { - weights <- E(graph)$weight - } - if (!is.null(weights) && any(!is.na(weights))) { - weights <- as.numeric(weights) - } else { - weights <- NULL - } - cutoff <- as.numeric(cutoff) - - on.exit(.Call(R_igraph_finalizer)) - # Function call - res <- .Call( - R_igraph_edge_betweenness_cutoff, - graph, - directed, - weights, - cutoff + res <- edge_betweenness_cutoff_impl( + graph = graph, + directed = directed, + weights = weights, + cutoff = cutoff ) res[as.numeric(e)] } @@ -624,7 +589,7 @@ closeness <- function( vids <- as_igraph_vs(graph, vids) mode <- switch( - igraph.match.arg(mode), + igraph_match_arg(mode), "out" = 1, "in" = 2, "all" = 3, @@ -1056,7 +1021,7 @@ arpack <- function( } on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_arpack, func, extra, options, env, sym) + res <- .Call(Rx_igraph_arpack, func, extra, options, env, sym) if (complex) { rew <- arpack.unpack.complex( @@ -1094,7 +1059,7 @@ arpack.unpack.complex <- function(vectors, values, nev) { on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_arpack_unpack_complex, vectors, values, nev) + res <- .Call(Rx_igraph_arpack_unpack_complex, vectors, values, nev) res } @@ -1245,7 +1210,7 @@ spectrum <- function( } eigen_adjacency_impl( - graph, + graph = graph, algorithm = algorithm, which = which, options = options @@ -2053,7 +2018,7 @@ alpha.centrality.dense <- function( attr <- NULL } else if (is.character(weights) && length(weights) == 1) { ## name of an edge attribute, nothing to do - attr <- "weight" + attr <- weights } else if (any(!is.na(weights))) { ## weights != NULL and weights != rep(NA, x) graph <- set_edge_attr(graph, "weight", value = as.numeric(weights)) @@ -2100,7 +2065,7 @@ alpha.centrality.sparse <- function( attr <- NULL } else if (is.character(weights) && length(weights) == 1) { ## name of an edge attribute, nothing to do - attr <- "weight" + attr <- weights } else if (any(!is.na(weights))) { ## weights != NULL and weights != rep(NA, x) graph <- set_edge_attr(graph, "weight", value = as.numeric(weights)) diff --git a/R/centralization.R b/R/centralization.R index 6fa6678fdc5..8b787e187bc 100644 --- a/R/centralization.R +++ b/R/centralization.R @@ -424,7 +424,7 @@ centr_degree_tmax <- function( # Function call res <- centralization_degree_tmax_impl( - graph, + graph = graph, nodes = nodes, mode = mode, loops = loops @@ -478,9 +478,12 @@ centr_betw <- function(graph, directed = TRUE, normalized = TRUE) { directed <- as.logical(directed) normalized <- as.logical(normalized) - on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_centralization_betweenness, graph, directed, normalized) + res <- centralization_betweenness_impl( + graph = graph, + directed = directed, + normalized = normalized + ) res } @@ -676,9 +679,9 @@ centr_eigen <- function( centralization_eigenvector_centrality_impl( graph = graph, directed = directed, + scale = TRUE, options = options, - normalized = normalized, - scale = TRUE + normalized = normalized ) } diff --git a/R/cliques.R b/R/cliques.R index ec3ee54fdd8..f84341c5f7e 100644 --- a/R/cliques.R +++ b/R/cliques.R @@ -354,7 +354,7 @@ count_max_cliques <- function(graph, min = NULL, max = NULL, subset = NULL) { on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_maximal_cliques_count, graph, subset, min, max) + res <- .Call(Rx_igraph_maximal_cliques_count, graph, subset, min, max) res } @@ -551,7 +551,7 @@ largest_ivs <- function(graph) { ensure_igraph(graph) on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_largest_independent_vertex_sets, graph) + res <- .Call(Rx_igraph_largest_independent_vertex_sets, graph) res <- lapply(res, `+`, 1) if (igraph_opt("return.vs.es")) { @@ -567,7 +567,7 @@ max_ivs <- function(graph) { ensure_igraph(graph) on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_maximal_independent_vertex_sets, graph) + res <- .Call(Rx_igraph_maximal_independent_vertex_sets, graph) res <- lapply(res, `+`, 1) if (igraph_opt("return.vs.es")) { @@ -598,7 +598,7 @@ ivs_size <- function(graph) { ensure_igraph(graph) on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_independence_number, graph) + .Call(Rx_igraph_independence_number, graph) } #' @rdname ivs @@ -611,9 +611,17 @@ independence_number <- ivs_size #' @cdocs igraph_clique_size_hist clique_size_counts <- function(graph, min = 0, max = 0, maximal = FALSE) { if (maximal) { - maximal_cliques_hist_impl(graph, min, max) + maximal_cliques_hist_impl( + graph = graph, + min.size = min, + max.size = max + ) } else { - clique_size_hist_impl(graph, min, max) + clique_size_hist_impl( + graph = graph, + min.size = min, + max.size = max + ) } } diff --git a/R/cocitation.R b/R/cocitation.R index 885fdab879d..01d9fdbfdbe 100644 --- a/R/cocitation.R +++ b/R/cocitation.R @@ -58,7 +58,7 @@ cocitation <- function(graph, v = V(graph)) { v <- as_igraph_vs(graph, v) on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_cocitation, graph, v - 1) + res <- .Call(Rx_igraph_cocitation, graph, v - 1) if (igraph_opt("add.vertex.names") && is_named(graph)) { rownames(res) <- vertex_attr(graph, "name", v) colnames(res) <- vertex_attr(graph, "name") @@ -73,7 +73,7 @@ bibcoupling <- function(graph, v = V(graph)) { v <- as_igraph_vs(graph, v) on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_bibcoupling, graph, v - 1) + res <- .Call(Rx_igraph_bibcoupling, graph, v - 1) if (igraph_opt("add.vertex.names") && is_named(graph)) { rownames(res) <- vertex_attr(graph, "name", v) colnames(res) <- vertex_attr(graph, "name") diff --git a/R/cohesive.blocks.R b/R/cohesive.blocks.R index e59319008da..5fb85ecbde9 100644 --- a/R/cohesive.blocks.R +++ b/R/cohesive.blocks.R @@ -357,7 +357,7 @@ cohesive_blocks <- function(graph, labels = TRUE) { on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_cohesive_blocks, graph) + res <- .Call(Rx_igraph_cohesive_blocks, graph) class(res) <- "cohesiveBlocks" if (labels && "name" %in% vertex_attr_names(graph)) { res$labels <- V(graph)$name diff --git a/R/community.R b/R/community.R index af6497a92c6..7ea945821d6 100644 --- a/R/community.R +++ b/R/community.R @@ -984,9 +984,13 @@ modularity_matrix <- function( resolution <- as.numeric(resolution) directed <- as.logical(directed) - on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_modularity_matrix, graph, weights, resolution, directed) + res <- modularity_matrix_impl( + graph = graph, + weights = weights, + resolution = resolution, + directed = directed + ) res } @@ -1326,7 +1330,7 @@ community.to.membership2 <- function(merges, vcount, steps) { mode(vcount) <- "numeric" mode(steps) <- "numeric" on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_community_to_membership2, merges - 1, vcount, steps) + res <- .Call(Rx_igraph_community_to_membership2, merges - 1, vcount, steps) res + 1 } @@ -1481,10 +1485,10 @@ cluster_spinglass <- function( weights <- NULL } - update.rule <- igraph.match.arg(update.rule) + update.rule <- igraph_match_arg(update.rule) update.rule <- switch(update.rule, "simple" = 0, "random" = 0, "config" = 1) implementation <- switch( - igraph.match.arg(implementation), + igraph_match_arg(implementation), "orig" = 0, "neg" = 1 ) @@ -1658,7 +1662,7 @@ cluster_leiden <- function( ensure_igraph(graph) # Parse objective function argument - objective_function <- igraph.match.arg(objective_function) + objective_function <- igraph_match_arg(objective_function) objective_function <- switch(objective_function, "cpm" = 0, "modularity" = 1) # Parse edge weights argument @@ -1698,9 +1702,8 @@ cluster_leiden <- function( membership <- initial_membership if (n_iterations > 0) { res <- community_leiden_impl( - graph, + graph = graph, weights = weights, - # FIXME: Also check below, might not be covered by tests vertex.weights = vertex_weights, resolution = resolution, beta = beta, @@ -1708,6 +1711,7 @@ cluster_leiden <- function( n.iterations = n_iterations, membership = membership ) + membership <- res$membership } else { prev_quality <- -Inf @@ -1715,9 +1719,8 @@ cluster_leiden <- function( while (prev_quality < quality) { prev_quality <- quality res <- community_leiden_impl( - graph, + graph = graph, weights = weights, - # FIXME: Also check above, might not be covered by tests vertex.weights = vertex_weights, resolution = resolution, beta = beta, @@ -1725,6 +1728,7 @@ cluster_leiden <- function( n.iterations = 1, membership = membership ) + membership <- res$membership quality <- res$quality } @@ -2119,7 +2123,7 @@ cluster_fast_greedy <- function( igraph.i.levc.arp <- function(externalP, externalE) { f <- function(v) { v <- as.numeric(v) - .Call(R_igraph_i_levc_arp, externalP, externalE, v) + .Call(Rx_igraph_i_levc_arp, externalP, externalE, v) } f } @@ -2409,16 +2413,17 @@ cluster_label_prop0 <- function( ensure_igraph(graph) # Necessary because evaluated later - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) # Function call membership <- community_label_propagation_impl( - graph, + graph = graph, mode = mode, weights = weights, initial = initial, fixed = fixed ) + res <- list() if (igraph_opt("add.vertex.names") && is_named(graph)) { res$names <- V(graph)$name @@ -2515,9 +2520,12 @@ cluster_louvain <- function(graph, weights = NULL, resolution = 1) { } resolution <- as.numeric(resolution) - on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_community_multilevel, graph, weights, resolution) + res <- community_multilevel_impl( + graph = graph, + weights = weights, + resolution = resolution + ) if (igraph_opt("add.vertex.names") && is_named(graph)) { res$names <- V(graph)$name } @@ -2605,9 +2613,10 @@ cluster_optimal <- function(graph, weights = NULL) { # Function call res <- community_optimal_modularity_impl( - graph, + graph = graph, weights = weights ) + if (igraph_opt("add.vertex.names") && is_named(graph)) { res$names <- V(graph)$name } @@ -2675,35 +2684,11 @@ cluster_infomap <- function( nb.trials = 10, modularity = TRUE ) { - # Argument checks - ensure_igraph(graph) - - if (is.null(e.weights) && "weight" %in% edge_attr_names(graph)) { - e.weights <- E(graph)$weight - } - if (!is.null(e.weights) && any(!is.na(e.weights))) { - e.weights <- as.numeric(e.weights) - } else { - e.weights <- NULL - } - if (is.null(v.weights) && "weight" %in% vertex_attr_names(graph)) { - v.weights <- V(graph)$weight - } - if (!is.null(v.weights) && any(!is.na(v.weights))) { - v.weights <- as.numeric(v.weights) - } else { - v.weights <- NULL - } - nb.trials <- as.numeric(nb.trials) - - on.exit(.Call(R_igraph_finalizer)) - # Function call - res <- .Call( - R_igraph_community_infomap, - graph, - e.weights, - v.weights, - nb.trials + res <- community_infomap_impl( + graph = graph, + e.weights = e.weights, + v.weights = v.weights, + nb.trials = nb.trials ) if (igraph_opt("add.vertex.names") && is_named(graph)) { @@ -2835,7 +2820,7 @@ plot_dendrogram.communities <- function( use.modularity = FALSE, palette = categorical_pal(8) ) { - mode <- igraph.match.arg(mode, c("auto", "phylo", "hclust", "dendrogram")) + mode <- igraph_match_arg(mode, c("auto", "phylo", "hclust", "dendrogram")) old_palette <- palette(palette) on.exit(palette(old_palette), add = TRUE) @@ -3069,16 +3054,12 @@ i_compare <- function( } else { as.numeric(as.factor(comm2)) } - method <- switch( - igraph.match.arg(method), - vi = 0L, - nmi = 1L, - split.join = 2L, - rand = 3L, - adjusted.rand = 4L + method <- igraph_match_arg(method) + res <- compare_communities_impl( + comm1 = comm1, + comm2 = comm2, + method = method ) - on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_compare_communities, comm1, comm2, method) res } @@ -3126,8 +3107,10 @@ split_join_distance <- function(comm1, comm2) { } else { as.numeric(comm2) } - on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_split_join_distance, comm1, comm2) + res <- split_join_distance_impl( + comm1 = comm1, + comm2 = comm2 + ) unlist(res) } @@ -3304,7 +3287,6 @@ voronoi_cells <- function( voronoi_impl( graph = graph, generators = generators, - ..., weights = weights, mode = mode, tiebreaker = tiebreaker diff --git a/R/components.R b/R/components.R index 8e3ccb8fed9..c1b6257f467 100644 --- a/R/components.R +++ b/R/components.R @@ -203,7 +203,7 @@ decompose <- function( min.vertices = 0 ) { ensure_igraph(graph) - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode <- switch(mode, "weak" = 1L, "strong" = 2L) if (is.na(max.comps)) { @@ -258,14 +258,18 @@ decompose <- function( #' @export #' @cdocs igraph_articulation_points articulation_points <- function(graph) { - articulation_points_impl(graph = graph) + articulation_points_impl( + graph = graph + ) } #' @rdname articulation_points #' @export #' @cdocs igraph_bridges bridges <- function(graph) { - bridges_impl(graph = graph) + bridges_impl( + graph = graph + ) } @@ -319,7 +323,9 @@ bridges <- function(graph) { #' @cdocs igraph_biconnected_components biconnected_components <- function(graph) { # Function call - res <- biconnected_components_impl(graph) + res <- biconnected_components_impl( + graph = graph + ) # TODO: Clean up after fixing "." / "_" problem. # See https://github.com/igraph/rigraph/issues/1203 @@ -388,7 +394,9 @@ biconnected_components <- function(graph) { #' @export #' @cdocs igraph_is_biconnected is_biconnected <- function(graph) { - is_biconnected_impl(graph = graph) + is_biconnected_impl( + graph = graph + ) } diff --git a/R/conversion.R b/R/conversion.R index 534d772770b..c2ebf5bd807 100644 --- a/R/conversion.R +++ b/R/conversion.R @@ -229,7 +229,7 @@ get.adjacency.dense <- function( ) { ensure_igraph(graph) - type <- igraph.match.arg(type) + type <- igraph_match_arg(type) if (is.logical(loops)) { loops <- ifelse(loops, "once", "ignore") @@ -242,7 +242,7 @@ get.adjacency.dense <- function( ) ) } - loops <- igraph.match.arg(loops) + loops <- igraph_match_arg(loops) loops <- switch(loops, "ignore" = 0L, "twice" = 1L, "once" = 2L) if (!is.null(weights)) { @@ -285,7 +285,7 @@ get.adjacency.sparse <- function( ) { ensure_igraph(graph) - type <- igraph.match.arg(type) + type <- igraph_match_arg(type) vc <- vcount(graph) @@ -489,7 +489,7 @@ as_adj <- function( as_edgelist <- function(graph, names = TRUE) { ensure_igraph(graph) on.exit(.Call(R_igraph_finalizer)) - res <- matrix(.Call(R_igraph_get_edgelist, graph, TRUE), ncol = 2) + res <- matrix(.Call(Rx_igraph_get_edgelist, graph, TRUE), ncol = 2) res <- res + 1 if (names && "name" %in% vertex_attr_names(graph)) { res <- matrix(V(graph)$name[res], ncol = 2) @@ -624,17 +624,14 @@ as_undirected <- function( ) { # Argument checks ensure_igraph(graph) - mode <- switch( - igraph.match.arg(mode), - "collapse" = 1L, - "each" = 0L, - "mutual" = 2L - ) - edge.attr.comb <- igraph.i.attribute.combination(edge.attr.comb) + mode <- igraph_match_arg(mode) - on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_to_undirected, graph, mode, edge.attr.comb) + res <- to_undirected_impl( + graph = graph, + mode = mode, + edge.attr.comb = edge.attr.comb + ) res } @@ -688,9 +685,9 @@ as_adj_list <- function( ) { ensure_igraph(graph) - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode <- as.numeric(switch(mode, "out" = 1, "in" = 2, "all" = 3, "total" = 3)) - loops <- igraph.match.arg(loops) + loops <- igraph_match_arg(loops) loops <- as.numeric(switch(loops, "ignore" = 0, "twice" = 1, "once" = 2)) if (is_directed(graph) && loops == 1) { @@ -699,7 +696,7 @@ as_adj_list <- function( multiple <- if (multiple) 1 else 0 on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_get_adjlist, graph, mode, loops, multiple) + res <- .Call(Rx_igraph_get_adjlist, graph, mode, loops, multiple) res <- lapply(res, `+`, 1) if (igraph_opt("return.vs.es")) { res <- lapply(res, unsafe_create_vs, graph = graph, verts = V(graph)) @@ -719,9 +716,9 @@ as_adj_edge_list <- function( ) { ensure_igraph(graph) - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode <- as.numeric(switch(mode, "out" = 1, "in" = 2, "all" = 3, "total" = 3)) - loops <- igraph.match.arg(loops) + loops <- igraph_match_arg(loops) loops <- as.numeric(switch(loops, "ignore" = 0, "twice" = 1, "once" = 2)) if (is_directed(graph) && loops == 1) { @@ -729,7 +726,7 @@ as_adj_edge_list <- function( } on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_get_adjedgelist, graph, mode, loops) + res <- .Call(Rx_igraph_get_adjedgelist, graph, mode, loops) res <- lapply(res, function(.x) E(graph)[.x + 1]) if (is_named(graph)) { names(res) <- V(graph)$name @@ -965,7 +962,10 @@ get.incidence.dense <- function( ) { if (is.null(attr)) { ## Function call - res <- get_biadjacency_impl(graph, types) + res <- get_biadjacency_impl( + graph = graph, + types = types + ) if (names && "name" %in% vertex_attr_names(graph)) { rownames(res$res) <- V(graph)$name[res$row_ids] @@ -1186,11 +1186,11 @@ as_incidence_matrix <- function(...) { #' @export as_data_frame <- function(x, what = c("edges", "vertices", "both")) { ensure_igraph(x) - what <- igraph.match.arg(what) + what <- igraph_match_arg(what) if (what %in% c("vertices", "both")) { ver <- .Call( - R_igraph_mybracket2, + Rx_igraph_mybracket2, x, igraph_t_idx_attr, igraph_attr_idx_vertex @@ -1208,7 +1208,7 @@ as_data_frame <- function(x, what = c("edges", "vertices", "both")) { el <- as_edgelist(x) edg <- c( list(from = el[, 1], to = el[, 2]), - .Call(R_igraph_mybracket2, x, igraph_t_idx_attr, igraph_attr_idx_edge) + .Call(Rx_igraph_mybracket2, x, igraph_t_idx_attr, igraph_attr_idx_edge) ) class(edg) <- "data.frame" rownames(edg) <- seq_len(ecount(x)) @@ -1315,7 +1315,7 @@ as_long_data_frame <- function(graph) { ensure_igraph(graph) ver <- .Call( - R_igraph_mybracket2, + Rx_igraph_mybracket2, graph, igraph_t_idx_attr, igraph_attr_idx_vertex @@ -1332,7 +1332,7 @@ as_long_data_frame <- function(graph) { edg <- c( list(from = el[, 1]), list(to = el[, 2]), - .Call(R_igraph_mybracket2, graph, igraph_t_idx_attr, igraph_attr_idx_edge) + .Call(Rx_igraph_mybracket2, graph, igraph_t_idx_attr, igraph_attr_idx_edge) ) class(edg) <- "data.frame" rownames(edg) <- seq_len(ecount(graph)) diff --git a/R/cycles.R b/R/cycles.R index e74e3fd9465..af003d8310f 100644 --- a/R/cycles.R +++ b/R/cycles.R @@ -97,5 +97,12 @@ simple_cycles <- function( # Argument checks ensure_igraph(graph) - simple_cycles_impl(graph, mode, min %||% -1, max %||% -1) + simple_cycles_impl( + graph = graph, + mode = mode, + min.cycle.length = min %||% + -1, + max.cycle.length = max %||% + -1 + ) } diff --git a/R/embedding.R b/R/embedding.R index da8c4ad1557..406f7338aa9 100644 --- a/R/embedding.R +++ b/R/embedding.R @@ -183,7 +183,9 @@ embed_adjacency_matrix <- function( #' @export #' @cdocs igraph_dim_select dim_select <- function(sv) { - dim_select_impl(sv = sv) + dim_select_impl( + sv = sv + ) } @@ -398,5 +400,8 @@ sample_sphere_volume <- function(dim, n = 1, radius = 1, positive = TRUE) { #' colSums(lpvs.dir) sample_dirichlet <- function(n, alpha) { # Use the _impl function - sample_dirichlet_impl(n = n, alpha = alpha) + sample_dirichlet_impl( + n = n, + alpha = alpha + ) } diff --git a/R/epi.R b/R/epi.R index 507965304c3..9571504efca 100644 --- a/R/epi.R +++ b/R/epi.R @@ -68,7 +68,7 @@ median.sir <- function(x, na.rm = FALSE, ...) { #' @export quantile.sir <- function(x, comp = c("NI", "NS", "NR"), prob, ...) { sir <- x - comp <- toupper(igraph.match.arg(comp)) + comp <- toupper(igraph_match_arg(comp)) times <- unlist(sapply(sir, "[[", "times")) big.N <- unlist(sapply(sir, function(x) { x[[comp]] @@ -159,7 +159,7 @@ plot.sir <- function( ) { sir <- x - comp <- toupper(igraph.match.arg(comp)) + comp <- toupper(igraph_match_arg(comp)) if (!all(quantiles >= 0 & quantiles <= 1)) { cli::cli_abort("All {.arg quantiles} should be in [0,1].") } diff --git a/R/eulerian.R b/R/eulerian.R index baf9ea992fa..592209653b6 100644 --- a/R/eulerian.R +++ b/R/eulerian.R @@ -68,14 +68,20 @@ #' @export #' @cdocs igraph_is_eulerian has_eulerian_path <- function(graph) { - is_eulerian_impl(graph)$has_path + res <- is_eulerian_impl( + graph = graph + ) + res$has_path } #' @rdname has_eulerian_path #' @export #' @cdocs igraph_is_eulerian has_eulerian_cycle <- function(graph) { - is_eulerian_impl(graph)$has_cycle + res <- is_eulerian_impl( + graph = graph + ) + res$has_cycle } #' @rdname has_eulerian_path diff --git a/R/fit.R b/R/fit.R index 32c6d33e475..b1f0292c94b 100644 --- a/R/fit.R +++ b/R/fit.R @@ -190,7 +190,7 @@ fit_power_law <- function( p.precision = NULL, ... ) { - implementation <- igraph.match.arg(implementation) + implementation <- igraph_match_arg(implementation) if (implementation == "r.mle") { if (isTRUE(p.value)) { diff --git a/R/flow.R b/R/flow.R index a4a221d283b..0dc17ed20d2 100644 --- a/R/flow.R +++ b/R/flow.R @@ -411,9 +411,9 @@ min_cut <- function( if (is.null(target) && is.null(source)) { if (value.only) { - res <- .Call(R_igraph_mincut_value, graph, capacity) + res <- .Call(Rx_igraph_mincut_value, graph, capacity) } else { - res <- .Call(R_igraph_mincut, graph, capacity) + res <- .Call(Rx_igraph_mincut, graph, capacity) res$cut <- res$cut + 1 res$partition1 <- res$partition1 + 1 res$partition2 <- res$partition2 + 1 @@ -542,7 +542,7 @@ vertex_connectivity <- function( if (is.null(source) && is.null(target)) { on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_vertex_connectivity, graph, as.logical(checks)) + .Call(Rx_igraph_vertex_connectivity, graph, as.logical(checks)) } else if (!is.null(source) && !is.null(target)) { on.exit(.Call(R_igraph_finalizer)) .Call( @@ -648,7 +648,7 @@ edge_connectivity <- function( if (is.null(source) && is.null(target)) { on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_edge_connectivity, graph, as.logical(checks)) + .Call(Rx_igraph_edge_connectivity, graph, as.logical(checks)) } else if (!is.null(source) && !is.null(target)) { on.exit(.Call(R_igraph_finalizer)) .Call( @@ -704,7 +704,7 @@ adhesion <- function(graph, checks = TRUE) { ensure_igraph(graph) on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_adhesion, graph, as.logical(checks)) + .Call(Rx_igraph_adhesion, graph, as.logical(checks)) } #' @rdname vertex_connectivity @@ -714,7 +714,7 @@ cohesion.igraph <- function(x, checks = TRUE, ...) { ensure_igraph(x) on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_cohesion, x, as.logical(checks)) + .Call(Rx_igraph_cohesion, x, as.logical(checks)) } #' List all (s,t)-cuts of a graph @@ -906,17 +906,14 @@ dominator_tree <- function(graph, root, mode = c("out", "in", "all", "total")) { } root <- as_igraph_vs(graph, root) - mode <- switch( - igraph.match.arg(mode), - "out" = 1, - "in" = 2, - "all" = 3, - "total" = 3 - ) + mode <- igraph_match_arg(mode) - on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_dominator_tree, graph, root - 1, mode) + res <- dominator_tree_impl( + graph = graph, + root = root, + mode = mode + ) if (igraph_opt("return.vs.es")) { res$leftout <- create_vs(graph, res$leftout) } @@ -978,7 +975,9 @@ dominator_tree <- function(graph, root, mode = c("out", "in", "all", "total")) { #' @family flow #' @cdocs igraph_all_minimal_st_separators min_st_separators <- function(graph) { - all_minimal_st_separators_impl(graph = graph) + all_minimal_st_separators_impl( + graph = graph + ) } @@ -1214,5 +1213,7 @@ is_min_separator <- function(graph, candidate) { #' min_separators(camp) #' @cdocs igraph_minimum_size_separators min_separators <- function(graph) { - minimum_size_separators_impl(graph = graph) + minimum_size_separators_impl( + graph = graph + ) } diff --git a/R/foreign.R b/R/foreign.R index d7ccc5c354a..ab5917cc0e7 100644 --- a/R/foreign.R +++ b/R/foreign.R @@ -331,7 +331,7 @@ read_graph <- function( write.graph.fromraw(buffer, file) } - format <- igraph.match.arg(format) + format <- igraph_match_arg(format) res <- switch( format, "pajek" = read.graph.pajek(file, ...), @@ -497,7 +497,7 @@ write_graph <- function( tmpfile <- FALSE } - format <- igraph.match.arg(format) + format <- igraph_match_arg(format) res <- switch( format, "pajek" = write.graph.pajek(graph, file, ...), @@ -535,7 +535,7 @@ read.graph.edgelist <- function(file, n = 0, directed = TRUE) { write.graph.edgelist <- function(graph, file) { on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_write_graph_edgelist, graph, file) + .Call(Rx_igraph_write_graph_edgelist, graph, file) } ################################################################ @@ -550,7 +550,7 @@ read.graph.ncol <- function( directed = FALSE ) { weights <- switch( - igraph.match.arg(weights), + igraph_match_arg(weights), "no" = 0L, "yes" = 1L, "auto" = 2L @@ -598,7 +598,7 @@ read.graph.lgl <- function( directed = FALSE ) { weights <- switch( - igraph.match.arg(weights), + igraph_match_arg(weights), "no" = 0L, "yes" = 1L, "auto" = 2L @@ -642,7 +642,7 @@ write.graph.lgl <- function( read.graph.pajek <- function(file) { on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_read_graph_pajek, file) + res <- .Call(Rx_igraph_read_graph_pajek, file) if ("type" %in% vertex_attr_names(res)) { type <- as.logical(V(res)$type) res <- delete_vertex_attr(res, "type") @@ -653,11 +653,11 @@ read.graph.pajek <- function(file) { write.graph.pajek <- function(graph, file) { on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_write_graph_pajek, graph, file) + .Call(Rx_igraph_write_graph_pajek, graph, file) } read.graph.dimacs <- function(file, directed = TRUE) { - res <- .Call(R_igraph_read_graph_dimacs, file, as.logical(directed)) + res <- .Call(Rx_igraph_read_graph_dimacs, file, as.logical(directed)) if (res[[1]][1] == "max") { graph <- res[[2]] graph <- set_graph_attr(graph, "problem", res[[1]]) @@ -707,12 +707,12 @@ write.graph.dimacs <- function( read.graph.graphml <- function(file, index = 0) { on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_read_graph_graphml, file, as.numeric(index)) + .Call(Rx_igraph_read_graph_graphml, file, as.numeric(index)) } write.graph.graphml <- function(graph, file, prefixAttr = TRUE) { on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_write_graph_graphml, graph, file, as.logical(prefixAttr)) + .Call(Rx_igraph_write_graph_graphml, graph, file, as.logical(prefixAttr)) } ################################################################ @@ -721,7 +721,7 @@ write.graph.graphml <- function(graph, file, prefixAttr = TRUE) { read.graph.gml <- function(file) { on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_read_graph_gml, file) + .Call(Rx_igraph_read_graph_gml, file) } write.graph.gml <- function(graph, file, id = NULL, creator = NULL) { @@ -732,7 +732,7 @@ write.graph.gml <- function(graph, file, id = NULL, creator = NULL) { creator <- as.character(creator) } on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_write_graph_gml, graph, file, id, creator) + .Call(Rx_igraph_write_graph_gml, graph, file, id, creator) } ################################################################ @@ -741,7 +741,7 @@ write.graph.gml <- function(graph, file, id = NULL, creator = NULL) { read.graph.dl <- function(file, directed = TRUE) { on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_read_graph_dl, file, as.logical(directed)) + .Call(Rx_igraph_read_graph_dl, file, as.logical(directed)) } ################################################################ @@ -750,7 +750,7 @@ read.graph.dl <- function(file, directed = TRUE) { write.graph.dot <- function(graph, file) { on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_write_graph_dot, graph, file) + .Call(Rx_igraph_write_graph_dot, graph, file) } ################################################################ @@ -914,12 +914,12 @@ graph_from_graphdb <- function( f <- tempfile() write.graph.fromraw(buffer, f) - .Call(R_igraph_read_graph_graphdb, f, as.logical(directed)) + .Call(Rx_igraph_read_graph_graphdb, f, as.logical(directed)) } read.graph.graphdb <- function(file, directed = TRUE) { on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_read_graph_graphdb, file, as.logical(directed)) + .Call(Rx_igraph_read_graph_graphdb, file, as.logical(directed)) } write.graph.leda <- function( @@ -935,5 +935,5 @@ write.graph.leda <- function( edge.attr <- as.character(edge.attr) } on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_write_graph_leda, graph, file, vertex.attr, edge.attr) + .Call(Rx_igraph_write_graph_leda, graph, file, vertex.attr, edge.attr) } diff --git a/R/games.R b/R/games.R index 0d848daabca..ad4b5c39b35 100644 --- a/R/games.R +++ b/R/games.R @@ -942,7 +942,7 @@ sample_pa <- function( out.seq <- numeric() } - algorithm <- igraph.match.arg(algorithm) + algorithm <- igraph_match_arg(algorithm) algorithm1 <- switch( algorithm, "psumtree" = 1, @@ -1022,13 +1022,11 @@ sample_gnp <- function(n, p, directed = FALSE, loops = FALSE) { type <- "gnp" type1 <- switch(type, "gnp" = 0, "gnm" = 1) - on.exit(.Call(R_igraph_finalizer)) - res <- .Call( - R_igraph_erdos_renyi_game_gnp, - as.numeric(n), - as.numeric(p), - as.logical(directed), - as.logical(loops) + res <- erdos_renyi_game_gnp_impl( + n = n, + p = p, + directed = directed, + loops = loops ) if (igraph_opt("add.params")) { @@ -1142,7 +1140,7 @@ erdos.renyi.game <- function( directed = FALSE, loops = FALSE ) { - type <- igraph.match.arg(type) + type <- igraph_match_arg(type) if (type == "gnp") { lifecycle::deprecate_soft("0.8.0", "erdos.renyi.game()", "sample_gnp()") @@ -1162,7 +1160,7 @@ random.graph.game <- function( directed = FALSE, loops = FALSE ) { - type <- igraph.match.arg(type) + type <- igraph_match_arg(type) if (type == "gnp") { lifecycle::deprecate_soft("0.8.0", "random.graph.game()", "sample_gnp()") @@ -1360,7 +1358,7 @@ sample_degseq <- function( if (missing(method)) { method <- method[1] } - method <- igraph.match.arg( + method <- igraph_match_arg( method, values = c( "configuration", @@ -1469,7 +1467,6 @@ sample_growing <- function(n, m = 1, ..., directed = TRUE, citation = FALSE) { growing_random_game_impl( n = n, m = m, - ..., directed = directed, citation = citation ) @@ -2041,7 +2038,7 @@ asym_pref <- function(...) constructor_spec(sample_asym_pref, ...) #' @family functions for manipulating graph structure connect <- function(graph, order, mode = c("all", "out", "in", "total")) { ensure_igraph(graph) - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode <- switch(mode, "out" = 1, "in" = 2, "all" = 3, "total" = 3) on.exit(.Call(R_igraph_finalizer)) @@ -2313,8 +2310,8 @@ sample_bipartite <- function( directed = FALSE, mode = c("out", "in", "all") ) { - type <- igraph.match.arg(type) - mode <- igraph.match.arg(mode) + type <- igraph_match_arg(type) + mode <- igraph_match_arg(mode) if (type == "gnp") { lifecycle::deprecate_soft( @@ -2420,7 +2417,7 @@ sample_bipartite_gnm <- function( mode = c("out", "in", "all") ) { check_dots_empty() - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) m <- as.numeric(m) res <- bipartite_game_gnm_impl( @@ -2449,7 +2446,7 @@ sample_bipartite_gnp <- function( mode = c("out", "in", "all") ) { check_dots_empty() - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) p <- as.numeric(p) res <- bipartite_game_gnp_impl( @@ -2576,7 +2573,13 @@ sample_hierarchical_sbm <- function(n, m, rho, C, p) { commonlen <- unique(c(mlen, rholen, Clen)) if (length(commonlen) == 1 && commonlen == 1) { - hsbm_game_impl(n, m, rho, C, p) + hsbm_game_impl( + n = n, + m = m, + rho = rho, + C = C, + p = p + ) } else { commonlen <- setdiff(commonlen, 1) if (length(commonlen) != 1) { @@ -2593,7 +2596,13 @@ sample_hierarchical_sbm <- function(n, m, rho, C, p) { } else { rep(list(C), length.out = commonlen) } - hsbm_list_game_impl(n, m, rho, C, p) + hsbm_list_game_impl( + n = n, + mlist = m, + rholist = rho, + Clist = C, + p = p + ) } } @@ -2900,7 +2909,6 @@ sample_chung_lu <- function( chung_lu_game_impl( out.weights = out.weights, in.weights = in.weights, - ..., loops = loops, variant = variant ) diff --git a/R/glet.R b/R/glet.R index 77b6087a04f..f010c9b4ece 100644 --- a/R/glet.R +++ b/R/glet.R @@ -149,7 +149,7 @@ graphlet_basis <- function(graph, weights = NULL) { on.exit(.Call(R_igraph_finalizer)) ## Function call - res <- .Call(R_igraph_graphlets_candidate_basis, graph, weights) + res <- .Call(Rx_igraph_graphlets_candidate_basis, graph, weights) res } @@ -178,7 +178,7 @@ graphlet_proj <- function( on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_graphlets_project, graph, weights, cliques, Mu, niter) + res <- .Call(Rx_igraph_graphlets_project, graph, weights, cliques, Mu, niter) res } diff --git a/R/hrg.R b/R/hrg.R index 7532b814e1b..b9bbe940e23 100644 --- a/R/hrg.R +++ b/R/hrg.R @@ -251,9 +251,13 @@ fit_hrg <- function(graph, hrg = NULL, start = FALSE, steps = 0) { start <- as.logical(start) steps <- as.numeric(steps) - on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_hrg_fit, graph, hrg, start, steps) + res <- hrg_fit_impl( + graph = graph, + hrg = hrg, + start = start, + steps = steps + ) if (igraph_opt("add.vertex.names") && is_named(graph)) { res$names <- V(graph)$name @@ -357,7 +361,9 @@ hrg_tree <- function(hrg) { ) } - out <- from_hrg_dendrogram_impl(hrg) + out <- from_hrg_dendrogram_impl( + hrg = hrg + ) g <- out$graph set_vertex_attr(g, "probability", value = out$prob) @@ -382,7 +388,9 @@ sample_hrg <- function(hrg) { ) } - hrg_game_impl(hrg) + hrg_game_impl( + hrg = hrg + ) } #' Predict edges based on a hierarchical random graph model #' @@ -903,7 +911,7 @@ print.igraphHRG <- function( level = 3, ... ) { - type <- igraph.match.arg(type) + type <- igraph_match_arg(type) if (type == "auto") { is_graph_small <- (length(x$left) <= 100) type <- if (is_graph_small) "tree" else "plain" diff --git a/R/incidence.R b/R/incidence.R index 3ac1f48ec3d..3937ad025af 100644 --- a/R/incidence.R +++ b/R/incidence.R @@ -80,11 +80,12 @@ graph_incidence_build <- function( # Handle dense unweighted matrices first if (!inherits(incidence, "Matrix") && is.null(weighted)) { - mode(incidence) <- "double" - on.exit(.Call(R_igraph_finalizer)) - - mode_num <- switch(mode, "out" = 1, "in" = 2, "all" = 3, "total" = 3) - res <- .Call(R_igraph_biadjacency, incidence, directed, mode_num, multiple) + res <- biadjacency_impl( + incidence = incidence, + directed = directed, + mode = mode, + multiple = multiple + ) return(set_vertex_attr(res$graph, "type", value = res$types)) } @@ -194,7 +195,7 @@ graph_from_biadjacency_matrix <- function( # Argument checks ensure_no_na(incidence, "biadjacency matrix") directed <- as.logical(directed) - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) multiple <- as.logical(multiple) diff --git a/R/interface.R b/R/interface.R index 44e0efc67c0..3831da207a4 100644 --- a/R/interface.R +++ b/R/interface.R @@ -218,7 +218,7 @@ add_vertices <- function(graph, nv, ..., attr = list()) { vertices.orig <- vcount(graph) on.exit(.Call(R_igraph_finalizer)) - graph <- .Call(R_igraph_add_vertices, graph, as.numeric(nv)) + graph <- .Call(Rx_igraph_add_vertices, graph, as.numeric(nv)) vertices.new <- vcount(graph) if (vertices.new - vertices.orig != 0) { @@ -265,7 +265,7 @@ delete_edges <- function(graph, edges) { ensure_igraph(graph) on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_delete_edges, graph, as_igraph_es(graph, edges) - 1) + .Call(Rx_igraph_delete_edges, graph, as_igraph_es(graph, edges) - 1) } #' Delete vertices from a graph @@ -291,7 +291,7 @@ delete_vertices <- function(graph, v) { ensure_igraph(graph) on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_delete_vertices, graph, as_igraph_vs(graph, v) - 1) + .Call(Rx_igraph_delete_vertices, graph, as_igraph_vs(graph, v) - 1) } ################################################################### @@ -321,7 +321,7 @@ gsize <- function(graph) { ensure_igraph(graph) on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_ecount, graph) + .Call(Rx_igraph_ecount, graph) } #' @rdname gsize #' @export @@ -349,14 +349,18 @@ ecount <- gsize #' intersection(n1, n34) neighbors <- function(graph, v, mode = c("out", "in", "all", "total")) { ensure_igraph(graph) - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) v <- as_igraph_vs(graph, v) if (length(v) == 0) { stop("No vertex was specified") } - neighbors_impl(graph, vid = v, mode = mode) + neighbors_impl( + graph = graph, + vid = v, + mode = mode + ) } #' Incident edges of a vertex in a graph @@ -379,7 +383,7 @@ neighbors <- function(graph, v, mode = c("out", "in", "all", "total")) { incident <- function(graph, v, mode = c("all", "out", "in", "total")) { ensure_igraph(graph) if (is_directed(graph)) { - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode <- switch(mode, "out" = 1, "in" = 2, "all" = 3, "total" = 3) } else { mode <- 1 @@ -389,7 +393,7 @@ incident <- function(graph, v, mode = c("all", "out", "in", "total")) { stop("No vertex was specified") } on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_incident, graph, v - 1, as.numeric(mode)) + 1L + res <- .Call(Rx_igraph_incident, graph, v - 1, as.numeric(mode)) + 1L if (igraph_opt("return.vs.es")) { res <- create_es(graph, res) @@ -416,7 +420,7 @@ is_directed <- function(graph) { ensure_igraph(graph) on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_is_directed, graph) + .Call(Rx_igraph_is_directed, graph) } #' Incident vertices of some graph edges @@ -444,9 +448,9 @@ ends <- function(graph, es, names = TRUE) { on.exit(.Call(R_igraph_finalizer)) if (length(es) == 1) { - res[, !is.na(es)] <- .Call(R_igraph_get_edge, graph, es2) + 1 + res[, !is.na(es)] <- .Call(Rx_igraph_get_edge, graph, es2) + 1 } else { - res[, !is.na(es)] <- .Call(R_igraph_edges, graph, es2) + 1 + res[, !is.na(es)] <- .Call(Rx_igraph_edges, graph, es2) + 1 } if (names && is_named(graph)) { @@ -613,7 +617,9 @@ get.edge.ids <- function( #' vcount(g) #' @cdocs igraph_vcount vcount <- function(graph) { - as.numeric(vcount_impl(graph)) + as.numeric(vcount_impl( + graph = graph + )) } #' @export @@ -645,7 +651,7 @@ adjacent_vertices <- function(graph, v, mode = c("out", "in", "all", "total")) { on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_adjacent_vertices, graph, vv, mode) + res <- .Call(Rx_igraph_adjacent_vertices, graph, vv, mode) res <- lapply(res, `+`, 1) if (igraph_opt("return.vs.es")) { @@ -684,7 +690,7 @@ incident_edges <- function(graph, v, mode = c("out", "in", "all", "total")) { on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_incident_edges, graph, vv, mode) + res <- .Call(Rx_igraph_incident_edges, graph, vv, mode) res <- lapply(res, `+`, 1) if (igraph_opt("return.vs.es")) { @@ -697,3 +703,37 @@ incident_edges <- function(graph, v, mode = c("out", "in", "all", "total")) { res } + +#' Invalidate the cache of a graph +#' +#' igraph graphs cache some basic properties (such as whether the graph is a +#' DAG or whether it is simple) in an internal data structure for faster +#' repeated queries. This function invalidates the cache, forcing a +#' recalculation of the cached properties the next time they are needed. +#' +#' You should not need to call this function during normal usage; however, it +#' may be useful for debugging cache-related issues. A tell-tale sign of an +#' invalid cache entry is when the result of a cached function (such as +#' \code{\link{is_dag}()} or \code{\link{is_simple}()}) changes after calling +#' this function. +#' +#' @param graph The graph whose cache is to be invalidated. +#' @return The graph with its cache invalidated. Since the graph is modified +#' in place in R as well, you can also ignore the return value. +#' +#' @family low-level operations +#' +#' @export +#' @examples +#' g <- make_ring(10) +#' # Cache is populated when calling is_simple() +#' is_simple(g) +#' # Invalidate cache (for debugging purposes) +#' invalidate_cache(g) +#' # Result should be the same +#' is_simple(g) +invalidate_cache <- function(graph) { + invalidate_cache_impl( + graph = graph + ) +} diff --git a/R/iterators.R b/R/iterators.R index 31e87dbe307..c1199014b6e 100644 --- a/R/iterators.R +++ b/R/iterators.R @@ -30,7 +30,7 @@ update_es_ref <- update_vs_ref <- function(graph) { get_es_ref <- get_vs_ref <- function(graph) { if (is_igraph(graph) && !warn_version(graph)) { - .Call(R_igraph_copy_env, graph) + .Call(Rx_igraph_copy_env, graph) } else { NULL } @@ -84,7 +84,7 @@ get_es_graph_id <- get_vs_graph_id <- function(seq) { #' @export identical_graphs <- function(g1, g2, attrs = TRUE) { stopifnot(is_igraph(g1), is_igraph(g2)) - .Call(R_igraph_identical_graphs, g1, g2, as.logical(attrs)) + .Call(Rx_igraph_identical_graphs, g1, g2, as.logical(attrs)) } add_vses_graph_ref <- function(vses, graph) { @@ -583,7 +583,7 @@ simple_vs_index <- function(x, i, na_ok = FALSE) { .nei <- function(v, mode = c("all", "in", "out", "total")) { ## TRUE iff the vertex is a neighbor (any type) ## of at least one vertex in v - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode <- switch(mode, "out" = 1, "in" = 2, "all" = 3, "total" = 3) if (is.logical(v)) { @@ -1061,8 +1061,8 @@ simple_es_index <- function(x, i, na_ok = FALSE) { parent = top, c( attrs, - .igraph.from = list(.Call(R_igraph_copy_from, graph)[as.numeric(x)]), - .igraph.to = list(.Call(R_igraph_copy_to, graph)[as.numeric(x)]), + .igraph.from = list(.Call(Rx_igraph_copy_from, graph)[as.numeric(x)]), + .igraph.to = list(.Call(Rx_igraph_copy_to, graph)[as.numeric(x)]), .igraph.graph = list(graph), .env = env, .data = list(attrs) diff --git a/R/layout.R b/R/layout.R index 53aa268cee4..af06249748c 100644 --- a/R/layout.R +++ b/R/layout.R @@ -608,7 +608,13 @@ layout_as_bipartite <- function( ## Argument checks ensure_igraph(graph) # Use the _impl function - layout_bipartite_impl(graph, types, hgap, vgap, maxiter) + layout_bipartite_impl( + graph = graph, + types = types, + hgap = hgap, + vgap = vgap, + maxiter = maxiter + ) } @@ -658,7 +664,11 @@ layout_as_star <- function(graph, center = V(graph)[1], order = NULL) { return(layout_in_circle(graph)) } # Use the _impl function - layout_star_impl(graph, center, order) + layout_star_impl( + graph = graph, + center = center, + order = order + ) } @@ -739,7 +749,7 @@ layout_as_tree <- function( circular <- as.logical(circular) rootlevel <- as.double(rootlevel) mode <- switch( - igraph.match.arg(mode), + igraph_match_arg(mode), "out" = 1, "in" = 2, "all" = 3, @@ -823,7 +833,10 @@ layout.reingold.tilford <- function(..., params = list()) { #' plot(karate, layout = coords) layout_in_circle <- function(graph, order = V(graph)) { # Use the _impl function - layout_circle_impl(graph, order) + layout_circle_impl( + graph = graph, + order = order + ) } #' @rdname layout_in_circle @@ -1013,9 +1026,16 @@ layout_on_grid <- function(graph, width = 0, height = 0, dim = 2) { # Function call if (dim == 2) { - layout_grid_impl(graph, width) + layout_grid_impl( + graph = graph, + width = width + ) } else { - layout_grid_3d_impl(graph, width, height) + layout_grid_3d_impl( + graph = graph, + width = width, + height = height + ) } } @@ -1061,7 +1081,9 @@ layout.grid.3d <- function(graph, width = 0, height = 0) { #' @family graph layouts layout_on_sphere <- function(graph) { # Use the _impl function - layout_sphere_impl(graph) + layout_sphere_impl( + graph = graph + ) } @@ -1107,12 +1129,16 @@ layout.sphere <- function(..., params = list()) { layout_randomly <- function(graph, dim = c(2, 3)) { ensure_igraph(graph) - dim <- igraph.match.arg(dim) + dim <- igraph_match_arg(dim) if (dim == 2) { - layout_random_impl(graph) + layout_random_impl( + graph = graph + ) } else if (dim == 3) { - layout_random_3d_impl(graph) + layout_random_3d_impl( + graph = graph + ) } } @@ -1408,7 +1434,7 @@ layout_with_fr <- function( # Argument checks ensure_igraph(graph) coords[] <- as.numeric(coords) - dim <- igraph.match.arg(dim) + dim <- igraph_match_arg(dim) if (!missing(niter) && !missing(maxiter)) { cli::cli_abort(c( "{.arg niter} and {.arg maxiter} must not be specified at the same time.", @@ -1421,7 +1447,7 @@ layout_with_fr <- function( niter <- as.numeric(niter) start.temp <- as.numeric(start.temp) - grid <- igraph.match.arg(grid) + grid <- igraph_match_arg(grid) grid <- switch(grid, "grid" = 0L, "nogrid" = 1L, "auto" = 2L) if (is.null(weights) && "weight" %in% edge_attr_names(graph)) { @@ -1785,7 +1811,7 @@ layout_with_kk <- function( ensure_igraph(graph) coords[] <- as.numeric(coords) - dim <- igraph.match.arg(dim) + dim <- igraph_match_arg(dim) maxiter <- as.numeric(maxiter) epsilon <- as.numeric(epsilon) @@ -2043,7 +2069,11 @@ layout_with_mds <- function( dim <- as.numeric(dim) # Function call - layout_mds_impl(graph, dist, dim) + layout_mds_impl( + graph = graph, + dist = dist, + dim = dim + ) } @@ -2290,7 +2320,7 @@ layout_with_sugiyama <- function( } else { weights <- NULL } - attributes <- igraph.match.arg(attributes) + attributes <- igraph_match_arg(attributes) on.exit(.Call(R_igraph_finalizer)) # Function call @@ -2793,7 +2823,7 @@ layout_with_drl <- function( ) { ensure_igraph(graph) - dim <- igraph.match.arg(dim) + dim <- igraph_match_arg(dim) use.seed <- as.logical(use.seed) seed <- as.matrix(seed) diff --git a/R/make.R b/R/make.R index 33477cc3772..a5def584cbd 100644 --- a/R/make.R +++ b/R/make.R @@ -267,8 +267,9 @@ line.graph <- function(graph) { lifecycle::deprecate_soft("2.1.0", "line.graph()", "make_line_graph()") ensure_igraph(graph) - on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_linegraph, graph) + res <- linegraph_impl( + graph = graph + ) if (igraph_opt("add.params")) { res$name <- "Line graph" } @@ -317,7 +318,7 @@ graph.ring <- function(n, directed = FALSE, mutual = FALSE, circular = TRUE) { graph.tree <- function(n, children = 2, mode = c("out", "in", "undirected")) { # nocov start lifecycle::deprecate_soft("2.1.0", "graph.tree()", "make_tree()") - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode1 <- switch(mode, "out" = 0, "in" = 1, "undirected" = 2) on.exit(.Call(R_igraph_finalizer)) @@ -352,7 +353,7 @@ graph.star <- function( ) { # nocov start lifecycle::deprecate_soft("2.1.0", "graph.star()", "make_star()") - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode1 <- switch(mode, "out" = 0, "in" = 1, "undirected" = 2, "mutual" = 3) on.exit(.Call(R_igraph_finalizer)) @@ -384,7 +385,11 @@ graph.lcf <- function(n, shifts, repeats = 1) { # nocov start lifecycle::deprecate_soft("2.1.0", "graph.lcf()", "graph_from_lcf()") # Use the _impl function - lcf_vector_impl(n = n, shifts = shifts, repeats = repeats) + lcf_vector_impl( + n = n, + shifts = shifts, + repeats = repeats + ) } # nocov end #' Create a lattice graph @@ -438,7 +443,14 @@ graph.lattice <- function( } on.exit(.Call(R_igraph_finalizer)) - res <- square_lattice_impl(dimvector, nei, directed, mutual, periodic) + res <- square_lattice_impl( + dimvector = dimvector, + nei = nei, + directed = directed, + mutual = mutual, + periodic = periodic + ) + if (igraph_opt("add.params")) { res$name <- "Lattice graph" res$dimvector <- dimvector @@ -462,8 +474,10 @@ graph.lattice <- function( graph.kautz <- function(m, n) { # nocov start lifecycle::deprecate_soft("2.1.0", "graph.kautz()", "make_kautz_graph()") - on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_kautz, as.numeric(m), as.numeric(n)) + res <- kautz_impl( + m = m, + n = n + ) if (igraph_opt("add.params")) { res$name <- sprintf("Kautz graph %i-%i", m, n) res$m <- m @@ -489,13 +503,11 @@ graph.full.citation <- function(n, directed = TRUE) { "graph.full.citation()", "make_full_citation_graph()" ) - # Argument checks - n <- as.numeric(n) - directed <- as.logical(directed) - - on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_full_citation, n, directed) + res <- full_citation_impl( + n = n, + directed = directed + ) res <- set_graph_attr(res, "name", "Full citation graph") res @@ -527,15 +539,19 @@ graph.full.bipartite <- function( n2 <- as.numeric(n2) directed <- as.logical(directed) mode1 <- switch( - igraph.match.arg(mode), + igraph_match_arg(mode), "out" = 1, "in" = 2, "all" = 3, "total" = 3 ) - on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_full_bipartite, n1, n2, as.logical(directed), mode1) + res <- full_bipartite_impl( + n1 = n1, + n2 = n2, + directed = directed, + mode = mode + ) if (igraph_opt("add.params")) { res$graph$name <- "Full bipartite graph" res$n1 <- n1 @@ -633,13 +649,11 @@ graph.extended.chordal.ring <- function(n, w, directed = FALSE) { graph.empty <- function(n = 0, directed = TRUE) { # nocov start lifecycle::deprecate_soft("2.1.0", "graph.empty()", "make_empty_graph()") - # Argument checks - n <- as.numeric(n) - directed <- as.logical(directed) - - on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_empty, n, directed) + res <- empty_impl( + n = n, + directed = directed + ) res } # nocov end @@ -661,8 +675,10 @@ graph.de.bruijn <- function(m, n) { "graph.de.bruijn()", "make_de_bruijn_graph()" ) - on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_de_bruijn, as.numeric(m), as.numeric(n)) + res <- de_bruijn_impl( + m = m, + n = n + ) if (igraph_opt("add.params")) { res$name <- sprintf("De-Bruijn graph %i-%i", m, n) res$m <- m @@ -732,8 +748,9 @@ graph.bipartite <- function(types, edges, directed = FALSE) { graph.atlas <- function(n) { # nocov start lifecycle::deprecate_soft("2.1.0", "graph.atlas()", "graph_from_atlas()") - on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_atlas, as.numeric(n)) + res <- atlas_impl( + number = n + ) if (igraph_opt("add.params")) { res$name <- sprintf("Graph from the Atlas #%i", n) res$n <- n @@ -1536,7 +1553,7 @@ make_famous_graph <- function(name) { name <- gsub("\\s", "_", name) on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_famous, name) + res <- .Call(Rx_igraph_famous, name) if (igraph_opt("add.params")) { res$name <- capitalize(name) } @@ -1595,7 +1612,10 @@ make_empty_graph <- function(n = 0, directed = TRUE) { "{.arg directed} must be a logical, not {.obj_type_friendly {directed}}." ) } - empty_impl(n, directed) + empty_impl( + n = n, + directed = directed + ) } #' @rdname make_empty_graph @@ -1859,7 +1879,7 @@ make_star <- function( mode = c("in", "out", "mutual", "undirected"), center = 1 ) { - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode1 <- switch(mode, "out" = 0, "in" = 1, "undirected" = 2, "mutual" = 3) on.exit(.Call(R_igraph_finalizer)) @@ -1983,7 +2003,14 @@ make_lattice <- function( } on.exit(.Call(R_igraph_finalizer)) - res <- square_lattice_impl(dimvector, nei, directed, mutual, periodic) + res <- square_lattice_impl( + dimvector = dimvector, + nei = nei, + directed = directed, + mutual = mutual, + periodic = periodic + ) + if (igraph_opt("add.params")) { res$name <- "Lattice graph" res$dimvector <- dimvector @@ -2003,6 +2030,8 @@ lattice <- function(...) constructor_spec(make_lattice, ...) #' Create a triangular lattice graph #' +#' `r lifecycle::badge("experimental")` +#' #' `make_tri_lattice()` creates a triangular lattice with a specified shape. #' The shape can be triangular (1 dimension), quasi-rectangular (2 dimensions), #' or hexagonal (3 dimensions). @@ -2017,6 +2046,7 @@ lattice <- function(...) constructor_spec(make_lattice, ...) #' where the sides of the hexagon contain `dims[1]`, `dims[2]`, and `dims[3]` #' vertices. #' All dimensions must be non-negative. +#' @param ... These dots are for future extensions and must be empty. #' @param directed Logical scalar, whether to create a directed graph. #' If the `mutual` argument is not set to `TRUE`, edges will be directed #' from lower-index vertices towards higher-index ones. @@ -2042,9 +2072,15 @@ lattice <- function(...) constructor_spec(make_lattice, ...) #' # Directed triangular lattice with mutual edges #' g4 <- make_tri_lattice(c(3, 3), directed = TRUE, mutual = TRUE) #' @cdocs igraph_triangular_lattice -make_tri_lattice <- function(dims, directed = FALSE, mutual = FALSE) { +make_tri_lattice <- function(dims, ..., directed = FALSE, mutual = FALSE) { + check_dots_empty() + on.exit(.Call(R_igraph_finalizer)) - res <- triangular_lattice_impl(dims, directed, mutual) + res <- triangular_lattice_impl( + dimvector = dims, + directed = directed, + mutual = mutual + ) if (igraph_opt("add.params")) { res$name <- "Triangular lattice" res$dims <- dims @@ -2055,7 +2091,6 @@ make_tri_lattice <- function(dims, directed = FALSE, mutual = FALSE) { } #' @rdname make_tri_lattice -#' @param ... Passed to `make_tri_lattice()`. #' @export tri_lattice <- function(...) constructor_spec(make_tri_lattice, ...) @@ -2126,7 +2161,7 @@ ring <- function(...) constructor_spec(make_ring, ...) #' make_tree(10, 2) #' make_tree(10, 3, mode = "undirected") make_tree <- function(n, children = 2, mode = c("out", "in", "undirected")) { - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode1 <- switch(mode, "out" = 0, "in" = 1, "undirected" = 2) on.exit(.Call(R_igraph_finalizer)) @@ -2253,8 +2288,9 @@ from_prufer <- function(...) constructor_spec(make_from_prufer, ...) #' graph_from_atlas(sample(0:1252, 1)) #' graph_from_atlas(sample(0:1252, 1)) graph_from_atlas <- function(n) { - on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_atlas, as.numeric(n)) + res <- atlas_impl( + number = n + ) if (igraph_opt("add.params")) { res$name <- sprintf("Graph from the Atlas #%i", n) res$n <- n @@ -2318,6 +2354,41 @@ chordal_ring <- function(...) constructor_spec(make_chordal_ring, ...) ## ----------------------------------------------------------------- +#' Create a circulant graph +#' +#' A circulant graph \eqn{C_n^{\textrm{shifts}}} consists of \eqn{n} vertices +#' \eqn{v_0, \ldots, v_{n-1}} such that for each \eqn{s_i} in the list of offsets +#' `shifts`, \eqn{v_j} is connected to \eqn{v_{(j + s_i) \mod n}} for all \eqn{j}. +#' +#' The function can generate either directed or undirected graphs. +#' It does not generate multi-edges or self-loops. +#' +#' @param n Integer, the number of vertices in the circulant graph. +#' @param shifts Integer vector, a list of the offsets within the circulant graph. +#' @param directed Boolean, whether to create a directed graph. +#' @return An igraph graph. +#' +#' @family deterministic constructors +#' @export +#' @examples +#' # Create a circulant graph with 10 vertices and shifts 1 and 3 +#' g <- make_circulant(10, c(1, 3)) +#' plot(g, layout = layout_in_circle) +#' +#' # A directed circulant graph +#' g2 <- make_circulant(10, c(1, 3), directed = TRUE) +#' plot(g2, layout = layout_in_circle) +make_circulant <- function(n, shifts, directed = FALSE) { + circulant_impl(n = n, shifts = shifts, directed = directed) +} + +#' @rdname make_circulant +#' @param ... Passed to `make_circulant()`. +#' @export +circulant <- function(...) constructor_spec(make_circulant, ...) + +## ----------------------------------------------------------------- + #' Line graph of a graph #' #' This function calculates the line graph of another graph. @@ -2350,8 +2421,9 @@ chordal_ring <- function(...) constructor_spec(make_chordal_ring, ...) make_line_graph <- function(graph) { ensure_igraph(graph) - on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_linegraph, graph) + res <- linegraph_impl( + graph = graph + ) if (igraph_opt("add.params")) { res$name <- "Line graph" } @@ -2397,8 +2469,10 @@ line_graph <- function(...) constructor_spec(make_line_graph, ...) #' make_de_bruijn_graph(2, 2) #' make_line_graph(g) make_de_bruijn_graph <- function(m, n) { - on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_de_bruijn, as.numeric(m), as.numeric(n)) + res <- de_bruijn_impl( + m = m, + n = n + ) if (igraph_opt("add.params")) { res$name <- sprintf("De-Bruijn graph %i-%i", m, n) res$m <- m @@ -2442,8 +2516,10 @@ de_bruijn_graph <- function(...) constructor_spec(make_de_bruijn_graph, ...) #' make_kautz_graph(2, 2) #' make_kautz_graph <- function(m, n) { - on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_kautz, as.numeric(m), as.numeric(n)) + res <- kautz_impl( + m = m, + n = n + ) if (igraph_opt("add.params")) { res$name <- sprintf("Kautz graph %i-%i", m, n) res$m <- m @@ -2498,15 +2574,19 @@ make_full_bipartite_graph <- function( n2 <- as.numeric(n2) directed <- as.logical(directed) mode1 <- switch( - igraph.match.arg(mode), + igraph_match_arg(mode), "out" = 1, "in" = 2, "all" = 3, "total" = 3 ) - on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_full_bipartite, n1, n2, as.logical(directed), mode1) + res <- full_bipartite_impl( + n1 = n1, + n2 = n2, + directed = directed, + mode = mode + ) if (igraph_opt("add.params")) { res$graph$name <- "Full bipartite graph" res$n1 <- n1 @@ -2605,6 +2685,117 @@ bipartite_graph <- function(...) constructor_spec(make_bipartite_graph, ...) ## ----------------------------------------------------------------- +#' Create a full multipartite graph +#' +#' A multipartite graph contains multiple types of vertices and connections +#' are only possible between vertices of different types. This function +#' creates a complete multipartite graph where all possible edges between +#' different partitions are present. +#' +#' @param n A numeric vector giving the number of vertices in each partition. +#' @param directed Logical scalar, whether to create a directed graph. +#' @param mode Character scalar, the type of connections for directed graphs. +#' If `"out"`, then edges point from vertices of partitions with lower +#' indices to partitions with higher indices; if `"in"`, then the opposite +#' direction is realized; `"all"` creates mutual edges. This parameter is +#' ignored for undirected graphs. +#' @return An igraph graph with a vertex attribute `type` storing the +#' partition index of each vertex. Partition indices start from 1. +#' +#' @family deterministic constructors +#' @export +#' @examples +#' # Create a multipartite graph with partitions of size 2, 3, and 4 +#' g <- make_full_multipartite(c(2, 3, 4)) +#' plot(g) +#' +#' # Create a directed multipartite graph +#' g2 <- make_full_multipartite(c(2, 2, 2), directed = TRUE, mode = "out") +#' plot(g2) +#' @cdocs igraph_full_multipartite +make_full_multipartite <- function( + n, + directed = FALSE, + mode = c("all", "out", "in") +) { + n <- as.numeric(n) + directed <- as.logical(directed) + mode <- igraph_match_arg(mode) + + res <- full_multipartite_impl(n = n, directed = directed, mode = mode) + graph <- set_vertex_attr(res$graph, "type", value = res$types) + + # Transfer graph attributes from res to graph if add.params is enabled + if (igraph_opt("add.params")) { + for (attr_name in setdiff(names(res), c("graph", "types"))) { + graph <- set_graph_attr(graph, attr_name, res[[attr_name]]) + } + } + graph +} + +#' @rdname make_full_multipartite +#' @param ... Passed to `make_full_multipartite()`. +#' @export +full_multipartite <- function(...) { + constructor_spec(make_full_multipartite, ...) +} + +## ----------------------------------------------------------------- + +#' Create a Turán graph +#' +#' Turán graphs are complete multipartite graphs with the property that the +#' sizes of the partitions are as close to equal as possible. +#' +#' @details +#' The Turán graph with `n` vertices and `r` partitions is the densest +#' graph on `n` vertices that does not contain a clique of size `r+1`. +#' +#' This function generates undirected graphs. The null graph is +#' returned when the number of vertices is zero. A complete graph is +#' returned if the number of partitions is greater than the number of vertices. +#' +#' @param n Integer, the number of vertices in the graph. +#' @param r Integer, the number of partitions in the graph, must be positive. +#' @return An igraph graph with a vertex attribute `type` storing the +#' partition index of each vertex. Partition indices start from 1. +#' +#' @family deterministic constructors +#' @export +#' @examples +#' # Create a Turán graph with 10 vertices and 3 partitions +#' g <- make_turan(10, 3) +#' plot(g) +#' +#' # The sizes of the partitions are as balanced as possible +#' table(V(g)$type) +#' @cdocs igraph_turan +make_turan <- function(n, r) { + n <- as.numeric(n) + r <- as.numeric(r) + + res <- turan_impl(n = n, r = r) + graph <- set_vertex_attr(res$graph, "type", value = res$types) + + # Transfer graph attributes from res to graph if add.params is enabled + if (igraph_opt("add.params")) { + for (attr_name in setdiff(names(res), c("graph", "types"))) { + graph <- set_graph_attr(graph, attr_name, res[[attr_name]]) + } + } + graph +} + +#' @rdname make_turan +#' @param ... Passed to `make_turan()`. +#' @export +turan <- function(...) { + constructor_spec(make_turan, ...) +} + +## ----------------------------------------------------------------- + #' Create a complete (full) citation graph #' #' `make_full_citation_graph()` creates a full citation graph. This is a @@ -2620,13 +2811,11 @@ bipartite_graph <- function(...) constructor_spec(make_bipartite_graph, ...) #' @examples #' print_all(make_full_citation_graph(10)) make_full_citation_graph <- function(n, directed = TRUE) { - # Argument checks - n <- as.numeric(n) - directed <- as.logical(directed) - - on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_full_citation, n, directed) + res <- full_citation_impl( + n = n, + directed = directed + ) res <- set_graph_attr(res, "name", "Full citation graph") res @@ -2697,7 +2886,11 @@ graph_from_lcf <- function( ) } - lcf_vector_impl(n = n, shifts = shifts, repeats = repeats) + lcf_vector_impl( + n = n, + shifts = shifts, + repeats = repeats + ) } ## ----------------------------------------------------------------- @@ -2855,14 +3048,15 @@ realize_bipartite_degseq <- function( method = c("smallest", "largest", "index") ) { check_dots_empty() - allowed.edge.types <- igraph.match.arg(allowed.edge.types) - method <- igraph.match.arg(method) + allowed.edge.types <- igraph_match_arg(allowed.edge.types) + method <- igraph_match_arg(method) g <- realize_bipartite_degree_sequence_impl( degrees1 = degrees1, degrees2 = degrees2, allowed.edge.types = allowed.edge.types, method = method ) + V(g)$type <- c(rep(TRUE, length(degrees1)), rep(FALSE, length(degrees2))) g } diff --git a/R/minimum.spanning.tree.R b/R/minimum.spanning.tree.R index 4a47836555d..0ab3b564836 100644 --- a/R/minimum.spanning.tree.R +++ b/R/minimum.spanning.tree.R @@ -92,7 +92,7 @@ mst <- function(graph, weights = NULL, algorithm = NULL, ...) { if (algorithm == "unweighted") { on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_minimum_spanning_tree_unweighted, graph) + .Call(Rx_igraph_minimum_spanning_tree_unweighted, graph) } else if (algorithm == "prim") { if (is.null(weights) && !"weight" %in% edge_attr_names(graph)) { cli::cli_abort("edges weights must be supplied for Prim's algorithm.") @@ -100,7 +100,7 @@ mst <- function(graph, weights = NULL, algorithm = NULL, ...) { weights <- E(graph)$weight } on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_minimum_spanning_tree_prim, graph, as.numeric(weights)) + .Call(Rx_igraph_minimum_spanning_tree_prim, graph, as.numeric(weights)) } else { cli::cli_abort("Invalid {.arg algorithm}.") } diff --git a/R/motifs.R b/R/motifs.R index cca68c34749..49b697dcd04 100644 --- a/R/motifs.R +++ b/R/motifs.R @@ -156,10 +156,11 @@ motifs <- function(graph, size = 3, cut.prob = NULL) { } res <- motifs_randesu_impl( - graph, + graph = graph, size = size, cut.prob = cut.prob ) + res[is.nan(res)] <- NA res } @@ -197,7 +198,7 @@ count_motifs <- function(graph, size = 3, cut.prob = NULL) { } motifs_randesu_no_impl( - graph, + graph = graph, size = size, cut.prob = cut.prob ) @@ -258,11 +259,11 @@ sample_motifs <- function( } motifs_randesu_estimate_impl( - graph, + graph = graph, size = size, cut.prob = cut.prob, sample.size = sample.size, - sample + sample = sample ) } @@ -309,7 +310,9 @@ dyad_census <- function(graph) { warn("`dyad_census()` requires a directed graph.") } - dyad_census_impl(graph) + dyad_census_impl( + graph = graph + ) } @@ -395,5 +398,7 @@ dyad_census <- function(graph) { #' @export #' @cdocs igraph_triad_census triad_census <- function(graph) { - triad_census_impl(graph = graph) + triad_census_impl( + graph = graph + ) } diff --git a/R/operators.R b/R/operators.R index 20cea8fc969..2a58a86ca00 100644 --- a/R/operators.R +++ b/R/operators.R @@ -126,7 +126,7 @@ rename.attr.if.needed <- function( maps2 = NULL, ignore = character() ) { - type <- igraph.match.arg(type) + type <- igraph_match_arg(type) listfun <- switch( type, @@ -229,7 +229,7 @@ disjoint_union <- function(...) { lapply(graphs, ensure_igraph) on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_disjoint_union, graphs) + res <- .Call(Rx_igraph_disjoint_union, graphs) ## Graph attributes graph.attributes(res) <- rename.attr.if.needed("g", graphs) @@ -350,9 +350,9 @@ disjoint_union <- function(...) { on.exit(.Call(R_igraph_finalizer)) if (call == "union") { - res <- .Call(R_igraph_union, newgraphs, edgemaps) + res <- .Call(Rx_igraph_union, newgraphs, edgemaps) } else { - res <- .Call(R_igraph_intersection, newgraphs, edgemaps) + res <- .Call(Rx_igraph_intersection, newgraphs, edgemaps) } maps <- res$edgemaps res <- res$graph @@ -390,9 +390,9 @@ disjoint_union <- function(...) { on.exit(.Call(R_igraph_finalizer)) if (call == "union") { - res <- .Call(R_igraph_union, graphs, edgemaps) + res <- .Call(Rx_igraph_union, graphs, edgemaps) } else { - res <- .Call(R_igraph_intersection, graphs, edgemaps) + res <- .Call(Rx_igraph_intersection, graphs, edgemaps) } maps <- res$edgemaps res <- res$graph @@ -696,11 +696,11 @@ difference.igraph <- function(big, small, byname = "auto", ...) { big <- permute(big, perm) on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_difference, big, small) + res <- .Call(Rx_igraph_difference, big, small) permute(res, match(V(res)$name, bnames)) } else { on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_difference, big, small) + .Call(Rx_igraph_difference, big, small) } } @@ -747,7 +747,7 @@ complementer <- function(graph, loops = FALSE) { ensure_igraph(graph) on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_complementer, graph, as.logical(loops)) + .Call(Rx_igraph_complementer, graph, as.logical(loops)) } @@ -851,7 +851,7 @@ compose <- function(g1, g2, byname = "auto") { length(edge_attr_names(g2)) != 0) on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_compose, g1, g2, edgemaps) + res <- .Call(Rx_igraph_compose, g1, g2, edgemaps) maps <- list(res$edge_map1, res$edge_map2) res <- res$graph @@ -967,7 +967,21 @@ edges <- edge #' g #' plot(g) vertex <- function(...) { - structure(list(...), class = "igraph.vertex") + args <- list(...) + arg_names <- names(args) + + # Check for duplicate named arguments + if (!is.null(arg_names)) { + named_args <- arg_names[arg_names != ""] + if (anyDuplicated(named_args)) { + duplicates <- unique(named_args[duplicated(named_args)]) + cli::cli_abort( + "Duplicate attribute {cli::qty(duplicates)}name{?s} in {.fn vertices}: {.val {duplicates}}." + ) + } + } + + structure(args, class = "igraph.vertex") } #' @export diff --git a/R/other.R b/R/other.R index a28d2cf8c8c..4eff3d52685 100644 --- a/R/other.R +++ b/R/other.R @@ -96,7 +96,7 @@ running_mean <- function(v, binwidth) { } on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_running_mean, v, binwidth) + .Call(Rx_igraph_running_mean, v, binwidth) } @@ -224,5 +224,7 @@ igraph.i.spMatrix <- function(M) { #' @export #' @cdocs igraph_convex_hull convex_hull <- function(data) { - convex_hull_2d_impl(data = data) + convex_hull_2d_impl( + data = data + ) } diff --git a/R/par.R b/R/par.R index 9507dc039b3..ac5d3d1c3f8 100644 --- a/R/par.R +++ b/R/par.R @@ -76,7 +76,7 @@ getIgraphOpt <- function(x, default = NULL) { igraph.pars.set.verbose <- function(verbose) { if (is.logical(verbose)) { - .Call(R_igraph_set_verbose, verbose) + .Call(Rx_igraph_set_verbose, verbose) } else if (is.character(verbose)) { if (!verbose %in% c("tk", "tkconsole")) { cli::cli_abort("Unknown {.arg verbose} value.") @@ -89,7 +89,7 @@ igraph.pars.set.verbose <- function(verbose) { cli::cli_abort("tcltk package not available.") } } - .Call(R_igraph_set_verbose, TRUE) + .Call(Rx_igraph_set_verbose, TRUE) } else { cli::cli_abort("{.arg verbose} should be a logical or character scalar.") } diff --git a/R/paths.R b/R/paths.R index 857bbf8bf04..972bcc136b7 100644 --- a/R/paths.R +++ b/R/paths.R @@ -120,7 +120,7 @@ all_simple_paths <- function( res <- with_igraph_opt( list(return.vs.es = FALSE), get_all_simple_paths_impl( - graph, + graph = graph, from = from, to = to, cutoff = cutoff, @@ -161,7 +161,9 @@ all_simple_paths <- function( #' @export #' @cdocs igraph_is_dag is_dag <- function(graph) { - is_dag_impl(graph = graph) + is_dag_impl( + graph = graph + ) } #' Acyclic graphs @@ -186,7 +188,9 @@ is_dag <- function(graph) { #' @export #' @cdocs igraph_is_acyclic is_acyclic <- function(graph) { - is_acyclic_impl(graph = graph) + is_acyclic_impl( + graph = graph + ) } #' Maximum cardinality search @@ -245,7 +249,9 @@ is_acyclic <- function(graph) { #' @family chordal #' @cdocs igraph_maximum_cardinality_search max_cardinality <- function(graph) { - maximum_cardinality_search_impl(graph = graph) + maximum_cardinality_search_impl( + graph = graph + ) } @@ -300,7 +306,12 @@ eccentricity <- function( } } - eccentricity_dijkstra_impl(graph, vids = vids, weights = weights, mode = mode) + eccentricity_dijkstra_impl( + graph = graph, + vids = vids, + weights = weights, + mode = mode + ) } @@ -354,7 +365,11 @@ radius <- function( } } - radius_dijkstra_impl(graph, weights = weights, mode = mode) + radius_dijkstra_impl( + graph = graph, + weights = weights, + mode = mode + ) } #' Central vertices of a graph @@ -392,7 +407,6 @@ graph_center <- function( ) { graph_center_dijkstra_impl( graph = graph, - ..., weights = weights, mode = mode ) @@ -404,5 +418,8 @@ graph_center <- function( #' @export #' @cdocs igraph_path_length_hist distance_table <- function(graph, directed = TRUE) { - path_length_hist_impl(graph = graph, directed = directed) + path_length_hist_impl( + graph = graph, + directed = directed + ) } diff --git a/R/plot.common.R b/R/plot.common.R index 00b7f456164..4f78cce3d2a 100644 --- a/R/plot.common.R +++ b/R/plot.common.R @@ -548,7 +548,7 @@ i.parse.plot.params <- function(graph, params) { range = NULL, dontcall = FALSE ) { - type <- igraph.match.arg(type) + type <- igraph_match_arg(type) ret <- function() { v <- p[[type]][[name]] if (is.function(v) && !dontcall) { diff --git a/R/plot.shapes.R b/R/plot.shapes.R index 298e2e3391f..b8380cb10fe 100644 --- a/R/plot.shapes.R +++ b/R/plot.shapes.R @@ -351,7 +351,7 @@ shapes <- function(shape = NULL) { #' @rdname shapes #' @export shape_noclip <- function(coords, el, params, end = c("both", "from", "to")) { - end <- igraph.match.arg(end) + end <- igraph_match_arg(end) if (end == "both") { coords diff --git a/R/pp.R b/R/pp.R index d452b97fa12..a412f1d434a 100644 --- a/R/pp.R +++ b/R/pp.R @@ -20,5 +20,5 @@ ################################################################### get.all.simple.paths.pp <- function(vect) { - .Call(R_igraph_get_all_simple_paths_pp, vect) + .Call(Rx_igraph_get_all_simple_paths_pp, vect) } diff --git a/R/print.R b/R/print.R index 25058f30828..243a7d2055d 100644 --- a/R/print.R +++ b/R/print.R @@ -33,7 +33,7 @@ sep = "", gal, " (g/", - .Call(R_igraph_get_attr_mode, object, 2L), + .Call(Rx_igraph_get_attr_mode, object, 2L), ")" ) } @@ -43,7 +43,7 @@ sep = "", val, " (v/", - .Call(R_igraph_get_attr_mode, object, 3L), + .Call(Rx_igraph_get_attr_mode, object, 3L), ")" ) } @@ -53,7 +53,7 @@ sep = "", edge_attr_names(object), " (e/", - .Call(R_igraph_get_attr_mode, object, 4L), + .Call(Rx_igraph_get_attr_mode, object, 4L), ")" ) } diff --git a/R/random_walk.R b/R/random_walk.R index 3df2c6edd8a..bb78e0e5175 100644 --- a/R/random_walk.R +++ b/R/random_walk.R @@ -58,7 +58,15 @@ random_walk <- function( ) { mode <- match.arg(mode) stuck <- match.arg(stuck) - out <- random_walk_impl(graph, start, steps, weights, mode, stuck) + out <- random_walk_impl( + graph = graph, + start = start, + steps = steps, + weights = weights, + mode = mode, + stuck = stuck + ) + # FIXME: Support returning the full structure out$vertices } @@ -76,7 +84,15 @@ random_edge_walk <- function( ) { mode <- match.arg(mode) stuck <- match.arg(stuck) - out <- random_walk_impl(graph, start, steps, weights, mode, stuck) + out <- random_walk_impl( + graph = graph, + start = start, + steps = steps, + weights = weights, + mode = mode, + stuck = stuck + ) + # FIXME: Support returning the full structure out$edges } diff --git a/R/rewire.R b/R/rewire.R index 44354e904b2..755fe8733ff 100644 --- a/R/rewire.R +++ b/R/rewire.R @@ -41,7 +41,7 @@ rewire <- function(graph, with) { if (!is(with, "igraph_rewiring_method")) { cli::cli_abort( - "{.arg with} must be an igraph rewiring method, + "{.arg with} must be an igraph rewiring method, not {.obj_type_friendly {with}}." ) } @@ -89,7 +89,7 @@ rewire_keeping_degseq <- function(graph, loops, niter) { mode <- if (loops) 1 else 0 on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_rewire, graph, as.numeric(niter), as.numeric(mode)) + .Call(Rx_igraph_rewire, graph, as.numeric(niter), as.numeric(mode)) } #' Rewires the endpoints of the edges of a graph to a random vertex @@ -134,7 +134,7 @@ each_edge <- function( mode = c("all", "out", "in", "total") ) { mode <- switch( - igraph.match.arg(mode), + igraph_match_arg(mode), "out" = 1, "in" = 2, "all" = 3, @@ -162,15 +162,11 @@ each_edge <- function( } rewire_each_edge <- function(graph, prob, loops, multiple) { - ensure_igraph(graph) - - on.exit(.Call(R_igraph_finalizer)) - .Call( - R_igraph_rewire_edges, - graph, - as.numeric(prob), - as.logical(loops), - as.logical(multiple) + rewire_edges_impl( + graph = graph, + prob = prob, + loops = loops, + multiple = multiple ) } diff --git a/R/scan.R b/R/scan.R index 0efea006863..a866b25faf9 100644 --- a/R/scan.R +++ b/R/scan.R @@ -163,7 +163,7 @@ local_scan <- function( } ## Check mode argument - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) cmode <- switch(mode, out = 1, `in` = 2, all = 3, total = 3) sumweights <- function(g) sum(E(g)$weight) @@ -404,7 +404,7 @@ scan_stat <- function( ## ell must the a non-negative integer stopifnot(length(ell) == 1, ell >= 0, trunc(ell) == ell) - locality <- igraph.match.arg(locality) + locality <- igraph_match_arg(locality) ## number of time steps and number of vertices maxTime <- length(graphs) diff --git a/R/sgm.R b/R/sgm.R index ad7baa465ab..b18961b055b 100644 --- a/R/sgm.R +++ b/R/sgm.R @@ -24,8 +24,11 @@ solve_LSAP <- function(x, maximum = FALSE) { if (maximum) { x <- max(x) - x } - storage.mode(x) <- "double" - out <- .Call(R_igraph_solve_lsap, x, as.numeric(nc)) + 1L + out <- solve_lsap_impl( + c = x, + n = as.numeric(nc) + ) + + 1L out[seq_len(nr)] } diff --git a/R/similarity.R b/R/similarity.R index b86fd2f9c3e..870d57cbcaf 100644 --- a/R/similarity.R +++ b/R/similarity.R @@ -66,13 +66,27 @@ similarity <- function( "invlogweighted" ) ) { - method <- igraph.match.arg(method) + method <- igraph_match_arg(method) if (method == "jaccard") { - similarity_jaccard_impl(graph, vids, mode, loops) + similarity_jaccard_impl( + graph = graph, + vids = vids, + mode = mode, + loops = loops + ) } else if (method == "dice") { - similarity_dice_impl(graph, vids, mode, loops) + similarity_dice_impl( + graph = graph, + vids = vids, + mode = mode, + loops = loops + ) } else if (method == "invlogweighted") { - similarity_inverse_log_weighted_impl(graph, vids, mode) + similarity_inverse_log_weighted_impl( + graph = graph, + vids = vids, + mode = mode + ) } } diff --git a/R/simple.R b/R/simple.R index 78132bd4dc5..b81116f6283 100644 --- a/R/simple.R +++ b/R/simple.R @@ -118,9 +118,10 @@ simplify_and_colorize <- function(graph) { # Argument checks ensure_igraph(graph) - on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_simplify_and_colorize, graph) + res <- simplify_and_colorize_impl( + graph = graph + ) V(res$res)$color <- res$vertex_color E(res$res)$color <- res$edge_color diff --git a/R/stochastic_matrix.R b/R/stochastic_matrix.R index eb5afe3a6c0..35480f1ce92 100644 --- a/R/stochastic_matrix.R +++ b/R/stochastic_matrix.R @@ -95,12 +95,19 @@ stochastic_matrix <- function( ) } - on.exit(.Call(R_igraph_finalizer)) if (sparse) { - res <- .Call(R_igraph_get_stochastic_sparse, graph, column.wise, NULL) + res <- get_stochastic_sparse_impl( + graph = graph, + column.wise = column.wise, + weights = NULL + ) res <- igraph.i.spMatrix(res) } else { - res <- .Call(R_igraph_get_stochastic, graph, column.wise, NULL) + res <- get_stochastic_impl( + graph = graph, + column.wise = column.wise, + weights = NULL + ) } if (igraph_opt("add.vertex.names") && is_named(graph)) { diff --git a/R/structural-properties.R b/R/structural-properties.R index b99ba9e37f5..82808d2424f 100644 --- a/R/structural-properties.R +++ b/R/structural-properties.R @@ -150,8 +150,8 @@ shortest.paths <- function( ) { # nocov start lifecycle::deprecate_soft("2.0.0", "shortest.paths()", "distances()") - algorithm <- igraph.match.arg(algorithm) - mode <- igraph.match.arg(mode) + algorithm <- igraph_match_arg(algorithm) + mode <- igraph_match_arg(mode) distances( graph = graph, v = v, @@ -852,8 +852,21 @@ farthest_vertices <- function( #' @export #' @rdname distances #' @cdocs igraph_average_path_length_dijkstra -mean_distance <- average_path_length_dijkstra_impl - +mean_distance <- function( + graph, + weights = NULL, + directed = TRUE, + unconnected = TRUE, + details = FALSE +) { + average_path_length_dijkstra_impl( + graph = graph, + weights = weights, + directed = directed, + unconnected = unconnected, + details = details + ) +} #' Degree and degree distribution of the vertices #' @@ -881,6 +894,10 @@ mean_distance <- average_path_length_dijkstra_impl #' For `max_degree()`, the largest degree in the graph. When no vertices are #' selected, or when the input is the null graph, zero is returned as this #' is the smallest possible degree. +#' +#' For `mean_degree()`, the average degree in the graph as a single number. +#' For graphs with no vertices, `NaN` is returned. +#' `r lifecycle::badge("experimental")` #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} #' @keywords graphs #' @family structural.properties @@ -891,6 +908,7 @@ mean_distance <- average_path_length_dijkstra_impl #' degree(g) #' g2 <- sample_gnp(1000, 10 / 1000) #' max_degree(g2) +#' mean_degree(g2) #' degree_distribution(g2) #' degree <- function( @@ -902,14 +920,15 @@ degree <- function( ) { ensure_igraph(graph) v <- as_igraph_vs(graph, v) - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) res <- degree_impl( - graph, + graph = graph, vids = v, mode = mode, loops = loops ) + if (normalized) { res <- res / (vcount(graph) - 1) } @@ -922,7 +941,30 @@ degree <- function( #' @rdname degree #' @export #' @cdocs igraph_maxdegree -max_degree <- maxdegree_impl +max_degree <- function( + graph, + ..., + v = V(graph), + mode = c("all", "out", "in", "total"), + loops = TRUE +) { + maxdegree_impl( + graph = graph, + v = v, + mode = mode, + loops = loops + ) +} + +#' @rdname degree +#' @export +#' @cdocs igraph_mean_degree +mean_degree <- function(graph, loops = TRUE) { + mean_degree_impl( + graph = graph, + loops = loops + ) +} #' @rdname degree #' @param cumulative Logical; whether the cumulative degree distribution is to @@ -1172,9 +1214,9 @@ distances <- function( v <- as_igraph_vs(graph, v) to <- as_igraph_vs(graph, to) - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode <- switch(mode, "out" = 1, "in" = 2, "all" = 3) - algorithm <- igraph.match.arg(algorithm) + algorithm <- igraph_match_arg(algorithm) algorithm <- switch( algorithm, "automatic" = 0, @@ -1255,11 +1297,11 @@ shortest_paths <- function( algorithm = c("automatic", "unweighted", "dijkstra", "bellman-ford") ) { ensure_igraph(graph) - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode <- switch(mode, "out" = 1, "in" = 2, "all" = 3) - output <- igraph.match.arg(output) + output <- igraph_match_arg(output) output <- switch(output, "vpath" = 0, "epath" = 1, "both" = 2) - algorithm <- igraph.match.arg(algorithm) + algorithm <- igraph_match_arg(algorithm) algorithm <- switch( algorithm, "automatic" = 0, @@ -1361,7 +1403,7 @@ all_shortest_paths <- function( ) { ensure_igraph(graph) - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) if (is.null(weights)) { if ("weight" %in% edge_attr_names(graph)) { @@ -1371,14 +1413,14 @@ all_shortest_paths <- function( if (is.null(weights)) { res <- get_all_shortest_paths_impl( - graph, + graph = graph, from = from, to = to, mode = mode ) } else { res <- get_all_shortest_paths_dijkstra_impl( - graph, + graph = graph, from = from, to = to, weights = weights, @@ -1447,7 +1489,6 @@ k_shortest_paths <- function( from = from, to = to, k = k, - ..., weights = weights, mode = mode ) @@ -1482,7 +1523,7 @@ k_shortest_paths <- function( #' subcomponent(g, 1, "all") subcomponent <- function(graph, v, mode = c("all", "out", "in")) { ensure_igraph(graph) - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode <- switch(mode, "out" = 1, "in" = 2, "all" = 3) on.exit(.Call(R_igraph_finalizer)) @@ -1556,16 +1597,14 @@ induced_subgraph <- function( # Argument checks ensure_igraph(graph) vids <- as_igraph_vs(graph, vids) - impl <- switch( - igraph.match.arg(impl), - "auto" = 0L, - "copy_and_delete" = 1L, - "create_from_scratch" = 2L - ) + impl <- igraph_match_arg(impl) - on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_induced_subgraph, graph, vids - 1, impl) + res <- induced_subgraph_impl( + graph = graph, + vids = vids, + impl = impl + ) res } @@ -1576,14 +1615,18 @@ induced_subgraph <- function( #' not have any adjacent edges in `eids`. #' @export subgraph_from_edges <- function(graph, eids, delete.vertices = TRUE) { + # Argument checks # Argument checks ensure_igraph(graph) eids <- as_igraph_es(graph, eids) delete.vertices <- as.logical(delete.vertices) - on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_subgraph_from_edges, graph, eids - 1, delete.vertices) + res <- subgraph_from_edges_impl( + graph = graph, + eids = eids, + delete.vertices = delete.vertices + ) res } @@ -1745,7 +1788,7 @@ transitivity <- function( isolates = c("NaN", "zero") ) { ensure_igraph(graph) - type <- igraph.match.arg(type) + type <- igraph_match_arg(type) type <- switch( type, "undirected" = 0L, @@ -1769,57 +1812,79 @@ transitivity <- function( weights <- NULL } - isolates <- igraph.match.arg(isolates) - isolates <- as.double(switch(isolates, "nan" = 0, "zero" = 1)) + isolates <- igraph_match_arg(isolates) - on.exit(.Call(R_igraph_finalizer)) if (type == 0) { - .Call(R_igraph_transitivity_undirected, graph, isolates) + transitivity_undirected_impl( + graph = graph, + mode = isolates + ) } else if (type == 1) { + isolates_num <- as.double(switch(isolates, "nan" = 0, "zero" = 1)) if (is.null(vids)) { - res <- .Call(R_igraph_transitivity_local_undirected_all, graph, isolates) + res <- .Call( + Rx_igraph_transitivity_local_undirected_all, + graph, + isolates_num + ) if (igraph_opt("add.vertex.names") && is_named(graph)) { names(res) <- V(graph)$name } res } else { - vids <- as_igraph_vs(graph, vids) - res <- .Call( - R_igraph_transitivity_local_undirected, - graph, - vids - 1, - isolates + res <- transitivity_local_undirected_impl( + graph = graph, + vids = vids, + mode = isolates ) if (igraph_opt("add.vertex.names") && is_named(graph)) { - names(res) <- V(graph)$name[vids] + vids_indices <- as_igraph_vs(graph, vids) + names(res) <- V(graph)$name[vids_indices] } res } } else if (type == 2) { - .Call(R_igraph_transitivity_avglocal_undirected, graph, isolates) + transitivity_avglocal_undirected_impl( + graph = graph, + mode = isolates + ) } else if (type == 3) { - if (is.null(vids)) { - vids <- V(graph) - } - vids <- as_igraph_vs(graph, vids) + # Save original vids for naming if needed + vids_for_names <- if (is.null(vids)) V(graph) else vids + res <- if (is.null(weights)) { - .Call( - R_igraph_transitivity_local_undirected, - graph, - vids - 1, - isolates - ) + if (is.null(vids)) { + transitivity_local_undirected_impl( + graph = graph, + mode = isolates + ) + } else { + transitivity_local_undirected_impl( + graph = graph, + vids = vids, + mode = isolates + ) + } } else { - .Call( - R_igraph_transitivity_barrat, - graph, - vids - 1, - weights, - isolates - ) + if (is.null(vids)) { + transitivity_barrat_impl( + graph = graph, + weights = weights, + mode = isolates + ) + } else { + transitivity_barrat_impl( + graph = graph, + vids = vids, + weights = weights, + mode = isolates + ) + } } + if (igraph_opt("add.vertex.names") && is_named(graph)) { - names(res) <- V(graph)$name[vids] + vids_indices <- as_igraph_vs(graph, vids_for_names) + names(res) <- V(graph)$name[vids_indices] } res } @@ -1879,7 +1944,7 @@ constraint <- function(graph, nodes = V(graph), weights = NULL) { } on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_constraint, graph, nodes - 1, as.numeric(weights)) + res <- .Call(Rx_igraph_constraint, graph, nodes - 1, as.numeric(weights)) if (igraph_opt("add.vertex.names") && is_named(graph)) { names(res) <- V(graph)$name[nodes] } @@ -1989,7 +2054,7 @@ ego_size <- function( mindist = 0 ) { ensure_igraph(graph) - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode <- switch(mode, "out" = 1, "in" = 2, "all" = 3) mindist <- as.numeric(mindist) @@ -2103,7 +2168,7 @@ ego <- function( mindist = 0 ) { ensure_igraph(graph) - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode <- switch(mode, "out" = 1, "in" = 2, "all" = 3) mindist <- as.numeric(mindist) @@ -2138,7 +2203,7 @@ make_ego_graph <- function( mindist = 0 ) { ensure_igraph(graph) - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode <- switch(mode, "out" = 1L, "in" = 2L, "all" = 3L) mindist <- as.numeric(mindist) @@ -2195,11 +2260,11 @@ make_neighborhood_graph <- make_ego_graph #' coreness <- function(graph, mode = c("all", "out", "in")) { ensure_igraph(graph) - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode <- switch(mode, "out" = 1, "in" = 2, "all" = 3) on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_coreness, graph, as.numeric(mode)) + res <- .Call(Rx_igraph_coreness, graph, as.numeric(mode)) if (igraph_opt("add.vertex.names") && is_named(graph)) { names(res) <- vertex_attr(graph, "name") } @@ -2238,11 +2303,11 @@ coreness <- function(graph, mode = c("all", "out", "in")) { #' topo_sort <- function(graph, mode = c("out", "all", "in")) { ensure_igraph(graph) - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode <- switch(mode, "out" = 1, "in" = 2, "all" = 3) on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_topological_sorting, graph, as.numeric(mode)) + 1L + res <- .Call(Rx_igraph_topological_sorting, graph, as.numeric(mode)) + 1L if (igraph_opt("return.vs.es")) { res <- create_vs(graph, res) @@ -2390,7 +2455,7 @@ girth <- function(graph, circle = TRUE) { ensure_igraph(graph) on.exit(.Call(R_igraph_finalizer)) - res <- .Call(R_igraph_girth, graph, as.logical(circle)) + res <- .Call(Rx_igraph_girth, graph, as.logical(circle)) if (res$girth == 0) { res$girth <- Inf } @@ -2410,6 +2475,8 @@ girth <- function(graph, circle = TRUE) { #' #' `which_loop()` decides whether the edges of the graph are loop edges. #' +#' `count_loops()` counts the total number of loop edges in the graph. +#' #' `any_multiple()` decides whether the graph has any multiple edges. #' #' `which_multiple()` decides whether the edges of the graph are multiple @@ -2431,6 +2498,7 @@ girth <- function(graph, circle = TRUE) { #' all edges in the graph. #' @return `any_loop()` and `any_multiple()` return a logical scalar. #' `which_loop()` and `which_multiple()` return a logical vector. +#' `count_loops()` returns a numeric scalar with the total number of loop edges. #' `count_multiple()` returns a numeric vector. #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} #' @seealso [simplify()] to eliminate loop and multiple edges. @@ -2443,6 +2511,7 @@ girth <- function(graph, circle = TRUE) { #' g <- make_graph(c(1, 1, 2, 2, 3, 3, 4, 5)) #' any_loop(g) #' which_loop(g) +#' count_loops(g) #' #' # Multiple edges #' g <- sample_pa(10, m = 3, algorithm = "bag") @@ -2504,6 +2573,14 @@ any_loop <- function(graph) { graph = graph ) } +#' @rdname which_multiple +#' @export +#' @cdocs igraph_count_loops +count_loops <- function(graph) { + count_loops_impl( + graph = graph + ) +} #' Breadth-first search @@ -2678,7 +2755,7 @@ bfs <- function( root <- 0 # ignored anyway } mode <- switch( - igraph.match.arg(mode), + igraph_match_arg(mode), "out" = 1, "in" = 2, "all" = 3, @@ -2934,7 +3011,7 @@ dfs <- function( root <- as_igraph_vs(graph, root) - 1 mode <- switch( - igraph.match.arg(mode), + igraph_match_arg(mode), "out" = 1, "in" = 2, "all" = 3, @@ -3074,11 +3151,14 @@ dfs <- function( components <- function(graph, mode = c("weak", "strong")) { # Argument checks ensure_igraph(graph) - mode <- switch(igraph.match.arg(mode), "weak" = 1, "strong" = 2) + mode <- igraph_match_arg(mode) - on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_connected_components, graph, mode) + res <- connected_components_impl( + graph = graph, + mode = mode, + details = TRUE + ) res$membership <- res$membership + 1 if (igraph_opt("add.vertex.names") && is_named(graph)) { names(res$membership) <- V(graph)$name @@ -3101,11 +3181,62 @@ is_connected <- function(graph, mode = c("weak", "strong")) { #' @export count_components <- function(graph, mode = c("weak", "strong")) { ensure_igraph(graph) - mode <- igraph.match.arg(mode) + mode <- igraph_match_arg(mode) mode <- switch(mode, "weak" = 1L, "strong" = 2L) on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_no_components, graph, mode) + .Call(Rx_igraph_no_components, graph, mode) +} + +#' Count reachable vertices +#' +#' `r lifecycle::badge("experimental")` +#' +#' Counts the number of vertices reachable from each vertex in the graph. +#' +#' For each vertex in the graph, this function counts how many vertices +#' are reachable from it, including the vertex itself. +#' A vertex is reachable from another if there is a directed path between them. +#' For undirected graphs, two vertices are reachable from each other if they +#' are in the same connected component. +#' +#' @param graph The input graph. +#' @param mode Character constant, defines how edge directions are considered +#' in directed graphs. +#' `"out"` counts vertices reachable via outgoing edges, +#' `"in"` counts vertices from which the current vertex is reachable via +#' incoming edges, +#' `"all"` or `"total"` ignores edge directions. +#' This parameter is ignored for undirected graphs. +#' @return An integer vector of length `vcount(graph)`. +#' The i-th element is the number of vertices reachable from vertex i +#' (including vertex i itself). +#' @author Gabor Csardi \email{csardi.gabor@@gmail.com} +#' @seealso [components()], [subcomponent()], [is_connected()] +#' @family components +#' @export +#' @keywords graphs +#' @examples +#' +#' # In a directed path graph, the reachability depends on direction +#' g <- make_graph(~ 1 -+ 2 -+ 3 -+ 4 -+ 5) +#' count_reachable(g, mode = "out") +#' count_reachable(g, mode = "in") +#' +#' # In an undirected graph, reachability is the same in all directions +#' g2 <- make_graph(~ 1 - 2 - 3 - 4 - 5) +#' count_reachable(g2, mode = "out") +#' +#' # A graph with multiple components +#' g3 <- make_graph(~ 1 - 2 - 3, 4 - 5, 6) +#' count_reachable(g3, mode = "all") +#' +#' @cdocs igraph_count_reachable +count_reachable <- function(graph, mode = c("out", "in", "all", "total")) { + count_reachable_impl( + graph = graph, + mode = mode + ) } #' Convert a general graph into a forest @@ -3150,18 +3281,15 @@ count_components <- function(graph, mode = c("weak", "strong")) { unfold_tree <- function(graph, mode = c("all", "out", "in", "total"), roots) { # Argument checks ensure_igraph(graph) - mode <- switch( - igraph.match.arg(mode), - "out" = 1, - "in" = 2, - "all" = 3, - "total" = 3 - ) + mode <- igraph_match_arg(mode) roots <- as_igraph_vs(graph, roots) - 1 - on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_unfold_tree, graph, mode, roots) + res <- unfold_tree_impl( + graph = graph, + mode = mode, + roots = roots + ) res } @@ -3260,9 +3388,19 @@ laplacian_matrix <- function( on.exit(.Call(R_igraph_finalizer)) # Function call if (sparse) { - res <- get_laplacian_sparse_impl(graph, "out", normalization, weights) + res <- get_laplacian_sparse_impl( + graph = graph, + mode = "out", + normalization = normalization, + weights = weights + ) } else { - res <- get_laplacian_impl(graph, "out", normalization, weights) + res <- get_laplacian_impl( + graph = graph, + mode = "out", + normalization = normalization, + weights = weights + ) } if (sparse) { res <- igraph.i.spMatrix(res) @@ -3372,12 +3510,15 @@ is_matching <- function(graph, matching, types = NULL) { # Argument checks ensure_igraph(graph) types <- handle_vertex_type_arg(types, graph, required = F) - matching <- as_igraph_vs(graph, matching, na.ok = TRUE) - 1 - matching[is.na(matching)] <- -1 + matching <- as_igraph_vs(graph, matching, na.ok = TRUE) + matching[is.na(matching)] <- 0 # Use 0 since is_matching_impl will subtract 1, making it -1 - on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_is_matching, graph, types, matching) + res <- is_matching_impl( + graph = graph, + types = types, + matching = matching + ) res } @@ -3388,12 +3529,15 @@ is_max_matching <- function(graph, matching, types = NULL) { # Argument checks ensure_igraph(graph) types <- handle_vertex_type_arg(types, graph, required = F) - matching <- as_igraph_vs(graph, matching, na.ok = TRUE) - 1 - matching[is.na(matching)] <- -1 + matching <- as_igraph_vs(graph, matching, na.ok = TRUE) + matching[is.na(matching)] <- 0 # Use 0 since is_maximal_matching_impl will subtract 1, making it -1 - on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_is_maximal_matching, graph, types, matching) + res <- is_maximal_matching_impl( + graph = graph, + types = types, + matching = matching + ) res } diff --git a/R/topology.R b/R/topology.R index 14bc4bd81f3..df2cbc0bb11 100644 --- a/R/topology.R +++ b/R/topology.R @@ -269,9 +269,11 @@ graph.isoclass.subgraph <- function(graph, vids) { ensure_igraph(graph) vids <- as_igraph_vs(graph, vids) - 1 - on.exit(.Call(R_igraph_finalizer)) # Function call - res <- .Call(R_igraph_isoclass_subgraph, graph, vids) + res <- isoclass_subgraph_impl( + graph = graph, + vids = vids + ) res } @@ -455,14 +457,18 @@ isomorphic <- function( ) { ensure_igraph(graph1) ensure_igraph(graph2) - method <- igraph.match.arg(method) + method <- igraph_match_arg(method) if (method == "auto") { - on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_isomorphic, graph1, graph2) + isomorphic_impl( + graph1 = graph1, + graph2 = graph2 + ) } else if (method == "direct") { - on.exit(.Call(R_igraph_finalizer)) - .Call(R_igraph_isomorphic, graph1, graph2) + isomorphic_impl( + graph1 = graph1, + graph2 = graph2 + ) } else if (method == "vf2") { graph.isomorphic.vf2(graph1, graph2, ...)$iso } else if (method == "bliss") { @@ -646,7 +652,7 @@ subgraph_isomorphic <- function( method = c("auto", "lad", "vf2"), ... ) { - method <- igraph.match.arg(method) + method <- igraph_match_arg(method) if (method == "auto") { method <- "lad" @@ -705,7 +711,7 @@ is_subgraph_isomorphic_to <- subgraph_isomorphic #' vertex.color2 = NULL #' ) count_isomorphisms <- function(graph1, graph2, method = "vf2", ...) { - method <- igraph.match.arg(method) + method <- igraph_match_arg(method) if (method == "vf2") { graph.count.isomorphisms.vf2(graph1, graph2, ...) @@ -810,7 +816,7 @@ count_subgraph_isomorphisms <- function( method = c("lad", "vf2"), ... ) { - method <- igraph.match.arg(method) + method <- igraph_match_arg(method) if (method == "lad") { length(graph.subisomorphic.lad(pattern, target, all.maps = TRUE, ...)$maps) @@ -862,7 +868,7 @@ graph.count.subisomorphisms.vf2 <- function( #' @export #' @family graph isomorphism isomorphisms <- function(graph1, graph2, method = "vf2", ...) { - method <- igraph.match.arg(method) + method <- igraph_match_arg(method) if (method == "vf2") { graph.get.isomorphisms.vf2(graph1, graph2, ...) @@ -933,7 +939,7 @@ subgraph_isomorphisms <- function( method = c("lad", "vf2"), ... ) { - method <- igraph.match.arg(method) + method <- igraph_match_arg(method) if (method == "lad") { graph.subisomorphic.lad(pattern, target, all.maps = TRUE, ...)$maps @@ -1367,3 +1373,47 @@ automorphism_group <- function( details = details ) } + +#' Transitive closure of a graph +#' +#' @description +#' `r lifecycle::badge("experimental")` +#' +#' Computes the transitive closure of a graph. +#' The resulting graph will have an edge from vertex \eqn{i} to vertex \eqn{j} +#' if \eqn{j} is reachable from \eqn{i} in the original graph. +#' +#' The transitive closure of a graph is a new graph where there is an edge +#' between any two vertices if there is a path between them in the original +#' graph. +#' For directed graphs, an edge from \eqn{i} to \eqn{j} is added if there is +#' a directed path from \eqn{i} to \eqn{j}. +#' For undirected graphs, this is equivalent to connecting all vertices that +#' are in the same connected component. +#' +#' @param graph The input graph. +#' It can be directed or undirected. +#' @return A new graph object representing the transitive closure. +#' The returned graph will have the same directedness as the input. +#' @author Fabio Zanini \email{fabio.zanini@@unsw.edu.au} +#' @seealso [distances()], [are_adjacent()] +#' @keywords graphs +#' @examples +#' +#' # Directed graph +#' g <- make_graph(c(1, 2, 2, 3, 3, 4)) +#' tc <- transitive_closure(g) +#' # The closure has edges 1->2, 1->3, 1->4, 2->3, 2->4, 3->4 +#' print_all(tc) +#' +#' # Undirected graph - connects all vertices in same component +#' g2 <- make_graph(c(1, 2, 3, 4), directed = FALSE) +#' tc2 <- transitive_closure(g2) +#' # Full graph on vertices 1, 2 and full graph on vertices 3, 4 +#' print_all(tc2) +#' @family functions for manipulating graph structure +#' @export +#' @cdocs igraph_transitive_closure +transitive_closure <- function(graph) { + transitive_closure_impl(graph = graph) +} diff --git a/R/trees.R b/R/trees.R index 49e0e3d45f7..03adbc86ee3 100644 --- a/R/trees.R +++ b/R/trees.R @@ -46,7 +46,12 @@ is_tree <- function( mode = c("out", "in", "all", "total"), details = FALSE ) { - out <- is_tree_impl(graph, mode, details) + out <- is_tree_impl( + graph = graph, + mode = mode, + details = details + ) + if (isTRUE(details) && !out$res && vcount(graph) > 0) { out$root <- V(graph)[1] } @@ -134,7 +139,9 @@ is_forest <- function( #' @export #' @cdocs igraph_to_prufer to_prufer <- function(graph) { - to_prufer_impl(graph = graph) + to_prufer_impl( + graph = graph + ) } #' Samples from the spanning trees of a graph randomly and uniformly @@ -164,4 +171,9 @@ to_prufer <- function(graph) { #' @family trees #' @export #' @cdocs igraph_random_spanning_tree -sample_spanning_tree <- random_spanning_tree_impl +sample_spanning_tree <- function(graph, vid = 0) { + random_spanning_tree_impl( + graph = graph, + vid = vid + ) +} diff --git a/R/utils-assert-args.R b/R/utils-assert-args.R index d6bbf43419f..3f9a2708a7f 100644 --- a/R/utils-assert-args.R +++ b/R/utils-assert-args.R @@ -29,7 +29,7 @@ switch_igraph_arg <- function( if (length(arg) > 1) { values <- intersect(values, tolower(arg)) } - match <- igraph.match.arg( + match <- igraph_match_arg( arg, values, error_arg = .error_arg, @@ -38,7 +38,7 @@ switch_igraph_arg <- function( switch(match, ...) } -igraph.match.arg <- function( +igraph_match_arg <- function( arg, values, error_arg = rlang::caller_arg(arg), diff --git a/R/utils.R b/R/utils.R index fad1d5c10e6..b9c51b8bbbc 100644 --- a/R/utils.R +++ b/R/utils.R @@ -72,7 +72,7 @@ capitalize <- function(x) { } address <- function(x) { - .Call(R_igraph_address, x) + .Call(Rx_igraph_address, x) } `%+%` <- function(x, y) { diff --git a/R/uuid.R b/R/uuid.R index 0abee1c312b..b617afeff4f 100644 --- a/R/uuid.R +++ b/R/uuid.R @@ -5,7 +5,7 @@ generate_uuid <- function(use_time = NA) { get_graph_id <- function(graph) { if (!warn_version(graph)) { - .Call(R_igraph_get_graph_id, graph) + .Call(Rx_igraph_get_graph_id, graph) } else { NA_character_ } diff --git a/R/versions.R b/R/versions.R index 928dde1fe93..b4a3b4696fe 100644 --- a/R/versions.R +++ b/R/versions.R @@ -57,7 +57,7 @@ graph_version <- function(graph) { # Don't call is_igraph() here to avoid recursion stopifnot(inherits(graph, "igraph")) - .Call(R_igraph_graph_version, graph) + .Call(Rx_igraph_graph_version, graph) } #' igraph data structure versions @@ -99,13 +99,13 @@ upgrade_graph <- function(graph) { # g_ver < p_ver if (g_ver == ver_0_4) { - .Call(R_igraph_add_env, graph) + .Call(Rx_igraph_add_env, graph) } else if (g_ver == ver_0_7_999) { # Not observed in the wild - .Call(R_igraph_add_myid_to_env, graph) - .Call(R_igraph_add_version_to_env, graph) + .Call(Rx_igraph_add_myid_to_env, graph) + .Call(Rx_igraph_add_version_to_env, graph) } else if (g_ver == ver_0_8) { - .Call(R_igraph_add_version_to_env, graph) + .Call(Rx_igraph_add_version_to_env, graph) graph <- unclass(graph) graph[igraph_t_idx_oi:igraph_t_idx_is] <- list(NULL) class(graph) <- "igraph" @@ -130,7 +130,7 @@ warn_version <- function(graph) { .Call(R_igraph_vcount, graph) # graph_version() calls is_igraph(), but that function must call warn_version() for safety - their_version <- .Call(R_igraph_graph_version, graph) + their_version <- .Call(Rx_igraph_graph_version, graph) if (pkg_graph_version == their_version) { return(FALSE) @@ -151,7 +151,7 @@ warn_version <- function(graph) { # Users will have to call upgrade_graph(), but this is what the message # is about. if (pkg_graph_version <= ver_1_5_0) { - .Call(R_igraph_add_version_to_env, graph) + .Call(Rx_igraph_add_version_to_env, graph) } return(TRUE) } diff --git a/R/weakref.R b/R/weakref.R index 608ce4cb584..45970feeaf1 100644 --- a/R/weakref.R +++ b/R/weakref.R @@ -22,17 +22,17 @@ ## ----------------------------------------------------------------------- make_weak_ref <- function(key, value, finalizer = NULL) { - .Call(R_igraph_make_weak_ref, key, value, finalizer) + .Call(Rx_igraph_make_weak_ref, key, value, finalizer) } weak_ref_key <- function(ref) { - .Call(R_igraph_weak_ref_key, ref) + .Call(Rx_igraph_weak_ref_key, ref) } weak_ref_value <- function(ref) { - .Call(R_igraph_weak_ref_value, ref) + .Call(Rx_igraph_weak_ref_value, ref) } weak_ref_run_finalizer <- function(ref) { - .Call(R_igraph_weak_ref_run_finalizer, ref) + .Call(Rx_igraph_weak_ref_run_finalizer, ref) } diff --git a/_pkgdown.yml b/_pkgdown.yml index 633d73b986b..051cd2647a5 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -113,6 +113,9 @@ reference: - running_mean - sample_seq - fit_power_law +- subtitle: Low-level operations +- contents: + - has_concept("low-level operations") # [[[ network analysis start - title: Structural properties - contents: diff --git a/man/add_edges.Rd b/man/add_edges.Rd index 3289635293e..1dd4efc7f3a 100644 --- a/man/add_edges.Rd +++ b/man/add_edges.Rd @@ -68,6 +68,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/add_vertices.Rd b/man/add_vertices.Rd index 54fb0fcf714..06b61187877 100644 --- a/man/add_vertices.Rd +++ b/man/add_vertices.Rd @@ -63,6 +63,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/articulation_points.Rd b/man/articulation_points.Rd index 91016495ccb..aea69793056 100644 --- a/man/articulation_points.Rd +++ b/man/articulation_points.Rd @@ -49,6 +49,7 @@ bridges(g) Connected components \code{\link{biconnected_components}()}, \code{\link{component_distribution}()}, +\code{\link{count_reachable}()}, \code{\link{decompose}()}, \code{\link{is_biconnected}()} } diff --git a/man/biconnected_components.Rd b/man/biconnected_components.Rd index 73e140047c9..370bf5ad072 100644 --- a/man/biconnected_components.Rd +++ b/man/biconnected_components.Rd @@ -59,6 +59,7 @@ bc <- biconnected_components(g) Connected components \code{\link{articulation_points}()}, \code{\link{component_distribution}()}, +\code{\link{count_reachable}()}, \code{\link{decompose}()}, \code{\link{is_biconnected}()} } diff --git a/man/complementer.Rd b/man/complementer.Rd index dc9d08799af..5b3ef9b06fd 100644 --- a/man/complementer.Rd +++ b/man/complementer.Rd @@ -62,6 +62,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/components.Rd b/man/components.Rd index ac7bffb001b..43f5430d97b 100644 --- a/man/components.Rd +++ b/man/components.Rd @@ -97,6 +97,7 @@ largest_component(g) Connected components \code{\link{articulation_points}()}, \code{\link{biconnected_components}()}, +\code{\link{count_reachable}()}, \code{\link{decompose}()}, \code{\link{is_biconnected}()} diff --git a/man/compose.Rd b/man/compose.Rd index 4d0a4ab5157..bcefd04e217 100644 --- a/man/compose.Rd +++ b/man/compose.Rd @@ -92,6 +92,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/contract.Rd b/man/contract.Rd index e76972702aa..5f2c561b467 100644 --- a/man/contract.Rd +++ b/man/contract.Rd @@ -66,6 +66,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/count_reachable.Rd b/man/count_reachable.Rd new file mode 100644 index 00000000000..249715c0c3a --- /dev/null +++ b/man/count_reachable.Rd @@ -0,0 +1,69 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/structural-properties.R +\name{count_reachable} +\alias{count_reachable} +\title{Count reachable vertices} +\usage{ +count_reachable(graph, mode = c("out", "in", "all", "total")) +} +\arguments{ +\item{graph}{The input graph.} + +\item{mode}{Character constant, defines how edge directions are considered +in directed graphs. +\code{"out"} counts vertices reachable via outgoing edges, +\code{"in"} counts vertices from which the current vertex is reachable via +incoming edges, +\code{"all"} or \code{"total"} ignores edge directions. +This parameter is ignored for undirected graphs.} +} +\value{ +An integer vector of length \code{vcount(graph)}. +The i-th element is the number of vertices reachable from vertex i +(including vertex i itself). +} +\description{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} +} +\details{ +Counts the number of vertices reachable from each vertex in the graph. + +For each vertex in the graph, this function counts how many vertices +are reachable from it, including the vertex itself. +A vertex is reachable from another if there is a directed path between them. +For undirected graphs, two vertices are reachable from each other if they +are in the same connected component. +} +\examples{ + +# In a directed path graph, the reachability depends on direction +g <- make_graph(~ 1 -+ 2 -+ 3 -+ 4 -+ 5) +count_reachable(g, mode = "out") +count_reachable(g, mode = "in") + +# In an undirected graph, reachability is the same in all directions +g2 <- make_graph(~ 1 - 2 - 3 - 4 - 5) +count_reachable(g2, mode = "out") + +# A graph with multiple components +g3 <- make_graph(~ 1 - 2 - 3, 4 - 5, 6) +count_reachable(g3, mode = "all") + +} +\seealso{ +\code{\link[=components]{components()}}, \code{\link[=subcomponent]{subcomponent()}}, \code{\link[=is_connected]{is_connected()}} + +Connected components +\code{\link{articulation_points}()}, +\code{\link{biconnected_components}()}, +\code{\link{component_distribution}()}, +\code{\link{decompose}()}, +\code{\link{is_biconnected}()} +} +\author{ +Gabor Csardi \email{csardi.gabor@gmail.com} +} +\concept{components} +\keyword{graphs} +\section{Related documentation in the C library}{\href{https://igraph.org/c/html/latest/igraph-Structural.html#igraph_count_reachable}{\code{count_reachable()}}.} + diff --git a/man/decompose.Rd b/man/decompose.Rd index 9976de28b6e..7b98ae098f7 100644 --- a/man/decompose.Rd +++ b/man/decompose.Rd @@ -45,6 +45,7 @@ Connected components \code{\link{articulation_points}()}, \code{\link{biconnected_components}()}, \code{\link{component_distribution}()}, +\code{\link{count_reachable}()}, \code{\link{is_biconnected}()} } \author{ diff --git a/man/degree.Rd b/man/degree.Rd index 098cf73fea2..2bd19522f86 100644 --- a/man/degree.Rd +++ b/man/degree.Rd @@ -3,6 +3,7 @@ \name{degree} \alias{degree} \alias{max_degree} +\alias{mean_degree} \alias{degree_distribution} \title{Degree and degree distribution of the vertices} \usage{ @@ -22,6 +23,8 @@ max_degree( loops = TRUE ) +mean_degree(graph, loops = TRUE) + degree_distribution(graph, cumulative = FALSE, ...) } \arguments{ @@ -55,6 +58,10 @@ degree vertices, the second vertices with degree one, etc. For \code{max_degree()}, the largest degree in the graph. When no vertices are selected, or when the input is the null graph, zero is returned as this is the smallest possible degree. + +For \code{mean_degree()}, the average degree in the graph as a single number. +For graphs with no vertices, \code{NaN} is returned. +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} } \description{ The degree of a vertex is its most basic structural property, the number of @@ -66,6 +73,7 @@ g <- make_ring(10) degree(g) g2 <- sample_gnp(1000, 10 / 1000) max_degree(g2) +mean_degree(g2) degree_distribution(g2) } @@ -101,5 +109,5 @@ Gabor Csardi \email{csardi.gabor@gmail.com} } \concept{structural.properties} \keyword{graphs} -\section{Related documentation in the C library}{\href{https://igraph.org/c/html/latest/igraph-Structural.html#igraph_maxdegree}{\code{maxdegree()}}.} +\section{Related documentation in the C library}{\href{https://igraph.org/c/html/latest/igraph-Structural.html#igraph_maxdegree}{\code{maxdegree()}}, \href{https://igraph.org/c/html/latest/igraph-Structural.html#igraph_mean_degree}{\code{mean_degree()}}.} diff --git a/man/delete_edges.Rd b/man/delete_edges.Rd index 62c7f23b37c..862be149fef 100644 --- a/man/delete_edges.Rd +++ b/man/delete_edges.Rd @@ -55,6 +55,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/delete_vertices.Rd b/man/delete_vertices.Rd index f8e261f0620..b21361a1975 100644 --- a/man/delete_vertices.Rd +++ b/man/delete_vertices.Rd @@ -50,6 +50,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/difference.Rd b/man/difference.Rd index 42d56d3007d..71ca15b607e 100644 --- a/man/difference.Rd +++ b/man/difference.Rd @@ -43,6 +43,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/difference.igraph.Rd b/man/difference.igraph.Rd index 393eb215b08..129b86b4d50 100644 --- a/man/difference.igraph.Rd +++ b/man/difference.igraph.Rd @@ -81,6 +81,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/disjoint_union.Rd b/man/disjoint_union.Rd index 626248720ee..ef4b90aa2ee 100644 --- a/man/disjoint_union.Rd +++ b/man/disjoint_union.Rd @@ -73,6 +73,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/edge.Rd b/man/edge.Rd index ed963639f10..ed57091dccb 100644 --- a/man/edge.Rd +++ b/man/edge.Rd @@ -72,6 +72,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/ego.Rd b/man/ego.Rd index 69c018240fe..66039cec73d 100644 --- a/man/ego.Rd +++ b/man/ego.Rd @@ -171,6 +171,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/graph_from_atlas.Rd b/man/graph_from_atlas.Rd index 16e4bb4f721..76f44c09ab1 100644 --- a/man/graph_from_atlas.Rd +++ b/man/graph_from_atlas.Rd @@ -44,15 +44,18 @@ Other deterministic constructors: \code{\link{graph_from_literal}()}, \code{\link{make_}()}, \code{\link{make_chordal_ring}()}, +\code{\link{make_circulant}()}, \code{\link{make_empty_graph}()}, \code{\link{make_full_citation_graph}()}, \code{\link{make_full_graph}()}, +\code{\link{make_full_multipartite}()}, \code{\link{make_graph}()}, \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, \code{\link{make_tree}()}, -\code{\link{make_tri_lattice}()} +\code{\link{make_tri_lattice}()}, +\code{\link{make_turan}()} } \concept{Graph Atlas.} \concept{deterministic constructors} diff --git a/man/graph_from_edgelist.Rd b/man/graph_from_edgelist.Rd index d90abf897c6..e13b59cae57 100644 --- a/man/graph_from_edgelist.Rd +++ b/man/graph_from_edgelist.Rd @@ -40,15 +40,18 @@ Other deterministic constructors: \code{\link{graph_from_literal}()}, \code{\link{make_}()}, \code{\link{make_chordal_ring}()}, +\code{\link{make_circulant}()}, \code{\link{make_empty_graph}()}, \code{\link{make_full_citation_graph}()}, \code{\link{make_full_graph}()}, +\code{\link{make_full_multipartite}()}, \code{\link{make_graph}()}, \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, \code{\link{make_tree}()}, -\code{\link{make_tri_lattice}()} +\code{\link{make_tri_lattice}()}, +\code{\link{make_turan}()} } \concept{Edge list} \concept{deterministic constructors} diff --git a/man/graph_from_literal.Rd b/man/graph_from_literal.Rd index 4ebbbbe7c40..61fed4add35 100644 --- a/man/graph_from_literal.Rd +++ b/man/graph_from_literal.Rd @@ -131,14 +131,17 @@ Other deterministic constructors: \code{\link{graph_from_edgelist}()}, \code{\link{make_}()}, \code{\link{make_chordal_ring}()}, +\code{\link{make_circulant}()}, \code{\link{make_empty_graph}()}, \code{\link{make_full_citation_graph}()}, \code{\link{make_full_graph}()}, +\code{\link{make_full_multipartite}()}, \code{\link{make_graph}()}, \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, \code{\link{make_tree}()}, -\code{\link{make_tri_lattice}()} +\code{\link{make_tri_lattice}()}, +\code{\link{make_turan}()} } \concept{deterministic constructors} diff --git a/man/igraph-minus.Rd b/man/igraph-minus.Rd index 4648ba984b5..663c4f255a4 100644 --- a/man/igraph-minus.Rd +++ b/man/igraph-minus.Rd @@ -78,6 +78,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/intersection.Rd b/man/intersection.Rd index 078f966349f..795c3ca88b2 100644 --- a/man/intersection.Rd +++ b/man/intersection.Rd @@ -43,6 +43,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/intersection.igraph.Rd b/man/intersection.igraph.Rd index fc193b0ac89..5f87df0a316 100644 --- a/man/intersection.igraph.Rd +++ b/man/intersection.igraph.Rd @@ -79,6 +79,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/invalidate_cache.Rd b/man/invalidate_cache.Rd new file mode 100644 index 00000000000..d6aa0352871 --- /dev/null +++ b/man/invalidate_cache.Rd @@ -0,0 +1,38 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/interface.R +\name{invalidate_cache} +\alias{invalidate_cache} +\title{Invalidate the cache of a graph} +\usage{ +invalidate_cache(graph) +} +\arguments{ +\item{graph}{The graph whose cache is to be invalidated.} +} +\value{ +The graph with its cache invalidated. Since the graph is modified +in place in R as well, you can also ignore the return value. +} +\description{ +igraph graphs cache some basic properties (such as whether the graph is a +DAG or whether it is simple) in an internal data structure for faster +repeated queries. This function invalidates the cache, forcing a +recalculation of the cached properties the next time they are needed. +} +\details{ +You should not need to call this function during normal usage; however, it +may be useful for debugging cache-related issues. A tell-tale sign of an +invalid cache entry is when the result of a cached function (such as +\code{\link{is_dag}()} or \code{\link{is_simple}()}) changes after calling +this function. +} +\examples{ +g <- make_ring(10) +# Cache is populated when calling is_simple() +is_simple(g) +# Invalidate cache (for debugging purposes) +invalidate_cache(g) +# Result should be the same +is_simple(g) +} +\concept{low-level operations} diff --git a/man/is_biconnected.Rd b/man/is_biconnected.Rd index 16f847b1bae..68af404b60d 100644 --- a/man/is_biconnected.Rd +++ b/man/is_biconnected.Rd @@ -40,6 +40,7 @@ Connected components \code{\link{articulation_points}()}, \code{\link{biconnected_components}()}, \code{\link{component_distribution}()}, +\code{\link{count_reachable}()}, \code{\link{decompose}()} } \concept{components} diff --git a/man/make_.Rd b/man/make_.Rd index 9ccaaac4293..b33bc13ef62 100644 --- a/man/make_.Rd +++ b/man/make_.Rd @@ -47,15 +47,18 @@ Other deterministic constructors: \code{\link{graph_from_edgelist}()}, \code{\link{graph_from_literal}()}, \code{\link{make_chordal_ring}()}, +\code{\link{make_circulant}()}, \code{\link{make_empty_graph}()}, \code{\link{make_full_citation_graph}()}, \code{\link{make_full_graph}()}, +\code{\link{make_full_multipartite}()}, \code{\link{make_graph}()}, \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, \code{\link{make_tree}()}, -\code{\link{make_tri_lattice}()} +\code{\link{make_tri_lattice}()}, +\code{\link{make_turan}()} Constructor modifiers (and related functions) \code{\link{sample_}()}, diff --git a/man/make_chordal_ring.Rd b/man/make_chordal_ring.Rd index 6cee4e0e583..9f72177067a 100644 --- a/man/make_chordal_ring.Rd +++ b/man/make_chordal_ring.Rd @@ -47,14 +47,17 @@ Other deterministic constructors: \code{\link{graph_from_edgelist}()}, \code{\link{graph_from_literal}()}, \code{\link{make_}()}, +\code{\link{make_circulant}()}, \code{\link{make_empty_graph}()}, \code{\link{make_full_citation_graph}()}, \code{\link{make_full_graph}()}, +\code{\link{make_full_multipartite}()}, \code{\link{make_graph}()}, \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, \code{\link{make_tree}()}, -\code{\link{make_tri_lattice}()} +\code{\link{make_tri_lattice}()}, +\code{\link{make_turan}()} } \concept{deterministic constructors} diff --git a/man/make_circulant.Rd b/man/make_circulant.Rd new file mode 100644 index 00000000000..f007dab0bb2 --- /dev/null +++ b/man/make_circulant.Rd @@ -0,0 +1,61 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/make.R +\name{make_circulant} +\alias{make_circulant} +\alias{circulant} +\title{Create a circulant graph} +\usage{ +make_circulant(n, shifts, directed = FALSE) + +circulant(...) +} +\arguments{ +\item{n}{Integer, the number of vertices in the circulant graph.} + +\item{shifts}{Integer vector, a list of the offsets within the circulant graph.} + +\item{directed}{Boolean, whether to create a directed graph.} + +\item{...}{Passed to \code{make_circulant()}.} +} +\value{ +An igraph graph. +} +\description{ +A circulant graph \eqn{C_n^{\textrm{shifts}}} consists of \eqn{n} vertices +\eqn{v_0, \ldots, v_{n-1}} such that for each \eqn{s_i} in the list of offsets +\code{shifts}, \eqn{v_j} is connected to \eqn{v_{(j + s_i) \mod n}} for all \eqn{j}. +} +\details{ +The function can generate either directed or undirected graphs. +It does not generate multi-edges or self-loops. +} +\examples{ +# Create a circulant graph with 10 vertices and shifts 1 and 3 +g <- make_circulant(10, c(1, 3)) +plot(g, layout = layout_in_circle) + +# A directed circulant graph +g2 <- make_circulant(10, c(1, 3), directed = TRUE) +plot(g2, layout = layout_in_circle) +} +\seealso{ +Other deterministic constructors: +\code{\link{graph_from_atlas}()}, +\code{\link{graph_from_edgelist}()}, +\code{\link{graph_from_literal}()}, +\code{\link{make_}()}, +\code{\link{make_chordal_ring}()}, +\code{\link{make_empty_graph}()}, +\code{\link{make_full_citation_graph}()}, +\code{\link{make_full_graph}()}, +\code{\link{make_full_multipartite}()}, +\code{\link{make_graph}()}, +\code{\link{make_lattice}()}, +\code{\link{make_ring}()}, +\code{\link{make_star}()}, +\code{\link{make_tree}()}, +\code{\link{make_tri_lattice}()}, +\code{\link{make_turan}()} +} +\concept{deterministic constructors} diff --git a/man/make_empty_graph.Rd b/man/make_empty_graph.Rd index 11d75b43f74..747692c06e8 100644 --- a/man/make_empty_graph.Rd +++ b/man/make_empty_graph.Rd @@ -33,14 +33,17 @@ Other deterministic constructors: \code{\link{graph_from_literal}()}, \code{\link{make_}()}, \code{\link{make_chordal_ring}()}, +\code{\link{make_circulant}()}, \code{\link{make_full_citation_graph}()}, \code{\link{make_full_graph}()}, +\code{\link{make_full_multipartite}()}, \code{\link{make_graph}()}, \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, \code{\link{make_tree}()}, -\code{\link{make_tri_lattice}()} +\code{\link{make_tri_lattice}()}, +\code{\link{make_turan}()} } \concept{Empty graph.} \concept{deterministic constructors} diff --git a/man/make_full_citation_graph.Rd b/man/make_full_citation_graph.Rd index d27f18bbfa2..e52439ad4be 100644 --- a/man/make_full_citation_graph.Rd +++ b/man/make_full_citation_graph.Rd @@ -34,13 +34,16 @@ Other deterministic constructors: \code{\link{graph_from_literal}()}, \code{\link{make_}()}, \code{\link{make_chordal_ring}()}, +\code{\link{make_circulant}()}, \code{\link{make_empty_graph}()}, \code{\link{make_full_graph}()}, +\code{\link{make_full_multipartite}()}, \code{\link{make_graph}()}, \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, \code{\link{make_tree}()}, -\code{\link{make_tri_lattice}()} +\code{\link{make_tri_lattice}()}, +\code{\link{make_turan}()} } \concept{deterministic constructors} diff --git a/man/make_full_graph.Rd b/man/make_full_graph.Rd index 85a605b8c9f..49d588ea7fd 100644 --- a/man/make_full_graph.Rd +++ b/man/make_full_graph.Rd @@ -35,14 +35,17 @@ Other deterministic constructors: \code{\link{graph_from_literal}()}, \code{\link{make_}()}, \code{\link{make_chordal_ring}()}, +\code{\link{make_circulant}()}, \code{\link{make_empty_graph}()}, \code{\link{make_full_citation_graph}()}, +\code{\link{make_full_multipartite}()}, \code{\link{make_graph}()}, \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, \code{\link{make_tree}()}, -\code{\link{make_tri_lattice}()} +\code{\link{make_tri_lattice}()}, +\code{\link{make_turan}()} } \concept{Full graph} \concept{deterministic constructors} diff --git a/man/make_full_multipartite.Rd b/man/make_full_multipartite.Rd new file mode 100644 index 00000000000..5541fec70a2 --- /dev/null +++ b/man/make_full_multipartite.Rd @@ -0,0 +1,65 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/make.R +\name{make_full_multipartite} +\alias{make_full_multipartite} +\alias{full_multipartite} +\title{Create a full multipartite graph} +\usage{ +make_full_multipartite(n, directed = FALSE, mode = c("all", "out", "in")) + +full_multipartite(...) +} +\arguments{ +\item{n}{A numeric vector giving the number of vertices in each partition.} + +\item{directed}{Logical scalar, whether to create a directed graph.} + +\item{mode}{Character scalar, the type of connections for directed graphs. +If \code{"out"}, then edges point from vertices of partitions with lower +indices to partitions with higher indices; if \code{"in"}, then the opposite +direction is realized; \code{"all"} creates mutual edges. This parameter is +ignored for undirected graphs.} + +\item{...}{Passed to \code{make_full_multipartite()}.} +} +\value{ +An igraph graph with a vertex attribute \code{type} storing the +partition index of each vertex. Partition indices start from 1. +} +\description{ +A multipartite graph contains multiple types of vertices and connections +are only possible between vertices of different types. This function +creates a complete multipartite graph where all possible edges between +different partitions are present. +} +\examples{ +# Create a multipartite graph with partitions of size 2, 3, and 4 +g <- make_full_multipartite(c(2, 3, 4)) +plot(g) + +# Create a directed multipartite graph +g2 <- make_full_multipartite(c(2, 2, 2), directed = TRUE, mode = "out") +plot(g2) +} +\seealso{ +Other deterministic constructors: +\code{\link{graph_from_atlas}()}, +\code{\link{graph_from_edgelist}()}, +\code{\link{graph_from_literal}()}, +\code{\link{make_}()}, +\code{\link{make_chordal_ring}()}, +\code{\link{make_circulant}()}, +\code{\link{make_empty_graph}()}, +\code{\link{make_full_citation_graph}()}, +\code{\link{make_full_graph}()}, +\code{\link{make_graph}()}, +\code{\link{make_lattice}()}, +\code{\link{make_ring}()}, +\code{\link{make_star}()}, +\code{\link{make_tree}()}, +\code{\link{make_tri_lattice}()}, +\code{\link{make_turan}()} +} +\concept{deterministic constructors} +\section{Related documentation in the C library}{\href{https://igraph.org/c/html/latest/igraph-Generators.html#igraph_full_multipartite}{\code{full_multipartite()}}.} + diff --git a/man/make_graph.Rd b/man/make_graph.Rd index 6d91945a622..aa866eac56c 100644 --- a/man/make_graph.Rd +++ b/man/make_graph.Rd @@ -244,13 +244,16 @@ Other deterministic constructors: \code{\link{graph_from_literal}()}, \code{\link{make_}()}, \code{\link{make_chordal_ring}()}, +\code{\link{make_circulant}()}, \code{\link{make_empty_graph}()}, \code{\link{make_full_citation_graph}()}, \code{\link{make_full_graph}()}, +\code{\link{make_full_multipartite}()}, \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, \code{\link{make_tree}()}, -\code{\link{make_tri_lattice}()} +\code{\link{make_tri_lattice}()}, +\code{\link{make_turan}()} } \concept{deterministic constructors} diff --git a/man/make_lattice.Rd b/man/make_lattice.Rd index 5ad7818828c..cab870dbfd9 100644 --- a/man/make_lattice.Rd +++ b/man/make_lattice.Rd @@ -64,14 +64,17 @@ Other deterministic constructors: \code{\link{graph_from_literal}()}, \code{\link{make_}()}, \code{\link{make_chordal_ring}()}, +\code{\link{make_circulant}()}, \code{\link{make_empty_graph}()}, \code{\link{make_full_citation_graph}()}, \code{\link{make_full_graph}()}, +\code{\link{make_full_multipartite}()}, \code{\link{make_graph}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, \code{\link{make_tree}()}, -\code{\link{make_tri_lattice}()} +\code{\link{make_tri_lattice}()}, +\code{\link{make_turan}()} } \concept{Lattice} \concept{deterministic constructors} diff --git a/man/make_ring.Rd b/man/make_ring.Rd index 6106bbc6e31..2e998774e12 100644 --- a/man/make_ring.Rd +++ b/man/make_ring.Rd @@ -41,13 +41,16 @@ Other deterministic constructors: \code{\link{graph_from_literal}()}, \code{\link{make_}()}, \code{\link{make_chordal_ring}()}, +\code{\link{make_circulant}()}, \code{\link{make_empty_graph}()}, \code{\link{make_full_citation_graph}()}, \code{\link{make_full_graph}()}, +\code{\link{make_full_multipartite}()}, \code{\link{make_graph}()}, \code{\link{make_lattice}()}, \code{\link{make_star}()}, \code{\link{make_tree}()}, -\code{\link{make_tri_lattice}()} +\code{\link{make_tri_lattice}()}, +\code{\link{make_turan}()} } \concept{deterministic constructors} diff --git a/man/make_star.Rd b/man/make_star.Rd index bb28dc3f0e5..b3cd5d8a680 100644 --- a/man/make_star.Rd +++ b/man/make_star.Rd @@ -40,14 +40,17 @@ Other deterministic constructors: \code{\link{graph_from_literal}()}, \code{\link{make_}()}, \code{\link{make_chordal_ring}()}, +\code{\link{make_circulant}()}, \code{\link{make_empty_graph}()}, \code{\link{make_full_citation_graph}()}, \code{\link{make_full_graph}()}, +\code{\link{make_full_multipartite}()}, \code{\link{make_graph}()}, \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_tree}()}, -\code{\link{make_tri_lattice}()} +\code{\link{make_tri_lattice}()}, +\code{\link{make_turan}()} } \concept{Star graph} \concept{deterministic constructors} diff --git a/man/make_tree.Rd b/man/make_tree.Rd index b29bd617099..ae2ca3e6947 100644 --- a/man/make_tree.Rd +++ b/man/make_tree.Rd @@ -41,14 +41,17 @@ Other deterministic constructors: \code{\link{graph_from_literal}()}, \code{\link{make_}()}, \code{\link{make_chordal_ring}()}, +\code{\link{make_circulant}()}, \code{\link{make_empty_graph}()}, \code{\link{make_full_citation_graph}()}, \code{\link{make_full_graph}()}, +\code{\link{make_full_multipartite}()}, \code{\link{make_graph}()}, \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, -\code{\link{make_tri_lattice}()} +\code{\link{make_tri_lattice}()}, +\code{\link{make_turan}()} } \concept{Trees.} \concept{deterministic constructors} diff --git a/man/make_tri_lattice.Rd b/man/make_tri_lattice.Rd index 95d9352464e..4f551ee58e4 100644 --- a/man/make_tri_lattice.Rd +++ b/man/make_tri_lattice.Rd @@ -5,7 +5,7 @@ \alias{tri_lattice} \title{Create a triangular lattice graph} \usage{ -make_tri_lattice(dims, directed = FALSE, mutual = FALSE) +make_tri_lattice(dims, ..., directed = FALSE, mutual = FALSE) tri_lattice(...) } @@ -22,19 +22,22 @@ vertices. All dimensions must be non-negative. }} +\item{...}{These dots are for future extensions and must be empty.} + \item{directed}{Logical scalar, whether to create a directed graph. If the \code{mutual} argument is not set to \code{TRUE}, edges will be directed from lower-index vertices towards higher-index ones.} \item{mutual}{Logical scalar, if the graph is directed, this gives whether to create all connections as mutual.} - -\item{...}{Passed to \code{make_tri_lattice()}.} } \value{ An igraph graph. } \description{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} +} +\details{ \code{make_tri_lattice()} creates a triangular lattice with a specified shape. The shape can be triangular (1 dimension), quasi-rectangular (2 dimensions), or hexagonal (3 dimensions). @@ -62,14 +65,17 @@ Other deterministic constructors: \code{\link{graph_from_literal}()}, \code{\link{make_}()}, \code{\link{make_chordal_ring}()}, +\code{\link{make_circulant}()}, \code{\link{make_empty_graph}()}, \code{\link{make_full_citation_graph}()}, \code{\link{make_full_graph}()}, +\code{\link{make_full_multipartite}()}, \code{\link{make_graph}()}, \code{\link{make_lattice}()}, \code{\link{make_ring}()}, \code{\link{make_star}()}, -\code{\link{make_tree}()} +\code{\link{make_tree}()}, +\code{\link{make_turan}()} } \concept{Lattice} \concept{deterministic constructors} diff --git a/man/make_turan.Rd b/man/make_turan.Rd new file mode 100644 index 00000000000..f23e06bae49 --- /dev/null +++ b/man/make_turan.Rd @@ -0,0 +1,64 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/make.R +\name{make_turan} +\alias{make_turan} +\alias{turan} +\title{Create a Turán graph} +\usage{ +make_turan(n, r) + +turan(...) +} +\arguments{ +\item{n}{Integer, the number of vertices in the graph.} + +\item{r}{Integer, the number of partitions in the graph, must be positive.} + +\item{...}{Passed to \code{make_turan()}.} +} +\value{ +An igraph graph with a vertex attribute \code{type} storing the +partition index of each vertex. Partition indices start from 1. +} +\description{ +Turán graphs are complete multipartite graphs with the property that the +sizes of the partitions are as close to equal as possible. +} +\details{ +The Turán graph with \code{n} vertices and \code{r} partitions is the densest +graph on \code{n} vertices that does not contain a clique of size \code{r+1}. + +This function generates undirected graphs. The null graph is +returned when the number of vertices is zero. A complete graph is +returned if the number of partitions is greater than the number of vertices. +} +\examples{ +# Create a Turán graph with 10 vertices and 3 partitions +g <- make_turan(10, 3) +plot(g) + +# The sizes of the partitions are as balanced as possible +table(V(g)$type) +} +\seealso{ +Other deterministic constructors: +\code{\link{graph_from_atlas}()}, +\code{\link{graph_from_edgelist}()}, +\code{\link{graph_from_literal}()}, +\code{\link{make_}()}, +\code{\link{make_chordal_ring}()}, +\code{\link{make_circulant}()}, +\code{\link{make_empty_graph}()}, +\code{\link{make_full_citation_graph}()}, +\code{\link{make_full_graph}()}, +\code{\link{make_full_multipartite}()}, +\code{\link{make_graph}()}, +\code{\link{make_lattice}()}, +\code{\link{make_ring}()}, +\code{\link{make_star}()}, +\code{\link{make_tree}()}, +\code{\link{make_tri_lattice}()} +} +\concept{deterministic constructors} +\section{Related documentation in the C library}{\href{https://igraph.org/c/html/latest/igraph-Generators.html#igraph_turan}{\code{turan()}}.} + diff --git a/man/path.Rd b/man/path.Rd index 0e20b51dfe8..0c13a5f94be 100644 --- a/man/path.Rd +++ b/man/path.Rd @@ -66,6 +66,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/permute.Rd b/man/permute.Rd index 2dab221f426..cfb42733418 100644 --- a/man/permute.Rd +++ b/man/permute.Rd @@ -69,6 +69,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/plus-.igraph.Rd b/man/plus-.igraph.Rd index cf500e99ce9..eb1f65b141d 100644 --- a/man/plus-.igraph.Rd +++ b/man/plus-.igraph.Rd @@ -123,6 +123,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/rep.igraph.Rd b/man/rep.igraph.Rd index 6fb7562540b..958ccaebdbe 100644 --- a/man/rep.igraph.Rd +++ b/man/rep.igraph.Rd @@ -50,6 +50,7 @@ Other functions for manipulating graph structure: \code{\link{permute}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/reverse_edges.Rd b/man/reverse_edges.Rd index c4afc1e66c6..bc71af9cded 100644 --- a/man/reverse_edges.Rd +++ b/man/reverse_edges.Rd @@ -53,6 +53,7 @@ Other functions for manipulating graph structure: \code{\link{permute}()}, \code{\link{rep.igraph}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/simplify.Rd b/man/simplify.Rd index 9ebaa39c3ca..93a2ced2ceb 100644 --- a/man/simplify.Rd +++ b/man/simplify.Rd @@ -92,6 +92,7 @@ Other functions for manipulating graph structure: \code{\link{permute}()}, \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} diff --git a/man/transitive_closure.Rd b/man/transitive_closure.Rd new file mode 100644 index 00000000000..01461959e4d --- /dev/null +++ b/man/transitive_closure.Rd @@ -0,0 +1,81 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/topology.R +\name{transitive_closure} +\alias{transitive_closure} +\title{Transitive closure of a graph} +\usage{ +transitive_closure(graph) +} +\arguments{ +\item{graph}{The input graph. +It can be directed or undirected.} +} +\value{ +A new graph object representing the transitive closure. +The returned graph will have the same directedness as the input. +} +\description{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} + +Computes the transitive closure of a graph. +The resulting graph will have an edge from vertex \eqn{i} to vertex \eqn{j} +if \eqn{j} is reachable from \eqn{i} in the original graph. + +The transitive closure of a graph is a new graph where there is an edge +between any two vertices if there is a path between them in the original +graph. +For directed graphs, an edge from \eqn{i} to \eqn{j} is added if there is +a directed path from \eqn{i} to \eqn{j}. +For undirected graphs, this is equivalent to connecting all vertices that +are in the same connected component. +} +\examples{ + +# Directed graph +g <- make_graph(c(1, 2, 2, 3, 3, 4)) +tc <- transitive_closure(g) +# The closure has edges 1->2, 1->3, 1->4, 2->3, 2->4, 3->4 +print_all(tc) + +# Undirected graph - connects all vertices in same component +g2 <- make_graph(c(1, 2, 3, 4), directed = FALSE) +tc2 <- transitive_closure(g2) +# Full graph on vertices 1, 2 and full graph on vertices 3, 4 +print_all(tc2) +} +\seealso{ +\code{\link[=distances]{distances()}}, \code{\link[=are_adjacent]{are_adjacent()}} + +Other functions for manipulating graph structure: +\code{\link{+.igraph}()}, +\code{\link{add_edges}()}, +\code{\link{add_vertices}()}, +\code{\link{complementer}()}, +\code{\link{compose}()}, +\code{\link{connect}()}, +\code{\link{contract}()}, +\code{\link{delete_edges}()}, +\code{\link{delete_vertices}()}, +\code{\link{difference}()}, +\code{\link{difference.igraph}()}, +\code{\link{disjoint_union}()}, +\code{\link{edge}()}, +\code{\link{igraph-minus}}, +\code{\link{intersection}()}, +\code{\link{intersection.igraph}()}, +\code{\link{path}()}, +\code{\link{permute}()}, +\code{\link{rep.igraph}()}, +\code{\link{reverse_edges}()}, +\code{\link{simplify}()}, +\code{\link{union}()}, +\code{\link{union.igraph}()}, +\code{\link{vertex}()} +} +\author{ +Fabio Zanini \email{fabio.zanini@unsw.edu.au} +} +\concept{functions for manipulating graph structure} +\keyword{graphs} +\section{Related documentation in the C library}{\href{https://igraph.org/c/html/latest/igraph-Structural.html#igraph_transitive_closure}{\code{transitive_closure()}}.} + diff --git a/man/union.Rd b/man/union.Rd index 91bfdcc7545..eeda392e3b4 100644 --- a/man/union.Rd +++ b/man/union.Rd @@ -44,6 +44,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union.igraph}()}, \code{\link{vertex}()} } diff --git a/man/union.igraph.Rd b/man/union.igraph.Rd index 67973087403..750a4a904cd 100644 --- a/man/union.igraph.Rd +++ b/man/union.igraph.Rd @@ -77,6 +77,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{vertex}()} } diff --git a/man/vertex.Rd b/man/vertex.Rd index 86c68845bda..56add28973a 100644 --- a/man/vertex.Rd +++ b/man/vertex.Rd @@ -60,6 +60,7 @@ Other functions for manipulating graph structure: \code{\link{rep.igraph}()}, \code{\link{reverse_edges}()}, \code{\link{simplify}()}, +\code{\link{transitive_closure}()}, \code{\link{union}()}, \code{\link{union.igraph}()} } diff --git a/man/which_multiple.Rd b/man/which_multiple.Rd index c7ae8a79065..05f7f22c25e 100644 --- a/man/which_multiple.Rd +++ b/man/which_multiple.Rd @@ -6,6 +6,7 @@ \alias{count_multiple} \alias{which_loop} \alias{any_loop} +\alias{count_loops} \title{Find the multiple or loop edges in a graph} \usage{ which_multiple(graph, eids = E(graph)) @@ -17,6 +18,8 @@ count_multiple(graph, eids = E(graph)) which_loop(graph, eids = E(graph)) any_loop(graph) + +count_loops(graph) } \arguments{ \item{graph}{The input graph.} @@ -27,6 +30,7 @@ all edges in the graph.} \value{ \code{any_loop()} and \code{any_multiple()} return a logical scalar. \code{which_loop()} and \code{which_multiple()} return a logical vector. +\code{count_loops()} returns a numeric scalar with the total number of loop edges. \code{count_multiple()} returns a numeric vector. } \description{ @@ -39,6 +43,8 @@ without multiple and loop edges is called a simple graph. \code{which_loop()} decides whether the edges of the graph are loop edges. +\code{count_loops()} counts the total number of loop edges in the graph. + \code{any_multiple()} decides whether the graph has any multiple edges. \code{which_multiple()} decides whether the edges of the graph are multiple @@ -61,6 +67,7 @@ original multiplicity as an edge attribute. g <- make_graph(c(1, 1, 2, 2, 3, 3, 4, 5)) any_loop(g) which_loop(g) +count_loops(g) # Multiple edges g <- sample_pa(10, m = 3, algorithm = "bag") @@ -116,5 +123,5 @@ Gabor Csardi \email{csardi.gabor@gmail.com} } \concept{structural.properties} \keyword{graphs} -\section{Related documentation in the C library}{\href{https://igraph.org/c/html/latest/igraph-Structural.html#igraph_is_multiple}{\code{is_multiple()}}, \href{https://igraph.org/c/html/latest/igraph-Structural.html#igraph_has_multiple}{\code{has_multiple()}}, \href{https://igraph.org/c/html/latest/igraph-Structural.html#igraph_count_multiple}{\code{count_multiple()}}, \href{https://igraph.org/c/html/latest/igraph-Structural.html#igraph_is_loop}{\code{is_loop()}}, \href{https://igraph.org/c/html/latest/igraph-Structural.html#igraph_has_loop}{\code{has_loop()}}.} +\section{Related documentation in the C library}{\href{https://igraph.org/c/html/latest/igraph-Structural.html#igraph_is_multiple}{\code{is_multiple()}}, \href{https://igraph.org/c/html/latest/igraph-Structural.html#igraph_has_multiple}{\code{has_multiple()}}, \href{https://igraph.org/c/html/latest/igraph-Structural.html#igraph_count_multiple}{\code{count_multiple()}}, \href{https://igraph.org/c/html/latest/igraph-Structural.html#igraph_is_loop}{\code{is_loop()}}, \href{https://igraph.org/c/html/latest/igraph-Structural.html#igraph_has_loop}{\code{has_loop()}}, \href{https://igraph.org/c/html/latest/igraph-Structural.html#igraph_count_loops}{\code{count_loops()}}.} diff --git a/src/Makevars.in b/src/Makevars.in index a49ad9a17ff..35405db624b 100644 --- a/src/Makevars.in +++ b/src/Makevars.in @@ -23,7 +23,7 @@ PKG_CXXFLAGS=$(CXX_VISIBILITY) PKG_FFLAGS=$(F_VISIBILITY) PKG_CPPFLAGS=-DUSING_R -I. -Ivendor -Ivendor/cigraph/src -Ivendor/cigraph/include -Ivendor/cigraph/vendor -Ivendor/io/parsers @cflags@ \ - -DNDEBUG -DNTIMER -DNPRINT -DIGRAPH_THREAD_LOCAL= \ + -DNDEBUG -DIGRAPH_THREAD_LOCAL= \ -DPRPACK_IGRAPH_SUPPORT \ -DHAVE_GFORTRAN=1 \ -D_GNU_SOURCE=1 diff --git a/src/Makevars.ucrt b/src/Makevars.ucrt index 96071ea7722..b91c03877db 100644 --- a/src/Makevars.ucrt +++ b/src/Makevars.ucrt @@ -28,7 +28,7 @@ else endif PKG_CPPFLAGS += -DUSING_R -I. -Ivendor -Ivendor/cigraph/src -Ivendor/cigraph/include -Ivendor/cigraph/vendor -Ivendor/io/parsers -Ivendor/mini-gmp \ - -DNDEBUG -DNTIMER -DNPRINT -DIGRAPH_THREAD_LOCAL= \ + -DNDEBUG -DIGRAPH_THREAD_LOCAL= \ -DPRPACK_IGRAPH_SUPPORT \ -DHAVE_GFORTRAN=1 \ -D_GNU_SOURCE=1 \ diff --git a/src/Makevars.win b/src/Makevars.win index 16b9bbd9b85..f0ed80c2fdf 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -20,7 +20,7 @@ GLPK_HOME ?= $(MINGW_PREFIX) LIB_GMP ?= $(MINGW_PREFIX) PKG_CPPFLAGS=-DUSING_R -I. -Ivendor -Ivendor/cigraph/src -Ivendor/cigraph/include -Ivendor/cigraph/vendor -Ivendor/io/parsers -Ivendor/mini-gmp \ - -DNDEBUG -DNTIMER -DNPRINT -DIGRAPH_THREAD_LOCAL= \ + -DNDEBUG -DIGRAPH_THREAD_LOCAL= \ -DPRPACK_IGRAPH_SUPPORT \ -DHAVE_GFORTRAN=1 \ -D_GNU_SOURCE=1 \ diff --git a/src/README.md b/src/README.md index 171928561e5..73e930afa78 100644 --- a/src/README.md +++ b/src/README.md @@ -24,3 +24,40 @@ ``` 4. Commit and push + +## Dependency Tracking System + +The build system uses an automated dependency tracking mechanism to enable efficient incremental compilation. + +### How It Works + +1. **Dependency Generation**: When compiling C/C++ files, the compiler generates `.d` files containing all dependencies (headers) for each source file. + +2. **Filtering**: The `deps.mk` makefile processes these `.d` files to create `.dd` files that: + - Include only local project headers (not system headers) + - Format dependencies in a Makefile-compatible format with proper line continuations + - Add a header comment indicating they are auto-generated + +3. **Integration**: The generated `.dd` files are included by the main Makefile, allowing Make to automatically recompile sources when their dependencies change. + +### File Types + +- **`.d` files**: Raw dependency files generated by the compiler (ignored by git via `.gitignore`) +- **`.dd` files**: Processed dependency files with only local headers (committed but need to be kept clean of system headers) + +### Important Notes + +- **Never commit `.d` files**: They contain machine-specific paths and are regenerated on each build +- **Never add system headers to `.dd` files**: They are for review only +- **Never edit `.dd` files**: They are automatically generated; manual edits will be overwritten +- The system is implemented in `deps.mk` and works transparently during normal builds +- For clean builds or troubleshooting, remove all `.d` files: `rm -f src/*.d` + +### Implementation Details + +See `src/deps.mk` for the implementation. The key steps are: + +1. The compiler's `-MMD -MP` flags generate `.d` files during compilation +2. A sed-based pipeline filters and formats the dependencies +3. System headers and vendored dependencies are excluded to reduce file size +4. Dependencies are sorted for consistency diff --git a/src/cpp11.cpp b/src/cpp11.cpp index 61d8955f03d..b8774dc926b 100644 --- a/src/cpp11.cpp +++ b/src/cpp11.cpp @@ -24,22 +24,15 @@ extern "C" { /* .Call calls */ extern SEXP R_igraph_add_edges(SEXP, SEXP); extern SEXP R_igraph_add_edges_manual(SEXP, SEXP); -extern SEXP R_igraph_add_env(SEXP); -extern SEXP R_igraph_add_myid_to_env(SEXP); -extern SEXP R_igraph_add_version_to_env(SEXP); extern SEXP R_igraph_add_vertices(SEXP, SEXP); -extern SEXP R_igraph_address(SEXP); extern SEXP R_igraph_adhesion(SEXP, SEXP); extern SEXP R_igraph_adjacency(SEXP, SEXP, SEXP); extern SEXP R_igraph_adjacency_spectral_embedding(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_adjacent_vertices(SEXP, SEXP, SEXP); extern SEXP R_igraph_adjlist(SEXP, SEXP, SEXP); extern SEXP R_igraph_all_minimal_st_separators(SEXP); extern SEXP R_igraph_all_st_cuts(SEXP, SEXP, SEXP); extern SEXP R_igraph_all_st_mincuts(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_are_adjacent(SEXP, SEXP, SEXP); -extern SEXP R_igraph_arpack(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_arpack_unpack_complex(SEXP, SEXP, SEXP); extern SEXP R_igraph_articulation_points(SEXP); extern SEXP R_igraph_assortativity(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_assortativity_degree(SEXP, SEXP); @@ -97,19 +90,15 @@ extern SEXP R_igraph_community_leading_eigenvector(SEXP, SEXP, SEXP, SEXP, SEXP, extern SEXP R_igraph_community_leiden(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_community_multilevel(SEXP, SEXP, SEXP); extern SEXP R_igraph_community_optimal_modularity(SEXP, SEXP); -extern SEXP R_igraph_community_to_membership2(SEXP, SEXP, SEXP); extern SEXP R_igraph_compare_communities(SEXP, SEXP, SEXP); extern SEXP R_igraph_complementer(SEXP, SEXP); -extern SEXP R_igraph_compose(SEXP, SEXP, SEXP); +extern SEXP R_igraph_compose(SEXP, SEXP); extern SEXP R_igraph_connect_neighborhood(SEXP, SEXP, SEXP); extern SEXP R_igraph_connected_components(SEXP, SEXP); extern SEXP R_igraph_constraint(SEXP, SEXP, SEXP); extern SEXP R_igraph_contract_vertices(SEXP, SEXP, SEXP); extern SEXP R_igraph_convex_hull_2d(SEXP); extern SEXP R_igraph_copy(SEXP); -extern SEXP R_igraph_copy_env(SEXP); -extern SEXP R_igraph_copy_from(SEXP); -extern SEXP R_igraph_copy_to(SEXP); extern SEXP R_igraph_coreness(SEXP, SEXP); extern SEXP R_igraph_correlated_game(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_correlated_pair_game(SEXP, SEXP, SEXP, SEXP, SEXP); @@ -138,7 +127,7 @@ extern SEXP R_igraph_dfs(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, S extern SEXP R_igraph_diameter(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_difference(SEXP, SEXP); extern SEXP R_igraph_dim_select(SEXP); -extern SEXP R_igraph_disjoint_union(SEXP); +extern SEXP R_igraph_disjoint_union(SEXP, SEXP); extern SEXP R_igraph_diversity(SEXP, SEXP, SEXP); extern SEXP R_igraph_dominator_tree(SEXP, SEXP, SEXP); extern SEXP R_igraph_dot_product_game(SEXP, SEXP); @@ -183,20 +172,14 @@ 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_adjedgelist(SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_adjlist(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); extern SEXP R_igraph_get_all_shortest_paths_dijkstra(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_get_all_simple_paths(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_all_simple_paths_pp(SEXP); -extern SEXP R_igraph_get_attr_mode(SEXP, SEXP); extern SEXP R_igraph_get_biadjacency(SEXP, SEXP); extern SEXP R_igraph_get_diameter(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_edge(SEXP, SEXP); extern SEXP R_igraph_get_edgelist(SEXP, SEXP); extern SEXP R_igraph_get_eids(SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_get_graph_id(SEXP); extern SEXP R_igraph_get_isomorphisms_vf2(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_get_isomorphisms_vf2_callback(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_get_k_shortest_paths(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); @@ -211,16 +194,15 @@ extern SEXP R_igraph_get_stochastic_sparse(SEXP, SEXP, SEXP); extern SEXP R_igraph_get_subisomorphisms_vf2(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_get_widest_path(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_get_widest_paths(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_girth(SEXP, SEXP); +extern SEXP R_igraph_girth(SEXP); extern SEXP R_igraph_global_efficiency(SEXP, SEXP, SEXP); extern SEXP R_igraph_gomory_hu_tree(SEXP, SEXP); extern SEXP R_igraph_graph_center_dijkstra(SEXP, SEXP, SEXP); extern SEXP R_igraph_graph_count(SEXP, SEXP); extern SEXP R_igraph_graph_power(SEXP, SEXP, SEXP); -extern SEXP R_igraph_graph_version(SEXP); extern SEXP R_igraph_graphlets(SEXP, SEXP, SEXP); extern SEXP R_igraph_graphlets_candidate_basis(SEXP, SEXP); -extern SEXP R_igraph_graphlets_project(SEXP, SEXP, SEXP, SEXP, SEXP); +extern SEXP R_igraph_graphlets_project(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_grg_game(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_growing_random_game(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_harmonic_centrality_cutoff(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); @@ -240,10 +222,7 @@ extern SEXP R_igraph_hsbm_game(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_hsbm_list_game(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_hub_and_authority_scores(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_hypercube(SEXP, SEXP); -extern SEXP R_igraph_i_levc_arp(SEXP, SEXP, SEXP); -extern SEXP R_igraph_identical_graphs(SEXP, SEXP, SEXP); extern SEXP R_igraph_incident(SEXP, SEXP, SEXP); -extern SEXP R_igraph_incident_edges(SEXP, SEXP, SEXP); extern SEXP R_igraph_independence_number(SEXP); extern SEXP R_igraph_independent_vertex_sets(SEXP, SEXP, SEXP); extern SEXP R_igraph_induced_subgraph(SEXP, SEXP, SEXP); @@ -332,11 +311,10 @@ extern SEXP R_igraph_local_scan_k_ecount(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_local_scan_k_ecount_them(SEXP, SEXP, SEXP, SEXP, SEXP); 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_make_weak_ref(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, SEXP); +extern SEXP R_igraph_maximal_cliques_count(SEXP, SEXP, SEXP); extern SEXP R_igraph_maximal_cliques_file(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_maximal_cliques_hist(SEXP, SEXP, SEXP); extern SEXP R_igraph_maximal_independent_vertex_sets(SEXP); @@ -355,10 +333,6 @@ extern SEXP R_igraph_moran_process(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_motifs_randesu(SEXP, SEXP, SEXP); extern SEXP R_igraph_motifs_randesu_estimate(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_motifs_randesu_no(SEXP, SEXP, SEXP); -extern SEXP R_igraph_mybracket2(SEXP, SEXP, SEXP); -extern SEXP R_igraph_mybracket2_copy(SEXP, SEXP, SEXP); -extern SEXP R_igraph_mybracket2_names(SEXP, SEXP, SEXP); -extern SEXP R_igraph_mybracket2_set(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_mybracket3_set(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_mycielski_graph(SEXP); extern SEXP R_igraph_mycielskian(SEXP, SEXP); @@ -366,7 +340,6 @@ extern SEXP R_igraph_neighborhood(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_neighborhood_graphs(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_neighborhood_size(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_neighbors(SEXP, SEXP, SEXP); -extern SEXP R_igraph_no_components(SEXP, SEXP); extern SEXP R_igraph_path_graph(SEXP, SEXP, SEXP); extern SEXP R_igraph_path_length_hist(SEXP, SEXP); extern SEXP R_igraph_permute_vertices(SEXP, SEXP); @@ -382,7 +355,6 @@ extern SEXP R_igraph_radius_dijkstra(SEXP, SEXP, SEXP); extern SEXP R_igraph_random_sample(SEXP, SEXP, SEXP); extern SEXP R_igraph_random_spanning_tree(SEXP, SEXP); extern SEXP R_igraph_random_walk(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_read_graph_dimacs(SEXP, SEXP); extern SEXP R_igraph_read_graph_dl(SEXP, SEXP); extern SEXP R_igraph_read_graph_edgelist(SEXP, SEXP, SEXP); extern SEXP R_igraph_read_graph_gml(SEXP); @@ -412,7 +384,6 @@ extern SEXP R_igraph_sample_dirichlet(SEXP, SEXP); extern SEXP R_igraph_sample_sphere_surface(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_sample_sphere_volume(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_sbm_game(SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_set_verbose(SEXP); extern SEXP R_igraph_shortest_paths(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_similarity_dice(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_similarity_dice_es(SEXP, SEXP, SEXP, SEXP); @@ -457,7 +428,6 @@ extern SEXP R_igraph_transitive_closure_dag(SEXP); extern SEXP R_igraph_transitivity_avglocal_undirected(SEXP, SEXP); extern SEXP R_igraph_transitivity_barrat(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_transitivity_local_undirected(SEXP, SEXP, SEXP); -extern SEXP R_igraph_transitivity_local_undirected_all(SEXP, SEXP); extern SEXP R_igraph_transitivity_undirected(SEXP, SEXP); extern SEXP R_igraph_tree_from_parent_vector(SEXP, SEXP); extern SEXP R_igraph_tree_game(SEXP, SEXP, SEXP); @@ -478,9 +448,6 @@ extern SEXP R_igraph_vs_adj(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_vs_nei(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_walktrap_community(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_watts_strogatz_game(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); -extern SEXP R_igraph_weak_ref_key(SEXP); -extern SEXP R_igraph_weak_ref_run_finalizer(SEXP); -extern SEXP R_igraph_weak_ref_value(SEXP); extern SEXP R_igraph_weighted_adjacency(SEXP, SEXP, SEXP); extern SEXP R_igraph_weighted_clique_number(SEXP, SEXP); extern SEXP R_igraph_weighted_cliques(SEXP, SEXP, SEXP, SEXP, SEXP); @@ -490,33 +457,108 @@ extern SEXP R_igraph_widest_path_widths_floyd_warshall(SEXP, SEXP, SEXP, SEXP, S extern SEXP R_igraph_write_graph_dimacs(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_write_graph_dot(SEXP, SEXP); extern SEXP R_igraph_write_graph_edgelist(SEXP, SEXP); -extern SEXP R_igraph_write_graph_gml(SEXP, SEXP, SEXP, SEXP); +extern SEXP R_igraph_write_graph_gml(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_write_graph_graphml(SEXP, SEXP, SEXP); extern SEXP R_igraph_write_graph_leda(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_write_graph_lgl(SEXP, SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_write_graph_ncol(SEXP, SEXP, SEXP, SEXP); extern SEXP R_igraph_write_graph_pajek(SEXP, SEXP); +extern SEXP Rx_igraph_add_env(SEXP); +extern SEXP Rx_igraph_add_myid_to_env(SEXP); +extern SEXP Rx_igraph_add_version_to_env(SEXP); +extern SEXP Rx_igraph_add_vertices(SEXP, SEXP); +extern SEXP Rx_igraph_address(SEXP); +extern SEXP Rx_igraph_adhesion(SEXP, SEXP); +extern SEXP Rx_igraph_adjacent_vertices(SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_arpack(SEXP, SEXP, SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_arpack_unpack_complex(SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_bibcoupling(SEXP, SEXP); +extern SEXP Rx_igraph_cocitation(SEXP, SEXP); +extern SEXP Rx_igraph_cohesion(SEXP, SEXP); +extern SEXP Rx_igraph_cohesive_blocks(SEXP); +extern SEXP Rx_igraph_community_to_membership2(SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_complementer(SEXP, SEXP); +extern SEXP Rx_igraph_compose(SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_constraint(SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_copy_env(SEXP); +extern SEXP Rx_igraph_copy_from(SEXP); +extern SEXP Rx_igraph_copy_to(SEXP); +extern SEXP Rx_igraph_coreness(SEXP, SEXP); +extern SEXP Rx_igraph_delete_edges(SEXP, SEXP); +extern SEXP Rx_igraph_delete_vertices(SEXP, SEXP); +extern SEXP Rx_igraph_difference(SEXP, SEXP); +extern SEXP Rx_igraph_disjoint_union(SEXP); +extern SEXP Rx_igraph_ecount(SEXP); +extern SEXP Rx_igraph_edge_connectivity(SEXP, SEXP); +extern SEXP Rx_igraph_edges(SEXP, SEXP); +extern SEXP Rx_igraph_famous(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); +extern SEXP Rx_igraph_get_attr_mode(SEXP, SEXP); +extern SEXP Rx_igraph_get_edge(SEXP, SEXP); +extern SEXP Rx_igraph_get_edgelist(SEXP, SEXP); +extern SEXP Rx_igraph_get_graph_id(SEXP); +extern SEXP Rx_igraph_girth(SEXP, SEXP); +extern SEXP Rx_igraph_graph_version(SEXP); +extern SEXP Rx_igraph_graphlets_candidate_basis(SEXP, SEXP); +extern SEXP Rx_igraph_graphlets_project(SEXP, SEXP, SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_i_levc_arp(SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_identical_graphs(SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_incident(SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_incident_edges(SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_independence_number(SEXP); +extern SEXP Rx_igraph_intersection(SEXP, SEXP); +extern SEXP Rx_igraph_is_directed(SEXP); +extern SEXP Rx_igraph_largest_independent_vertex_sets(SEXP); +extern SEXP Rx_igraph_make_weak_ref(SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_maximal_cliques_count(SEXP, SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_maximal_independent_vertex_sets(SEXP); +extern SEXP Rx_igraph_mincut(SEXP, SEXP); +extern SEXP Rx_igraph_mincut_value(SEXP, SEXP); +extern SEXP Rx_igraph_minimum_spanning_tree_prim(SEXP, SEXP); +extern SEXP Rx_igraph_minimum_spanning_tree_unweighted(SEXP); +extern SEXP Rx_igraph_mybracket2(SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_mybracket2_copy(SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_mybracket2_names(SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_mybracket2_set(SEXP, SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_no_components(SEXP, SEXP); +extern SEXP Rx_igraph_read_graph_dimacs(SEXP, SEXP); +extern SEXP Rx_igraph_read_graph_dl(SEXP, SEXP); +extern SEXP Rx_igraph_read_graph_gml(SEXP); +extern SEXP Rx_igraph_read_graph_graphdb(SEXP, SEXP); +extern SEXP Rx_igraph_read_graph_graphml(SEXP, SEXP); +extern SEXP Rx_igraph_read_graph_pajek(SEXP); +extern SEXP Rx_igraph_rewire(SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_running_mean(SEXP, SEXP); +extern SEXP Rx_igraph_set_verbose(SEXP); +extern SEXP Rx_igraph_topological_sorting(SEXP, SEXP); +extern SEXP Rx_igraph_transitivity_local_undirected_all(SEXP, SEXP); +extern SEXP Rx_igraph_union(SEXP, SEXP); +extern SEXP Rx_igraph_vertex_connectivity(SEXP, SEXP); +extern SEXP Rx_igraph_weak_ref_key(SEXP); +extern SEXP Rx_igraph_weak_ref_run_finalizer(SEXP); +extern SEXP Rx_igraph_weak_ref_value(SEXP); +extern SEXP Rx_igraph_write_graph_dot(SEXP, SEXP); +extern SEXP Rx_igraph_write_graph_edgelist(SEXP, SEXP); +extern SEXP Rx_igraph_write_graph_gml(SEXP, SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_write_graph_graphml(SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_write_graph_leda(SEXP, SEXP, SEXP, SEXP); +extern SEXP Rx_igraph_write_graph_pajek(SEXP, SEXP); extern SEXP UUID_gen(SEXP); static const R_CallMethodDef CallEntries[] = { {"R_igraph_add_edges", (DL_FUNC) &R_igraph_add_edges, 2}, {"R_igraph_add_edges_manual", (DL_FUNC) &R_igraph_add_edges_manual, 2}, - {"R_igraph_add_env", (DL_FUNC) &R_igraph_add_env, 1}, - {"R_igraph_add_myid_to_env", (DL_FUNC) &R_igraph_add_myid_to_env, 1}, - {"R_igraph_add_version_to_env", (DL_FUNC) &R_igraph_add_version_to_env, 1}, {"R_igraph_add_vertices", (DL_FUNC) &R_igraph_add_vertices, 2}, - {"R_igraph_address", (DL_FUNC) &R_igraph_address, 1}, {"R_igraph_adhesion", (DL_FUNC) &R_igraph_adhesion, 2}, {"R_igraph_adjacency", (DL_FUNC) &R_igraph_adjacency, 3}, {"R_igraph_adjacency_spectral_embedding", (DL_FUNC) &R_igraph_adjacency_spectral_embedding, 7}, - {"R_igraph_adjacent_vertices", (DL_FUNC) &R_igraph_adjacent_vertices, 3}, {"R_igraph_adjlist", (DL_FUNC) &R_igraph_adjlist, 3}, {"R_igraph_all_minimal_st_separators", (DL_FUNC) &R_igraph_all_minimal_st_separators, 1}, {"R_igraph_all_st_cuts", (DL_FUNC) &R_igraph_all_st_cuts, 3}, {"R_igraph_all_st_mincuts", (DL_FUNC) &R_igraph_all_st_mincuts, 4}, {"R_igraph_are_adjacent", (DL_FUNC) &R_igraph_are_adjacent, 3}, - {"R_igraph_arpack", (DL_FUNC) &R_igraph_arpack, 5}, - {"R_igraph_arpack_unpack_complex", (DL_FUNC) &R_igraph_arpack_unpack_complex, 3}, {"R_igraph_articulation_points", (DL_FUNC) &R_igraph_articulation_points, 1}, {"R_igraph_assortativity", (DL_FUNC) &R_igraph_assortativity, 5}, {"R_igraph_assortativity_degree", (DL_FUNC) &R_igraph_assortativity_degree, 2}, @@ -574,19 +616,15 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_community_leiden", (DL_FUNC) &R_igraph_community_leiden, 8}, {"R_igraph_community_multilevel", (DL_FUNC) &R_igraph_community_multilevel, 3}, {"R_igraph_community_optimal_modularity", (DL_FUNC) &R_igraph_community_optimal_modularity, 2}, - {"R_igraph_community_to_membership2", (DL_FUNC) &R_igraph_community_to_membership2, 3}, {"R_igraph_compare_communities", (DL_FUNC) &R_igraph_compare_communities, 3}, {"R_igraph_complementer", (DL_FUNC) &R_igraph_complementer, 2}, - {"R_igraph_compose", (DL_FUNC) &R_igraph_compose, 3}, + {"R_igraph_compose", (DL_FUNC) &R_igraph_compose, 2}, {"R_igraph_connect_neighborhood", (DL_FUNC) &R_igraph_connect_neighborhood, 3}, {"R_igraph_connected_components", (DL_FUNC) &R_igraph_connected_components, 2}, {"R_igraph_constraint", (DL_FUNC) &R_igraph_constraint, 3}, {"R_igraph_contract_vertices", (DL_FUNC) &R_igraph_contract_vertices, 3}, {"R_igraph_convex_hull_2d", (DL_FUNC) &R_igraph_convex_hull_2d, 1}, {"R_igraph_copy", (DL_FUNC) &R_igraph_copy, 1}, - {"R_igraph_copy_env", (DL_FUNC) &R_igraph_copy_env, 1}, - {"R_igraph_copy_from", (DL_FUNC) &R_igraph_copy_from, 1}, - {"R_igraph_copy_to", (DL_FUNC) &R_igraph_copy_to, 1}, {"R_igraph_coreness", (DL_FUNC) &R_igraph_coreness, 2}, {"R_igraph_correlated_game", (DL_FUNC) &R_igraph_correlated_game, 4}, {"R_igraph_correlated_pair_game", (DL_FUNC) &R_igraph_correlated_pair_game, 5}, @@ -615,7 +653,7 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_diameter", (DL_FUNC) &R_igraph_diameter, 4}, {"R_igraph_difference", (DL_FUNC) &R_igraph_difference, 2}, {"R_igraph_dim_select", (DL_FUNC) &R_igraph_dim_select, 1}, - {"R_igraph_disjoint_union", (DL_FUNC) &R_igraph_disjoint_union, 1}, + {"R_igraph_disjoint_union", (DL_FUNC) &R_igraph_disjoint_union, 2}, {"R_igraph_diversity", (DL_FUNC) &R_igraph_diversity, 3}, {"R_igraph_dominator_tree", (DL_FUNC) &R_igraph_dominator_tree, 3}, {"R_igraph_dot_product_game", (DL_FUNC) &R_igraph_dot_product_game, 2}, @@ -660,20 +698,14 @@ static const R_CallMethodDef CallEntries[] = { {"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_adjedgelist", (DL_FUNC) &R_igraph_get_adjedgelist, 3}, - {"R_igraph_get_adjlist", (DL_FUNC) &R_igraph_get_adjlist, 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}, {"R_igraph_get_all_shortest_paths_dijkstra", (DL_FUNC) &R_igraph_get_all_shortest_paths_dijkstra, 5}, {"R_igraph_get_all_simple_paths", (DL_FUNC) &R_igraph_get_all_simple_paths, 5}, - {"R_igraph_get_all_simple_paths_pp", (DL_FUNC) &R_igraph_get_all_simple_paths_pp, 1}, - {"R_igraph_get_attr_mode", (DL_FUNC) &R_igraph_get_attr_mode, 2}, {"R_igraph_get_biadjacency", (DL_FUNC) &R_igraph_get_biadjacency, 2}, {"R_igraph_get_diameter", (DL_FUNC) &R_igraph_get_diameter, 4}, - {"R_igraph_get_edge", (DL_FUNC) &R_igraph_get_edge, 2}, {"R_igraph_get_edgelist", (DL_FUNC) &R_igraph_get_edgelist, 2}, {"R_igraph_get_eids", (DL_FUNC) &R_igraph_get_eids, 4}, - {"R_igraph_get_graph_id", (DL_FUNC) &R_igraph_get_graph_id, 1}, {"R_igraph_get_isomorphisms_vf2", (DL_FUNC) &R_igraph_get_isomorphisms_vf2, 6}, {"R_igraph_get_isomorphisms_vf2_callback", (DL_FUNC) &R_igraph_get_isomorphisms_vf2_callback, 6}, {"R_igraph_get_k_shortest_paths", (DL_FUNC) &R_igraph_get_k_shortest_paths, 6}, @@ -688,16 +720,15 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_get_subisomorphisms_vf2", (DL_FUNC) &R_igraph_get_subisomorphisms_vf2, 6}, {"R_igraph_get_widest_path", (DL_FUNC) &R_igraph_get_widest_path, 5}, {"R_igraph_get_widest_paths", (DL_FUNC) &R_igraph_get_widest_paths, 5}, - {"R_igraph_girth", (DL_FUNC) &R_igraph_girth, 2}, + {"R_igraph_girth", (DL_FUNC) &R_igraph_girth, 1}, {"R_igraph_global_efficiency", (DL_FUNC) &R_igraph_global_efficiency, 3}, {"R_igraph_gomory_hu_tree", (DL_FUNC) &R_igraph_gomory_hu_tree, 2}, {"R_igraph_graph_center_dijkstra", (DL_FUNC) &R_igraph_graph_center_dijkstra, 3}, {"R_igraph_graph_count", (DL_FUNC) &R_igraph_graph_count, 2}, {"R_igraph_graph_power", (DL_FUNC) &R_igraph_graph_power, 3}, - {"R_igraph_graph_version", (DL_FUNC) &R_igraph_graph_version, 1}, {"R_igraph_graphlets", (DL_FUNC) &R_igraph_graphlets, 3}, {"R_igraph_graphlets_candidate_basis", (DL_FUNC) &R_igraph_graphlets_candidate_basis, 2}, - {"R_igraph_graphlets_project", (DL_FUNC) &R_igraph_graphlets_project, 5}, + {"R_igraph_graphlets_project", (DL_FUNC) &R_igraph_graphlets_project, 6}, {"R_igraph_grg_game", (DL_FUNC) &R_igraph_grg_game, 4}, {"R_igraph_growing_random_game", (DL_FUNC) &R_igraph_growing_random_game, 4}, {"R_igraph_harmonic_centrality_cutoff", (DL_FUNC) &R_igraph_harmonic_centrality_cutoff, 6}, @@ -717,10 +748,7 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_hsbm_list_game", (DL_FUNC) &R_igraph_hsbm_list_game, 5}, {"R_igraph_hub_and_authority_scores", (DL_FUNC) &R_igraph_hub_and_authority_scores, 4}, {"R_igraph_hypercube", (DL_FUNC) &R_igraph_hypercube, 2}, - {"R_igraph_i_levc_arp", (DL_FUNC) &R_igraph_i_levc_arp, 3}, - {"R_igraph_identical_graphs", (DL_FUNC) &R_igraph_identical_graphs, 3}, {"R_igraph_incident", (DL_FUNC) &R_igraph_incident, 3}, - {"R_igraph_incident_edges", (DL_FUNC) &R_igraph_incident_edges, 3}, {"R_igraph_independence_number", (DL_FUNC) &R_igraph_independence_number, 1}, {"R_igraph_independent_vertex_sets", (DL_FUNC) &R_igraph_independent_vertex_sets, 3}, {"R_igraph_induced_subgraph", (DL_FUNC) &R_igraph_induced_subgraph, 3}, @@ -809,11 +837,10 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_local_scan_k_ecount_them", (DL_FUNC) &R_igraph_local_scan_k_ecount_them, 5}, {"R_igraph_local_scan_neighborhood_ecount", (DL_FUNC) &R_igraph_local_scan_neighborhood_ecount, 3}, {"R_igraph_local_scan_subset_ecount", (DL_FUNC) &R_igraph_local_scan_subset_ecount, 3}, - {"R_igraph_make_weak_ref", (DL_FUNC) &R_igraph_make_weak_ref, 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, 4}, + {"R_igraph_maximal_cliques_count", (DL_FUNC) &R_igraph_maximal_cliques_count, 3}, {"R_igraph_maximal_cliques_file", (DL_FUNC) &R_igraph_maximal_cliques_file, 5}, {"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}, @@ -832,10 +859,6 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_motifs_randesu", (DL_FUNC) &R_igraph_motifs_randesu, 3}, {"R_igraph_motifs_randesu_estimate", (DL_FUNC) &R_igraph_motifs_randesu_estimate, 5}, {"R_igraph_motifs_randesu_no", (DL_FUNC) &R_igraph_motifs_randesu_no, 3}, - {"R_igraph_mybracket2", (DL_FUNC) &R_igraph_mybracket2, 3}, - {"R_igraph_mybracket2_copy", (DL_FUNC) &R_igraph_mybracket2_copy, 3}, - {"R_igraph_mybracket2_names", (DL_FUNC) &R_igraph_mybracket2_names, 3}, - {"R_igraph_mybracket2_set", (DL_FUNC) &R_igraph_mybracket2_set, 4}, {"R_igraph_mybracket3_set", (DL_FUNC) &R_igraph_mybracket3_set, 5}, {"R_igraph_mycielski_graph", (DL_FUNC) &R_igraph_mycielski_graph, 1}, {"R_igraph_mycielskian", (DL_FUNC) &R_igraph_mycielskian, 2}, @@ -843,7 +866,6 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_neighborhood_graphs", (DL_FUNC) &R_igraph_neighborhood_graphs, 5}, {"R_igraph_neighborhood_size", (DL_FUNC) &R_igraph_neighborhood_size, 5}, {"R_igraph_neighbors", (DL_FUNC) &R_igraph_neighbors, 3}, - {"R_igraph_no_components", (DL_FUNC) &R_igraph_no_components, 2}, {"R_igraph_path_graph", (DL_FUNC) &R_igraph_path_graph, 3}, {"R_igraph_path_length_hist", (DL_FUNC) &R_igraph_path_length_hist, 2}, {"R_igraph_permute_vertices", (DL_FUNC) &R_igraph_permute_vertices, 2}, @@ -859,7 +881,6 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_random_sample", (DL_FUNC) &R_igraph_random_sample, 3}, {"R_igraph_random_spanning_tree", (DL_FUNC) &R_igraph_random_spanning_tree, 2}, {"R_igraph_random_walk", (DL_FUNC) &R_igraph_random_walk, 6}, - {"R_igraph_read_graph_dimacs", (DL_FUNC) &R_igraph_read_graph_dimacs, 2}, {"R_igraph_read_graph_dl", (DL_FUNC) &R_igraph_read_graph_dl, 2}, {"R_igraph_read_graph_edgelist", (DL_FUNC) &R_igraph_read_graph_edgelist, 3}, {"R_igraph_read_graph_gml", (DL_FUNC) &R_igraph_read_graph_gml, 1}, @@ -889,7 +910,6 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_sample_sphere_surface", (DL_FUNC) &R_igraph_sample_sphere_surface, 4}, {"R_igraph_sample_sphere_volume", (DL_FUNC) &R_igraph_sample_sphere_volume, 4}, {"R_igraph_sbm_game", (DL_FUNC) &R_igraph_sbm_game, 5}, - {"R_igraph_set_verbose", (DL_FUNC) &R_igraph_set_verbose, 1}, {"R_igraph_shortest_paths", (DL_FUNC) &R_igraph_shortest_paths, 6}, {"R_igraph_similarity_dice", (DL_FUNC) &R_igraph_similarity_dice, 4}, {"R_igraph_similarity_dice_es", (DL_FUNC) &R_igraph_similarity_dice_es, 4}, @@ -934,7 +954,6 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_transitivity_avglocal_undirected", (DL_FUNC) &R_igraph_transitivity_avglocal_undirected, 2}, {"R_igraph_transitivity_barrat", (DL_FUNC) &R_igraph_transitivity_barrat, 4}, {"R_igraph_transitivity_local_undirected", (DL_FUNC) &R_igraph_transitivity_local_undirected, 3}, - {"R_igraph_transitivity_local_undirected_all", (DL_FUNC) &R_igraph_transitivity_local_undirected_all, 2}, {"R_igraph_transitivity_undirected", (DL_FUNC) &R_igraph_transitivity_undirected, 2}, {"R_igraph_tree_from_parent_vector", (DL_FUNC) &R_igraph_tree_from_parent_vector, 2}, {"R_igraph_tree_game", (DL_FUNC) &R_igraph_tree_game, 3}, @@ -955,9 +974,6 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_vs_nei", (DL_FUNC) &R_igraph_vs_nei, 4}, {"R_igraph_walktrap_community", (DL_FUNC) &R_igraph_walktrap_community, 6}, {"R_igraph_watts_strogatz_game", (DL_FUNC) &R_igraph_watts_strogatz_game, 6}, - {"R_igraph_weak_ref_key", (DL_FUNC) &R_igraph_weak_ref_key, 1}, - {"R_igraph_weak_ref_run_finalizer", (DL_FUNC) &R_igraph_weak_ref_run_finalizer, 1}, - {"R_igraph_weak_ref_value", (DL_FUNC) &R_igraph_weak_ref_value, 1}, {"R_igraph_weighted_adjacency", (DL_FUNC) &R_igraph_weighted_adjacency, 3}, {"R_igraph_weighted_clique_number", (DL_FUNC) &R_igraph_weighted_clique_number, 2}, {"R_igraph_weighted_cliques", (DL_FUNC) &R_igraph_weighted_cliques, 5}, @@ -967,12 +983,94 @@ static const R_CallMethodDef CallEntries[] = { {"R_igraph_write_graph_dimacs", (DL_FUNC) &R_igraph_write_graph_dimacs, 5}, {"R_igraph_write_graph_dot", (DL_FUNC) &R_igraph_write_graph_dot, 2}, {"R_igraph_write_graph_edgelist", (DL_FUNC) &R_igraph_write_graph_edgelist, 2}, - {"R_igraph_write_graph_gml", (DL_FUNC) &R_igraph_write_graph_gml, 4}, + {"R_igraph_write_graph_gml", (DL_FUNC) &R_igraph_write_graph_gml, 5}, {"R_igraph_write_graph_graphml", (DL_FUNC) &R_igraph_write_graph_graphml, 3}, {"R_igraph_write_graph_leda", (DL_FUNC) &R_igraph_write_graph_leda, 4}, {"R_igraph_write_graph_lgl", (DL_FUNC) &R_igraph_write_graph_lgl, 5}, {"R_igraph_write_graph_ncol", (DL_FUNC) &R_igraph_write_graph_ncol, 4}, {"R_igraph_write_graph_pajek", (DL_FUNC) &R_igraph_write_graph_pajek, 2}, + {"Rx_igraph_add_env", (DL_FUNC) &Rx_igraph_add_env, 1}, + {"Rx_igraph_add_myid_to_env", (DL_FUNC) &Rx_igraph_add_myid_to_env, 1}, + {"Rx_igraph_add_version_to_env", (DL_FUNC) &Rx_igraph_add_version_to_env, 1}, + {"Rx_igraph_add_vertices", (DL_FUNC) &Rx_igraph_add_vertices, 2}, + {"Rx_igraph_address", (DL_FUNC) &Rx_igraph_address, 1}, + {"Rx_igraph_adhesion", (DL_FUNC) &Rx_igraph_adhesion, 2}, + {"Rx_igraph_adjacent_vertices", (DL_FUNC) &Rx_igraph_adjacent_vertices, 3}, + {"Rx_igraph_arpack", (DL_FUNC) &Rx_igraph_arpack, 5}, + {"Rx_igraph_arpack_unpack_complex", (DL_FUNC) &Rx_igraph_arpack_unpack_complex, 3}, + {"Rx_igraph_bibcoupling", (DL_FUNC) &Rx_igraph_bibcoupling, 2}, + {"Rx_igraph_cocitation", (DL_FUNC) &Rx_igraph_cocitation, 2}, + {"Rx_igraph_cohesion", (DL_FUNC) &Rx_igraph_cohesion, 2}, + {"Rx_igraph_cohesive_blocks", (DL_FUNC) &Rx_igraph_cohesive_blocks, 1}, + {"Rx_igraph_community_to_membership2", (DL_FUNC) &Rx_igraph_community_to_membership2, 3}, + {"Rx_igraph_complementer", (DL_FUNC) &Rx_igraph_complementer, 2}, + {"Rx_igraph_compose", (DL_FUNC) &Rx_igraph_compose, 3}, + {"Rx_igraph_constraint", (DL_FUNC) &Rx_igraph_constraint, 3}, + {"Rx_igraph_copy_env", (DL_FUNC) &Rx_igraph_copy_env, 1}, + {"Rx_igraph_copy_from", (DL_FUNC) &Rx_igraph_copy_from, 1}, + {"Rx_igraph_copy_to", (DL_FUNC) &Rx_igraph_copy_to, 1}, + {"Rx_igraph_coreness", (DL_FUNC) &Rx_igraph_coreness, 2}, + {"Rx_igraph_delete_edges", (DL_FUNC) &Rx_igraph_delete_edges, 2}, + {"Rx_igraph_delete_vertices", (DL_FUNC) &Rx_igraph_delete_vertices, 2}, + {"Rx_igraph_difference", (DL_FUNC) &Rx_igraph_difference, 2}, + {"Rx_igraph_disjoint_union", (DL_FUNC) &Rx_igraph_disjoint_union, 1}, + {"Rx_igraph_ecount", (DL_FUNC) &Rx_igraph_ecount, 1}, + {"Rx_igraph_edge_connectivity", (DL_FUNC) &Rx_igraph_edge_connectivity, 2}, + {"Rx_igraph_edges", (DL_FUNC) &Rx_igraph_edges, 2}, + {"Rx_igraph_famous", (DL_FUNC) &Rx_igraph_famous, 1}, + {"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}, + {"Rx_igraph_get_attr_mode", (DL_FUNC) &Rx_igraph_get_attr_mode, 2}, + {"Rx_igraph_get_edge", (DL_FUNC) &Rx_igraph_get_edge, 2}, + {"Rx_igraph_get_edgelist", (DL_FUNC) &Rx_igraph_get_edgelist, 2}, + {"Rx_igraph_get_graph_id", (DL_FUNC) &Rx_igraph_get_graph_id, 1}, + {"Rx_igraph_girth", (DL_FUNC) &Rx_igraph_girth, 2}, + {"Rx_igraph_graph_version", (DL_FUNC) &Rx_igraph_graph_version, 1}, + {"Rx_igraph_graphlets_candidate_basis", (DL_FUNC) &Rx_igraph_graphlets_candidate_basis, 2}, + {"Rx_igraph_graphlets_project", (DL_FUNC) &Rx_igraph_graphlets_project, 5}, + {"Rx_igraph_i_levc_arp", (DL_FUNC) &Rx_igraph_i_levc_arp, 3}, + {"Rx_igraph_identical_graphs", (DL_FUNC) &Rx_igraph_identical_graphs, 3}, + {"Rx_igraph_incident", (DL_FUNC) &Rx_igraph_incident, 3}, + {"Rx_igraph_incident_edges", (DL_FUNC) &Rx_igraph_incident_edges, 3}, + {"Rx_igraph_independence_number", (DL_FUNC) &Rx_igraph_independence_number, 1}, + {"Rx_igraph_intersection", (DL_FUNC) &Rx_igraph_intersection, 2}, + {"Rx_igraph_is_directed", (DL_FUNC) &Rx_igraph_is_directed, 1}, + {"Rx_igraph_largest_independent_vertex_sets", (DL_FUNC) &Rx_igraph_largest_independent_vertex_sets, 1}, + {"Rx_igraph_make_weak_ref", (DL_FUNC) &Rx_igraph_make_weak_ref, 3}, + {"Rx_igraph_maximal_cliques_count", (DL_FUNC) &Rx_igraph_maximal_cliques_count, 4}, + {"Rx_igraph_maximal_independent_vertex_sets", (DL_FUNC) &Rx_igraph_maximal_independent_vertex_sets, 1}, + {"Rx_igraph_mincut", (DL_FUNC) &Rx_igraph_mincut, 2}, + {"Rx_igraph_mincut_value", (DL_FUNC) &Rx_igraph_mincut_value, 2}, + {"Rx_igraph_minimum_spanning_tree_prim", (DL_FUNC) &Rx_igraph_minimum_spanning_tree_prim, 2}, + {"Rx_igraph_minimum_spanning_tree_unweighted", (DL_FUNC) &Rx_igraph_minimum_spanning_tree_unweighted, 1}, + {"Rx_igraph_mybracket2", (DL_FUNC) &Rx_igraph_mybracket2, 3}, + {"Rx_igraph_mybracket2_copy", (DL_FUNC) &Rx_igraph_mybracket2_copy, 3}, + {"Rx_igraph_mybracket2_names", (DL_FUNC) &Rx_igraph_mybracket2_names, 3}, + {"Rx_igraph_mybracket2_set", (DL_FUNC) &Rx_igraph_mybracket2_set, 4}, + {"Rx_igraph_no_components", (DL_FUNC) &Rx_igraph_no_components, 2}, + {"Rx_igraph_read_graph_dimacs", (DL_FUNC) &Rx_igraph_read_graph_dimacs, 2}, + {"Rx_igraph_read_graph_dl", (DL_FUNC) &Rx_igraph_read_graph_dl, 2}, + {"Rx_igraph_read_graph_gml", (DL_FUNC) &Rx_igraph_read_graph_gml, 1}, + {"Rx_igraph_read_graph_graphdb", (DL_FUNC) &Rx_igraph_read_graph_graphdb, 2}, + {"Rx_igraph_read_graph_graphml", (DL_FUNC) &Rx_igraph_read_graph_graphml, 2}, + {"Rx_igraph_read_graph_pajek", (DL_FUNC) &Rx_igraph_read_graph_pajek, 1}, + {"Rx_igraph_rewire", (DL_FUNC) &Rx_igraph_rewire, 3}, + {"Rx_igraph_running_mean", (DL_FUNC) &Rx_igraph_running_mean, 2}, + {"Rx_igraph_set_verbose", (DL_FUNC) &Rx_igraph_set_verbose, 1}, + {"Rx_igraph_topological_sorting", (DL_FUNC) &Rx_igraph_topological_sorting, 2}, + {"Rx_igraph_transitivity_local_undirected_all", (DL_FUNC) &Rx_igraph_transitivity_local_undirected_all, 2}, + {"Rx_igraph_union", (DL_FUNC) &Rx_igraph_union, 2}, + {"Rx_igraph_vertex_connectivity", (DL_FUNC) &Rx_igraph_vertex_connectivity, 2}, + {"Rx_igraph_weak_ref_key", (DL_FUNC) &Rx_igraph_weak_ref_key, 1}, + {"Rx_igraph_weak_ref_run_finalizer", (DL_FUNC) &Rx_igraph_weak_ref_run_finalizer, 1}, + {"Rx_igraph_weak_ref_value", (DL_FUNC) &Rx_igraph_weak_ref_value, 1}, + {"Rx_igraph_write_graph_dot", (DL_FUNC) &Rx_igraph_write_graph_dot, 2}, + {"Rx_igraph_write_graph_edgelist", (DL_FUNC) &Rx_igraph_write_graph_edgelist, 2}, + {"Rx_igraph_write_graph_gml", (DL_FUNC) &Rx_igraph_write_graph_gml, 4}, + {"Rx_igraph_write_graph_graphml", (DL_FUNC) &Rx_igraph_write_graph_graphml, 3}, + {"Rx_igraph_write_graph_leda", (DL_FUNC) &Rx_igraph_write_graph_leda, 4}, + {"Rx_igraph_write_graph_pajek", (DL_FUNC) &Rx_igraph_write_graph_pajek, 2}, {"UUID_gen", (DL_FUNC) &UUID_gen, 1}, {"_igraph_getsphere", (DL_FUNC) &_igraph_getsphere, 7}, {"_igraph_igraph_hcass2", (DL_FUNC) &_igraph_igraph_hcass2, 3}, diff --git a/src/deps.mk b/src/deps.mk index ce053cfa71f..0a86fbcc7ab 100644 --- a/src/deps.mk +++ b/src/deps.mk @@ -5,4 +5,4 @@ include $(GLUE_CPP_SOURCES:.o=.dd) # Include only local dependencies for smaller footprint # Add trailing backslash and sort %.dd: %.d - sed -r 's/([^ ]) ([^ \\])/\1 \\\n \2/g' $< | sed -r '/^ ([/]|vendor|[.][.])/D;$$s/([^\\])$$/\1 \\/' | { echo "# Generated by deps.mk, do not edit by hand and do not add dependencies to system headers"; read -r header; printf '%s\n' "$$header"; LOCALE=C sort; } > $@ + sed -r 's/([^ ]) ([^ \\])/\1 \\\n \2/g' $< | sed -r '/^ +([/]|vendor|[.][.])/D;$$s/([^\\])$$/\1 \\/' | { echo "# Generated by deps.mk, do not edit by hand and do not add dependencies to system headers"; read -r header; printf '%s\n' "$$header"; LC_ALL=C sort; } > $@ diff --git a/src/rinterface.c b/src/rinterface.c index d1bd108609a..a2218afcc69 100644 --- a/src/rinterface.c +++ b/src/rinterface.c @@ -88,6 +88,34 @@ SEXP R_igraph_add_edges(SEXP graph, SEXP edges) { return(r_result); } +/*-------------------------------------------/ +/ igraph_add_vertices / +/-------------------------------------------*/ +SEXP R_igraph_add_vertices(SEXP graph, SEXP nv) { + /* Declarations */ + igraph_t c_graph; + igraph_integer_t c_nv; + + + SEXP r_result; + /* Convert input */ + R_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]; + /* Call igraph */ + IGRAPH_R_CHECK(igraph_add_vertices(&c_graph, c_nv, 0)); + + /* Convert output */ + PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + IGRAPH_I_DESTROY(&c_graph); + IGRAPH_FINALLY_CLEAN(1); + r_result = graph; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_copy / /-------------------------------------------*/ @@ -114,6 +142,64 @@ SEXP R_igraph_copy(SEXP from) { return(r_result); } +/*-------------------------------------------/ +/ igraph_delete_edges / +/-------------------------------------------*/ +SEXP R_igraph_delete_edges(SEXP graph, SEXP edges) { + /* Declarations */ + igraph_t c_graph; + igraph_es_t c_edges; + + SEXP r_result; + /* Convert input */ + R_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)); + /* Call igraph */ + IGRAPH_R_CHECK(igraph_delete_edges(&c_graph, c_edges)); + + /* Convert output */ + PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + IGRAPH_I_DESTROY(&c_graph); + IGRAPH_FINALLY_CLEAN(1); + igraph_vector_int_destroy(&c_edges_data); + igraph_es_destroy(&c_edges); + r_result = graph; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_delete_vertices / +/-------------------------------------------*/ +SEXP R_igraph_delete_vertices(SEXP graph, SEXP vertices) { + /* Declarations */ + igraph_t c_graph; + igraph_vs_t c_vertices; + + SEXP r_result; + /* Convert input */ + R_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); + /* Call igraph */ + IGRAPH_R_CHECK(igraph_delete_vertices(&c_graph, c_vertices)); + + /* Convert output */ + PROTECT(graph=R_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); + r_result = graph; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_delete_vertices_idx / /-------------------------------------------*/ @@ -188,6 +274,28 @@ SEXP R_igraph_vcount(SEXP graph) { return(r_result); } +/*-------------------------------------------/ +/ igraph_ecount / +/-------------------------------------------*/ +SEXP R_igraph_ecount(SEXP graph) { + /* Declarations */ + igraph_t c_graph; + igraph_integer_t c_result; + SEXP r_result; + /* Convert input */ + R_SEXP_to_igraph(graph, &c_graph); + /* Call igraph */ + c_result=igraph_ecount(&c_graph); + + /* Convert output */ + + PROTECT(r_result=NEW_NUMERIC(1)); + REAL(r_result)[0]=(double) c_result; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_neighbors / /-------------------------------------------*/ @@ -219,6 +327,28 @@ SEXP R_igraph_neighbors(SEXP graph, SEXP vid, SEXP mode) { return(r_result); } +/*-------------------------------------------/ +/ igraph_is_directed / +/-------------------------------------------*/ +SEXP R_igraph_is_directed(SEXP graph) { + /* Declarations */ + igraph_t c_graph; + igraph_bool_t c_result; + SEXP r_result; + /* Convert input */ + R_SEXP_to_igraph(graph, &c_graph); + /* Call igraph */ + c_result=igraph_is_directed(&c_graph); + + /* Convert output */ + + PROTECT(r_result=NEW_LOGICAL(1)); + LOGICAL(r_result)[0]=c_result; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_degree / /-------------------------------------------*/ @@ -256,6 +386,38 @@ SEXP R_igraph_degree(SEXP graph, SEXP vids, SEXP mode, SEXP loops) { return(r_result); } +/*-------------------------------------------/ +/ igraph_edges / +/-------------------------------------------*/ +SEXP R_igraph_edges(SEXP graph, SEXP eids) { + /* Declarations */ + igraph_t c_graph; + igraph_es_t c_eids; + igraph_vector_int_t c_edges; + SEXP edges; + + SEXP r_result; + /* Convert input */ + R_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(igraph_vector_int_init(&c_edges, 0)); + IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edges); + /* Call igraph */ + IGRAPH_R_CHECK(igraph_edges(&c_graph, c_eids, &c_edges)); + + /* Convert output */ + igraph_vector_int_destroy(&c_eids_data); + igraph_es_destroy(&c_eids); + PROTECT(edges=R_igraph_vector_int_to_SEXP(&c_edges)); + igraph_vector_int_destroy(&c_edges); + IGRAPH_FINALLY_CLEAN(1); + r_result = edges; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_get_all_eids_between / /-------------------------------------------*/ @@ -290,6 +452,37 @@ SEXP R_igraph_get_all_eids_between(SEXP graph, SEXP from, SEXP to, SEXP directed return(r_result); } +/*-------------------------------------------/ +/ igraph_incident / +/-------------------------------------------*/ +SEXP R_igraph_incident(SEXP graph, SEXP vid, SEXP mode) { + /* Declarations */ + igraph_t c_graph; + igraph_vector_int_t c_eids; + igraph_integer_t c_vid; + igraph_neimode_t c_mode; + SEXP eids; + + SEXP r_result; + /* Convert input */ + R_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]; + c_mode = (igraph_neimode_t) Rf_asInteger(mode); + /* Call igraph */ + 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)); + igraph_vector_int_destroy(&c_eids); + IGRAPH_FINALLY_CLEAN(1); + r_result = eids; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_adjacency / /-------------------------------------------*/ @@ -843,6 +1036,32 @@ SEXP R_igraph_kautz(SEXP m, SEXP n) { return(r_result); } +/*-------------------------------------------/ +/ igraph_famous / +/-------------------------------------------*/ +SEXP R_igraph_famous(SEXP name) { + /* Declarations */ + igraph_t c_graph; + const char* c_name; + SEXP graph; + + SEXP r_result; + /* Convert input */ + c_name = Rf_translateCharUTF8(STRING_ELT(name, 0)); + /* Call igraph */ + IGRAPH_R_CHECK(igraph_famous(&c_graph, c_name)); + + /* Convert output */ + IGRAPH_FINALLY(igraph_destroy, &c_graph); + PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + IGRAPH_I_DESTROY(&c_graph); + IGRAPH_FINALLY_CLEAN(1); + r_result = graph; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_lcf_vector / /-------------------------------------------*/ @@ -3217,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 = R_igraph_arpack_options_to_SEXP(&c_options1)); + PROTECT(options = Rx_igraph_arpack_options_to_SEXP(&c_options1)); } else { PROTECT(options); } @@ -3294,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 = R_igraph_arpack_options_to_SEXP(&c_options1)); + PROTECT(options = Rx_igraph_arpack_options_to_SEXP(&c_options1)); } else { PROTECT(options); } @@ -3311,6 +3530,35 @@ SEXP R_igraph_personalized_pagerank_vs(SEXP graph, SEXP algo, SEXP vids, SEXP di return(r_result); } +/*-------------------------------------------/ +/ igraph_rewire / +/-------------------------------------------*/ +SEXP R_igraph_rewire(SEXP rewire, SEXP n, SEXP mode) { + /* Declarations */ + igraph_t c_rewire; + igraph_integer_t c_n; + igraph_rewiring_t c_mode; + + SEXP r_result; + /* Convert input */ + R_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]; + c_mode = (igraph_rewiring_t) Rf_asInteger(mode); + /* Call igraph */ + IGRAPH_R_CHECK(igraph_rewire(&c_rewire, c_n, c_mode)); + + /* Convert output */ + PROTECT(rewire=R_igraph_to_SEXP(&c_rewire)); + IGRAPH_I_DESTROY(&c_rewire); + IGRAPH_FINALLY_CLEAN(1); + r_result = rewire; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_induced_subgraph / /-------------------------------------------*/ @@ -3722,6 +3970,42 @@ SEXP R_igraph_reciprocity(SEXP graph, SEXP ignore_loops, SEXP mode) { return(r_result); } +/*-------------------------------------------/ +/ igraph_constraint / +/-------------------------------------------*/ +SEXP R_igraph_constraint(SEXP graph, SEXP vids, SEXP weights) { + /* Declarations */ + igraph_t c_graph; + igraph_vector_t c_res; + igraph_vs_t c_vids; + igraph_vector_t c_weights; + SEXP res; + + SEXP r_result; + /* Convert input */ + R_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); + if (!Rf_isNull(weights)) { + R_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)); + igraph_vector_destroy(&c_res); + IGRAPH_FINALLY_CLEAN(1); + igraph_vector_int_destroy(&c_vids_data); + igraph_vs_destroy(&c_vids); + r_result = res; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_maxdegree / /-------------------------------------------*/ @@ -3812,33 +4096,62 @@ SEXP R_igraph_mean_degree(SEXP graph, SEXP loops) { } /*-------------------------------------------/ -/ igraph_feedback_arc_set / +/ igraph_topological_sorting / /-------------------------------------------*/ -SEXP R_igraph_feedback_arc_set(SEXP graph, SEXP weights, SEXP algo) { +SEXP R_igraph_topological_sorting(SEXP graph, SEXP mode) { /* Declarations */ igraph_t c_graph; - igraph_vector_int_t c_result; - igraph_vector_t c_weights; - igraph_fas_algorithm_t c_algo; - SEXP result; + igraph_vector_int_t c_res; + igraph_neimode_t c_mode; + SEXP res; SEXP r_result; /* Convert input */ R_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); - } - c_algo = (igraph_fas_algorithm_t) Rf_asInteger(algo); + 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); /* Call igraph */ - IGRAPH_R_CHECK(igraph_feedback_arc_set(&c_graph, &c_result, (Rf_isNull(weights) ? 0 : &c_weights), c_algo)); + IGRAPH_R_CHECK(igraph_topological_sorting(&c_graph, &c_res, c_mode)); /* Convert output */ - PROTECT(result=R_igraph_vector_int_to_SEXPp1(&c_result)); - igraph_vector_int_destroy(&c_result); + PROTECT(res=R_igraph_vector_int_to_SEXP(&c_res)); + igraph_vector_int_destroy(&c_res); IGRAPH_FINALLY_CLEAN(1); - r_result = result; + r_result = res; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_feedback_arc_set / +/-------------------------------------------*/ +SEXP R_igraph_feedback_arc_set(SEXP graph, SEXP weights, SEXP algo) { + /* Declarations */ + igraph_t c_graph; + igraph_vector_int_t c_result; + igraph_vector_t c_weights; + igraph_fas_algorithm_t c_algo; + SEXP result; + + SEXP r_result; + /* Convert input */ + R_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); + } + 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)); + igraph_vector_int_destroy(&c_result); + IGRAPH_FINALLY_CLEAN(1); + r_result = result; UNPROTECT(1); return(r_result); @@ -4118,6 +4431,44 @@ SEXP R_igraph_count_multiple(SEXP graph, SEXP es) { return(r_result); } +/*-------------------------------------------/ +/ igraph_girth / +/-------------------------------------------*/ +SEXP R_igraph_girth(SEXP graph) { + /* Declarations */ + igraph_t c_graph; + igraph_real_t c_girth; + igraph_vector_int_t c_circle; + SEXP girth; + SEXP circle; + + SEXP r_result, r_names; + /* Convert input */ + R_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 */ + IGRAPH_R_CHECK(igraph_girth(&c_graph, &c_girth, &c_circle)); + + /* Convert output */ + PROTECT(r_result=NEW_LIST(2)); + 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)); + igraph_vector_int_destroy(&c_circle); + IGRAPH_FINALLY_CLEAN(1); + SET_VECTOR_ELT(r_result, 0, girth); + SET_VECTOR_ELT(r_result, 1, circle); + SET_STRING_ELT(r_names, 0, Rf_mkChar("girth")); + SET_STRING_ELT(r_names, 1, Rf_mkChar("circle")); + SET_NAMES(r_result, r_names); + UNPROTECT(3); + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_is_perfect / /-------------------------------------------*/ @@ -4181,7 +4532,7 @@ SEXP R_igraph_eigenvector_centrality(SEXP graph, SEXP directed, SEXP scale, SEXP IGRAPH_FINALLY_CLEAN(1); PROTECT(value=NEW_NUMERIC(1)); REAL(value)[0]=c_value; - PROTECT(options=R_igraph_arpack_options_to_SEXP(&c_options)); + PROTECT(options=Rx_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); @@ -4238,7 +4589,7 @@ SEXP R_igraph_hub_and_authority_scores(SEXP graph, SEXP scale, SEXP weights, SEX IGRAPH_FINALLY_CLEAN(1); PROTECT(value=NEW_NUMERIC(1)); REAL(value)[0]=c_value; - PROTECT(options=R_igraph_arpack_options_to_SEXP(&c_options)); + PROTECT(options=Rx_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); @@ -4900,7 +5251,7 @@ SEXP R_igraph_centralization_eigenvector_centrality(SEXP graph, SEXP directed, S IGRAPH_FINALLY_CLEAN(1); PROTECT(value=NEW_NUMERIC(1)); REAL(value)[0]=c_value; - PROTECT(options=R_igraph_arpack_options_to_SEXP(&c_options)); + PROTECT(options=Rx_igraph_arpack_options_to_SEXP(&c_options)); PROTECT(centralization=NEW_NUMERIC(1)); REAL(centralization)[0]=c_centralization; PROTECT(theoretical_max=NEW_NUMERIC(1)); @@ -6718,6 +7069,37 @@ SEXP R_igraph_largest_cliques(SEXP graph) { return(r_result); } +/*-------------------------------------------/ +/ igraph_maximal_cliques_count / +/-------------------------------------------*/ +SEXP R_igraph_maximal_cliques_count(SEXP graph, SEXP min_size, SEXP max_size) { + /* Declarations */ + igraph_t c_graph; + igraph_integer_t c_no; + igraph_integer_t c_min_size; + igraph_integer_t c_max_size; + SEXP no; + + SEXP r_result; + /* Convert input */ + R_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]; + IGRAPH_R_CHECK_INT(max_size); + c_max_size = (igraph_integer_t) REAL(max_size)[0]; + /* Call igraph */ + IGRAPH_R_CHECK(igraph_maximal_cliques_count(&c_graph, &c_no, c_min_size, c_max_size)); + + /* Convert output */ + PROTECT(no=NEW_NUMERIC(1)); + REAL(no)[0]=(double) c_no; + r_result = no; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_maximal_cliques_hist / /-------------------------------------------*/ @@ -6904,6 +7286,85 @@ SEXP R_igraph_is_independent_vertex_set(SEXP graph, SEXP candidate) { return(r_result); } +/*-------------------------------------------/ +/ igraph_largest_independent_vertex_sets / +/-------------------------------------------*/ +SEXP R_igraph_largest_independent_vertex_sets(SEXP graph) { + /* Declarations */ + igraph_t c_graph; + igraph_vector_int_list_t c_res; + SEXP res; + + SEXP r_result; + /* Convert input */ + R_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)); + igraph_vector_int_list_destroy(&c_res); + IGRAPH_FINALLY_CLEAN(1); + r_result = res; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_maximal_independent_vertex_sets / +/-------------------------------------------*/ +SEXP R_igraph_maximal_independent_vertex_sets(SEXP graph) { + /* Declarations */ + igraph_t c_graph; + igraph_vector_int_list_t c_res; + SEXP res; + + SEXP r_result; + /* Convert input */ + R_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)); + igraph_vector_int_list_destroy(&c_res); + IGRAPH_FINALLY_CLEAN(1); + r_result = res; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_independence_number / +/-------------------------------------------*/ +SEXP R_igraph_independence_number(SEXP graph) { + /* Declarations */ + igraph_t c_graph; + igraph_integer_t c_no; + SEXP no; + + SEXP r_result; + /* Convert input */ + R_SEXP_to_igraph(graph, &c_graph); + c_no=0; + /* Call igraph */ + IGRAPH_R_CHECK(igraph_independence_number(&c_graph, &c_no)); + + /* Convert output */ + PROTECT(no=NEW_NUMERIC(1)); + REAL(no)[0]=(double) c_no; + r_result = no; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_layout_random / /-------------------------------------------*/ @@ -7596,6 +8057,70 @@ SEXP R_igraph_layout_align(SEXP graph, SEXP layout) { return(r_result); } +/*-------------------------------------------/ +/ igraph_cocitation / +/-------------------------------------------*/ +SEXP R_igraph_cocitation(SEXP graph, SEXP vids) { + /* Declarations */ + igraph_t c_graph; + igraph_matrix_t c_res; + igraph_vs_t c_vids; + SEXP res; + + SEXP r_result; + /* Convert input */ + R_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); + /* Call igraph */ + IGRAPH_R_CHECK(igraph_cocitation(&c_graph, &c_res, c_vids)); + + /* Convert output */ + PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + igraph_matrix_destroy(&c_res); + IGRAPH_FINALLY_CLEAN(1); + igraph_vector_int_destroy(&c_vids_data); + igraph_vs_destroy(&c_vids); + r_result = res; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_bibcoupling / +/-------------------------------------------*/ +SEXP R_igraph_bibcoupling(SEXP graph, SEXP vids) { + /* Declarations */ + igraph_t c_graph; + igraph_matrix_t c_res; + igraph_vs_t c_vids; + SEXP res; + + SEXP r_result; + /* Convert input */ + R_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); + /* Call igraph */ + IGRAPH_R_CHECK(igraph_bibcoupling(&c_graph, &c_res, c_vids)); + + /* Convert output */ + PROTECT(res=R_igraph_matrix_to_SEXP(&c_res)); + igraph_matrix_destroy(&c_res); + IGRAPH_FINALLY_CLEAN(1); + igraph_vector_int_destroy(&c_vids_data); + igraph_vs_destroy(&c_vids); + r_result = res; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_similarity_dice / /-------------------------------------------*/ @@ -8302,68 +8827,154 @@ SEXP R_igraph_community_infomap(SEXP graph, SEXP e_weights, SEXP v_weights, SEXP } /*-------------------------------------------/ -/ igraph_hrg_fit / +/ igraph_graphlets_candidate_basis / /-------------------------------------------*/ -SEXP R_igraph_hrg_fit(SEXP graph, SEXP hrg, SEXP start, SEXP steps) { +SEXP R_igraph_graphlets_candidate_basis(SEXP graph, SEXP weights) { /* Declarations */ igraph_t c_graph; - igraph_hrg_t c_hrg; - igraph_bool_t c_start; - igraph_integer_t c_steps; + igraph_vector_t c_weights; + igraph_vector_int_list_t c_cliques; + igraph_vector_t c_thresholds; + SEXP cliques; + SEXP thresholds; - SEXP r_result; + SEXP r_result, r_names; /* Convert input */ R_SEXP_to_igraph(graph, &c_graph); - IGRAPH_R_CHECK(R_SEXP_to_hrg_copy(hrg, &c_hrg)); - IGRAPH_FINALLY(igraph_hrg_destroy, &c_hrg); - IGRAPH_R_CHECK_BOOL(start); - c_start = LOGICAL(start)[0]; - IGRAPH_R_CHECK_INT(steps); - c_steps = (igraph_integer_t) REAL(steps)[0]; + if (!Rf_isNull(weights)) { + R_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); + IGRAPH_R_CHECK(igraph_vector_init(&c_thresholds, 0)); + IGRAPH_FINALLY(igraph_vector_destroy, &c_thresholds); /* Call igraph */ - IGRAPH_R_CHECK(igraph_hrg_fit(&c_graph, &c_hrg, c_start, c_steps)); + IGRAPH_R_CHECK(igraph_graphlets_candidate_basis(&c_graph, (Rf_isNull(weights) ? 0 : &c_weights), &c_cliques, &c_thresholds)); /* Convert output */ - PROTECT(hrg=R_igraph_hrg_to_SEXP(&c_hrg)); - igraph_hrg_destroy(&c_hrg); + PROTECT(r_result=NEW_LIST(2)); + PROTECT(r_names=NEW_CHARACTER(2)); + PROTECT(cliques=R_igraph_vector_int_list_to_SEXPp1(&c_cliques)); + igraph_vector_int_list_destroy(&c_cliques); IGRAPH_FINALLY_CLEAN(1); - r_result = hrg; + PROTECT(thresholds=R_igraph_vector_to_SEXP(&c_thresholds)); + igraph_vector_destroy(&c_thresholds); + IGRAPH_FINALLY_CLEAN(1); + SET_VECTOR_ELT(r_result, 0, cliques); + SET_VECTOR_ELT(r_result, 1, thresholds); + SET_STRING_ELT(r_names, 0, Rf_mkChar("cliques")); + SET_STRING_ELT(r_names, 1, Rf_mkChar("thresholds")); + SET_NAMES(r_result, r_names); + UNPROTECT(3); UNPROTECT(1); return(r_result); } /*-------------------------------------------/ -/ igraph_hrg_sample / +/ igraph_graphlets_project / /-------------------------------------------*/ -SEXP R_igraph_hrg_sample(SEXP hrg) { +SEXP R_igraph_graphlets_project(SEXP graph, SEXP weights, SEXP cliques, SEXP Muc, SEXP startMu, SEXP niter) { /* Declarations */ - igraph_hrg_t c_hrg; - igraph_t c_sample; - SEXP sample; + igraph_t c_graph; + igraph_vector_t c_weights; + igraph_vector_int_list_t c_cliques; + igraph_vector_t c_Muc; + igraph_bool_t c_startMu; + igraph_integer_t c_niter; SEXP r_result; /* Convert input */ - IGRAPH_R_CHECK(R_SEXP_to_hrg_copy(hrg, &c_hrg)); - IGRAPH_FINALLY(igraph_hrg_destroy, &c_hrg); + R_SEXP_to_igraph(graph, &c_graph); + if (!Rf_isNull(weights)) { + R_SEXP_to_vector(weights, &c_weights); + } + IGRAPH_R_CHECK(R_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_FINALLY(igraph_vector_destroy, &c_Muc); + IGRAPH_R_CHECK_BOOL(startMu); + c_startMu = LOGICAL(startMu)[0]; + IGRAPH_R_CHECK_INT(niter); + c_niter = (igraph_integer_t) REAL(niter)[0]; /* Call igraph */ - IGRAPH_R_CHECK(igraph_hrg_sample(&c_hrg, &c_sample)); + IGRAPH_R_CHECK(igraph_graphlets_project(&c_graph, (Rf_isNull(weights) ? 0 : &c_weights), &c_cliques, &c_Muc, c_startMu, c_niter)); /* Convert output */ - igraph_hrg_destroy(&c_hrg); + igraph_vector_int_list_destroy(&c_cliques); IGRAPH_FINALLY_CLEAN(1); - IGRAPH_FINALLY(igraph_destroy, &c_sample); - PROTECT(sample=R_igraph_to_SEXP(&c_sample)); - IGRAPH_I_DESTROY(&c_sample); + PROTECT(Muc=R_igraph_vector_to_SEXP(&c_Muc)); + igraph_vector_destroy(&c_Muc); IGRAPH_FINALLY_CLEAN(1); - r_result = sample; + r_result = Muc; UNPROTECT(1); return(r_result); } /*-------------------------------------------/ -/ igraph_hrg_sample_many / +/ igraph_hrg_fit / +/-------------------------------------------*/ +SEXP R_igraph_hrg_fit(SEXP graph, SEXP hrg, SEXP start, SEXP steps) { + /* Declarations */ + igraph_t c_graph; + igraph_hrg_t c_hrg; + igraph_bool_t c_start; + igraph_integer_t c_steps; + + SEXP r_result; + /* Convert input */ + R_SEXP_to_igraph(graph, &c_graph); + IGRAPH_R_CHECK(R_SEXP_to_hrg_copy(hrg, &c_hrg)); + IGRAPH_FINALLY(igraph_hrg_destroy, &c_hrg); + IGRAPH_R_CHECK_BOOL(start); + c_start = LOGICAL(start)[0]; + IGRAPH_R_CHECK_INT(steps); + c_steps = (igraph_integer_t) REAL(steps)[0]; + /* Call igraph */ + 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)); + igraph_hrg_destroy(&c_hrg); + IGRAPH_FINALLY_CLEAN(1); + r_result = hrg; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_hrg_sample / +/-------------------------------------------*/ +SEXP R_igraph_hrg_sample(SEXP hrg) { + /* Declarations */ + igraph_hrg_t c_hrg; + igraph_t c_sample; + SEXP sample; + + SEXP r_result; + /* Convert input */ + IGRAPH_R_CHECK(R_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)); + + /* Convert output */ + igraph_hrg_destroy(&c_hrg); + IGRAPH_FINALLY_CLEAN(1); + IGRAPH_FINALLY(igraph_destroy, &c_sample); + PROTECT(sample=R_igraph_to_SEXP(&c_sample)); + IGRAPH_I_DESTROY(&c_sample); + IGRAPH_FINALLY_CLEAN(1); + r_result = sample; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_hrg_sample_many / /-------------------------------------------*/ SEXP R_igraph_hrg_sample_many(SEXP hrg, SEXP num_samples) { /* Declarations */ @@ -8695,6 +9306,36 @@ SEXP R_igraph_get_adjacency_sparse(SEXP graph, SEXP type, SEXP weights, SEXP loo return(r_result); } +/*-------------------------------------------/ +/ igraph_get_edgelist / +/-------------------------------------------*/ +SEXP R_igraph_get_edgelist(SEXP graph, SEXP bycol) { + /* Declarations */ + igraph_t c_graph; + igraph_vector_int_t c_res; + igraph_bool_t c_bycol; + SEXP res; + + SEXP r_result; + /* Convert input */ + R_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); + c_bycol = LOGICAL(bycol)[0]; + /* Call igraph */ + IGRAPH_R_CHECK(igraph_get_edgelist(&c_graph, &c_res, c_bycol)); + + /* Convert output */ + PROTECT(res=R_igraph_vector_int_to_SEXP(&c_res)); + igraph_vector_int_destroy(&c_res); + IGRAPH_FINALLY_CLEAN(1); + r_result = res; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_get_stochastic / /-------------------------------------------*/ @@ -8806,18 +9447,297 @@ SEXP R_igraph_to_undirected(SEXP graph, SEXP mode, SEXP edge_attr_comb) { R_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)); + IGRAPH_R_CHECK(igraph_to_undirected(&c_graph, c_mode, &c_edge_attr_comb)); + + /* Convert output */ + PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + IGRAPH_I_DESTROY(&c_graph); + IGRAPH_FINALLY_CLEAN(1); + igraph_attribute_combination_destroy(&c_edge_attr_comb); + IGRAPH_FINALLY_CLEAN(1); + r_result = graph; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_read_graph_pajek / +/-------------------------------------------*/ +SEXP R_igraph_read_graph_pajek(SEXP instream) { + /* Declarations */ + igraph_t c_graph; + FILE* c_instream; + SEXP graph; + + SEXP r_result; + /* Convert input */ + c_instream = R_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)); + IGRAPH_I_DESTROY(&c_graph); + IGRAPH_FINALLY_CLEAN(1); + r_result = graph; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_read_graph_graphml / +/-------------------------------------------*/ +SEXP R_igraph_read_graph_graphml(SEXP instream, SEXP index) { + /* Declarations */ + igraph_t c_graph; + FILE* c_instream; + igraph_integer_t c_index; + SEXP graph; + + SEXP r_result; + /* Convert input */ + c_instream = R_igraph_fopen_read(instream); + IGRAPH_FINALLY(fclose, c_instream); + IGRAPH_R_CHECK_INT(index); + c_index = (igraph_integer_t) REAL(index)[0]; + /* Call igraph */ + IGRAPH_R_CHECK(igraph_read_graph_graphml(&c_graph, c_instream, c_index)); + + /* Convert output */ + IGRAPH_FINALLY(igraph_destroy, &c_graph); + PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + IGRAPH_I_DESTROY(&c_graph); + IGRAPH_FINALLY_CLEAN(1); + r_result = graph; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_read_graph_graphdb / +/-------------------------------------------*/ +SEXP R_igraph_read_graph_graphdb(SEXP instream, SEXP directed) { + /* Declarations */ + igraph_t c_graph; + FILE* c_instream; + igraph_bool_t c_directed; + SEXP graph; + + SEXP r_result; + /* Convert input */ + c_instream = R_igraph_fopen_read(instream); + IGRAPH_FINALLY(fclose, c_instream); + IGRAPH_R_CHECK_BOOL(directed); + c_directed = LOGICAL(directed)[0]; + /* Call igraph */ + IGRAPH_R_CHECK(igraph_read_graph_graphdb(&c_graph, c_instream, c_directed)); + + /* Convert output */ + IGRAPH_FINALLY(igraph_destroy, &c_graph); + PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + IGRAPH_I_DESTROY(&c_graph); + IGRAPH_FINALLY_CLEAN(1); + r_result = graph; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_read_graph_gml / +/-------------------------------------------*/ +SEXP R_igraph_read_graph_gml(SEXP instream) { + /* Declarations */ + igraph_t c_graph; + FILE* c_instream; + SEXP graph; + + SEXP r_result; + /* Convert input */ + c_instream = R_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)); + IGRAPH_I_DESTROY(&c_graph); + IGRAPH_FINALLY_CLEAN(1); + r_result = graph; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_read_graph_dl / +/-------------------------------------------*/ +SEXP R_igraph_read_graph_dl(SEXP instream, SEXP directed) { + /* Declarations */ + igraph_t c_graph; + FILE* c_instream; + igraph_bool_t c_directed; + SEXP graph; + + SEXP r_result; + /* Convert input */ + c_instream = R_igraph_fopen_read(instream); + IGRAPH_FINALLY(fclose, c_instream); + IGRAPH_R_CHECK_BOOL(directed); + c_directed = LOGICAL(directed)[0]; + /* Call igraph */ + IGRAPH_R_CHECK(igraph_read_graph_dl(&c_graph, c_instream, c_directed)); + + /* Convert output */ + IGRAPH_FINALLY(igraph_destroy, &c_graph); + PROTECT(graph=R_igraph_to_SEXP(&c_graph)); + IGRAPH_I_DESTROY(&c_graph); + IGRAPH_FINALLY_CLEAN(1); + r_result = graph; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_write_graph_edgelist / +/-------------------------------------------*/ +SEXP R_igraph_write_graph_edgelist(SEXP graph, SEXP outstream) { + /* Declarations */ + igraph_t c_graph; + FILE* c_outstream; + + /* Convert input */ + R_SEXP_to_igraph(graph, &c_graph); + /* Call igraph */ + IGRAPH_R_CHECK(igraph_write_graph_edgelist(&c_graph, c_outstream)); + + /* Convert output */ + + + + return(R_NilValue); +} + +/*-------------------------------------------/ +/ igraph_write_graph_leda / +/-------------------------------------------*/ +SEXP R_igraph_write_graph_leda(SEXP graph, SEXP outstream, SEXP names, SEXP weights) { + /* Declarations */ + igraph_t c_graph; + FILE* c_outstream; + const char* c_names; + const char* c_weights; + + /* Convert input */ + R_SEXP_to_igraph(graph, &c_graph); + c_names = Rf_translateCharUTF8(STRING_ELT(names, 0)); + c_weights = Rf_translateCharUTF8(STRING_ELT(weights, 0)); + /* Call igraph */ + IGRAPH_R_CHECK(igraph_write_graph_leda(&c_graph, c_outstream, c_names, c_weights)); + + /* Convert output */ + + + + return(R_NilValue); +} + +/*-------------------------------------------/ +/ igraph_write_graph_graphml / +/-------------------------------------------*/ +SEXP R_igraph_write_graph_graphml(SEXP graph, SEXP outstream, SEXP prefixattr) { + /* Declarations */ + igraph_t c_graph; + FILE* c_outstream; + igraph_bool_t c_prefixattr; + + /* Convert input */ + R_SEXP_to_igraph(graph, &c_graph); + IGRAPH_R_CHECK_BOOL(prefixattr); + c_prefixattr = LOGICAL(prefixattr)[0]; + /* Call igraph */ + IGRAPH_R_CHECK(igraph_write_graph_graphml(&c_graph, c_outstream, c_prefixattr)); + + /* Convert output */ + + + + return(R_NilValue); +} + +/*-------------------------------------------/ +/ igraph_write_graph_pajek / +/-------------------------------------------*/ +SEXP R_igraph_write_graph_pajek(SEXP graph, SEXP outstream) { + /* Declarations */ + igraph_t c_graph; + FILE* c_outstream; + + /* Convert input */ + R_SEXP_to_igraph(graph, &c_graph); + /* Call igraph */ + IGRAPH_R_CHECK(igraph_write_graph_pajek(&c_graph, c_outstream)); + + /* Convert output */ + + + + return(R_NilValue); +} + +/*-------------------------------------------/ +/ igraph_write_graph_gml / +/-------------------------------------------*/ +SEXP R_igraph_write_graph_gml(SEXP graph, SEXP outstream, SEXP options, SEXP id, SEXP creator) { + /* Declarations */ + igraph_t c_graph; + FILE* c_outstream; + igraph_write_gml_sw_t c_options; + igraph_vector_t c_id; + const char* c_creator; + + /* Convert input */ + R_SEXP_to_igraph(graph, &c_graph); + c_options = (igraph_write_gml_sw_t) Rf_asInteger(options); + R_SEXP_to_vector(id, &c_id); + if (!Rf_isNull(creator)) { + c_creator = Rf_translateCharUTF8(STRING_ELT(creator, 0)); + } + /* Call igraph */ + IGRAPH_R_CHECK(igraph_write_graph_gml(&c_graph, c_outstream, c_options, &c_id, (Rf_isNull(creator) ? 0 : c_creator))); + + /* Convert output */ + + + + return(R_NilValue); +} + +/*-------------------------------------------/ +/ igraph_write_graph_dot / +/-------------------------------------------*/ +SEXP R_igraph_write_graph_dot(SEXP graph, SEXP outstream) { + /* Declarations */ + igraph_t c_graph; + FILE* c_outstream; + + /* Convert input */ + R_SEXP_to_igraph(graph, &c_graph); + /* Call igraph */ + IGRAPH_R_CHECK(igraph_write_graph_dot(&c_graph, c_outstream)); /* Convert output */ - PROTECT(graph=R_igraph_to_SEXP(&c_graph)); - IGRAPH_I_DESTROY(&c_graph); - IGRAPH_FINALLY_CLEAN(1); - igraph_attribute_combination_destroy(&c_edge_attr_comb); - IGRAPH_FINALLY_CLEAN(1); - r_result = graph; - UNPROTECT(1); - return(r_result); + + + return(R_NilValue); } /*-------------------------------------------/ @@ -9364,6 +10284,34 @@ SEXP R_igraph_list_triangles(SEXP graph) { return(r_result); } +/*-------------------------------------------/ +/ igraph_disjoint_union / +/-------------------------------------------*/ +SEXP R_igraph_disjoint_union(SEXP left, SEXP right) { + /* Declarations */ + igraph_t c_res; + igraph_t c_left; + igraph_t c_right; + SEXP res; + + SEXP r_result; + /* Convert input */ + R_SEXP_to_igraph(left, &c_left); + R_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)); + IGRAPH_I_DESTROY(&c_res); + IGRAPH_FINALLY_CLEAN(1); + r_result = res; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_join / /-------------------------------------------*/ @@ -9392,6 +10340,216 @@ SEXP R_igraph_join(SEXP left, SEXP right) { return(r_result); } +/*-------------------------------------------/ +/ igraph_union / +/-------------------------------------------*/ +SEXP R_igraph_union(SEXP left, SEXP right) { + /* Declarations */ + igraph_t c_res; + igraph_t c_left; + igraph_t c_right; + igraph_vector_int_t c_edge_map_left; + igraph_vector_int_t c_edge_map_right; + SEXP res; + SEXP edge_map_left; + SEXP edge_map_right; + + SEXP r_result, r_names; + /* Convert input */ + R_SEXP_to_igraph(left, &c_left); + R_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)); + IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_map_right); + /* Call igraph */ + IGRAPH_R_CHECK(igraph_union(&c_res, &c_left, &c_right, &c_edge_map_left, &c_edge_map_right)); + + /* Convert output */ + 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)); + IGRAPH_I_DESTROY(&c_res); + IGRAPH_FINALLY_CLEAN(1); + PROTECT(edge_map_left=R_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)); + igraph_vector_int_destroy(&c_edge_map_right); + IGRAPH_FINALLY_CLEAN(1); + SET_VECTOR_ELT(r_result, 0, res); + SET_VECTOR_ELT(r_result, 1, edge_map_left); + SET_VECTOR_ELT(r_result, 2, edge_map_right); + SET_STRING_ELT(r_names, 0, Rf_mkChar("res")); + SET_STRING_ELT(r_names, 1, Rf_mkChar("edge_map_left")); + SET_STRING_ELT(r_names, 2, Rf_mkChar("edge_map_right")); + SET_NAMES(r_result, r_names); + UNPROTECT(4); + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_intersection / +/-------------------------------------------*/ +SEXP R_igraph_intersection(SEXP left, SEXP right) { + /* Declarations */ + igraph_t c_res; + igraph_t c_left; + igraph_t c_right; + igraph_vector_int_t c_edge_map_left; + igraph_vector_int_t c_edge_map_right; + SEXP res; + SEXP edge_map_left; + SEXP edge_map_right; + + SEXP r_result, r_names; + /* Convert input */ + R_SEXP_to_igraph(left, &c_left); + R_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)); + IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_map_right); + /* Call igraph */ + IGRAPH_R_CHECK(igraph_intersection(&c_res, &c_left, &c_right, &c_edge_map_left, &c_edge_map_right)); + + /* Convert output */ + 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)); + IGRAPH_I_DESTROY(&c_res); + IGRAPH_FINALLY_CLEAN(1); + PROTECT(edge_map_left=R_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)); + igraph_vector_int_destroy(&c_edge_map_right); + IGRAPH_FINALLY_CLEAN(1); + SET_VECTOR_ELT(r_result, 0, res); + SET_VECTOR_ELT(r_result, 1, edge_map_left); + SET_VECTOR_ELT(r_result, 2, edge_map_right); + SET_STRING_ELT(r_names, 0, Rf_mkChar("res")); + SET_STRING_ELT(r_names, 1, Rf_mkChar("edge_map_left")); + SET_STRING_ELT(r_names, 2, Rf_mkChar("edge_map_right")); + SET_NAMES(r_result, r_names); + UNPROTECT(4); + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_difference / +/-------------------------------------------*/ +SEXP R_igraph_difference(SEXP orig, SEXP sub) { + /* Declarations */ + igraph_t c_res; + igraph_t c_orig; + igraph_t c_sub; + SEXP res; + + SEXP r_result; + /* Convert input */ + R_SEXP_to_igraph(orig, &c_orig); + R_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)); + IGRAPH_I_DESTROY(&c_res); + IGRAPH_FINALLY_CLEAN(1); + r_result = res; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_complementer / +/-------------------------------------------*/ +SEXP R_igraph_complementer(SEXP graph, SEXP loops) { + /* Declarations */ + igraph_t c_res; + igraph_t c_graph; + igraph_bool_t c_loops; + SEXP res; + + SEXP r_result; + /* Convert input */ + R_SEXP_to_igraph(graph, &c_graph); + IGRAPH_R_CHECK_BOOL(loops); + c_loops = LOGICAL(loops)[0]; + /* Call igraph */ + IGRAPH_R_CHECK(igraph_complementer(&c_res, &c_graph, c_loops)); + + /* Convert output */ + IGRAPH_FINALLY(igraph_destroy, &c_res); + PROTECT(res=R_igraph_to_SEXP(&c_res)); + IGRAPH_I_DESTROY(&c_res); + IGRAPH_FINALLY_CLEAN(1); + r_result = res; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_compose / +/-------------------------------------------*/ +SEXP R_igraph_compose(SEXP g1, SEXP g2) { + /* Declarations */ + igraph_t c_res; + igraph_t c_g1; + igraph_t c_g2; + igraph_vector_int_t c_edge_map1; + igraph_vector_int_t c_edge_map2; + SEXP res; + SEXP edge_map1; + SEXP edge_map2; + + SEXP r_result, r_names; + /* Convert input */ + R_SEXP_to_igraph(g1, &c_g1); + R_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)); + IGRAPH_FINALLY(igraph_vector_int_destroy, &c_edge_map2); + /* Call igraph */ + IGRAPH_R_CHECK(igraph_compose(&c_res, &c_g1, &c_g2, &c_edge_map1, &c_edge_map2)); + + /* Convert output */ + 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)); + IGRAPH_I_DESTROY(&c_res); + IGRAPH_FINALLY_CLEAN(1); + PROTECT(edge_map1=R_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)); + igraph_vector_int_destroy(&c_edge_map2); + IGRAPH_FINALLY_CLEAN(1); + SET_VECTOR_ELT(r_result, 0, res); + SET_VECTOR_ELT(r_result, 1, edge_map1); + SET_VECTOR_ELT(r_result, 2, edge_map2); + SET_STRING_ELT(r_names, 0, Rf_mkChar("res")); + SET_STRING_ELT(r_names, 1, Rf_mkChar("edge_map1")); + SET_STRING_ELT(r_names, 2, Rf_mkChar("edge_map2")); + SET_NAMES(r_result, r_names); + UNPROTECT(4); + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_induced_subgraph_map / /-------------------------------------------*/ @@ -9592,68 +10750,156 @@ SEXP R_igraph_maxflow(SEXP graph, SEXP source, SEXP target, SEXP capacity) { igraph_vector_int_t c_cut; igraph_vector_int_t c_partition1; igraph_vector_int_t c_partition2; - igraph_integer_t c_source; - igraph_integer_t c_target; + igraph_integer_t c_source; + igraph_integer_t c_target; + igraph_vector_t c_capacity; + igraph_maxflow_stats_t c_stats; + SEXP value; + SEXP flow; + SEXP cut; + SEXP partition1; + SEXP partition2; + SEXP stats; + + SEXP r_result, r_names; + /* Convert input */ + R_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)); + IGRAPH_FINALLY(igraph_vector_int_destroy, &c_cut); + 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)); + IGRAPH_FINALLY(igraph_vector_int_destroy, &c_partition2); + 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); + } + /* 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)); + + /* Convert output */ + PROTECT(r_result=NEW_LIST(6)); + 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)); + igraph_vector_destroy(&c_flow); + IGRAPH_FINALLY_CLEAN(1); + PROTECT(cut=R_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)); + igraph_vector_int_destroy(&c_partition1); + IGRAPH_FINALLY_CLEAN(1); + PROTECT(partition2=R_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)); + SET_VECTOR_ELT(r_result, 0, value); + SET_VECTOR_ELT(r_result, 1, flow); + SET_VECTOR_ELT(r_result, 2, cut); + SET_VECTOR_ELT(r_result, 3, partition1); + SET_VECTOR_ELT(r_result, 4, partition2); + SET_VECTOR_ELT(r_result, 5, stats); + SET_STRING_ELT(r_names, 0, Rf_mkChar("value")); + SET_STRING_ELT(r_names, 1, Rf_mkChar("flow")); + SET_STRING_ELT(r_names, 2, Rf_mkChar("cut")); + SET_STRING_ELT(r_names, 3, Rf_mkChar("partition1")); + SET_STRING_ELT(r_names, 4, Rf_mkChar("partition2")); + SET_STRING_ELT(r_names, 5, Rf_mkChar("stats")); + SET_NAMES(r_result, r_names); + UNPROTECT(7); + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_mincut / +/-------------------------------------------*/ +SEXP R_igraph_mincut(SEXP graph, SEXP capacity) { + /* Declarations */ + igraph_t c_graph; + igraph_real_t c_value; + igraph_vector_int_t c_partition1; + igraph_vector_int_t c_partition2; + igraph_vector_int_t c_cut; igraph_vector_t c_capacity; - igraph_maxflow_stats_t c_stats; SEXP value; - SEXP flow; - SEXP cut; SEXP partition1; SEXP partition2; - SEXP stats; + SEXP cut; SEXP r_result, r_names; /* Convert input */ R_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)); - IGRAPH_FINALLY(igraph_vector_int_destroy, &c_cut); 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)); IGRAPH_FINALLY(igraph_vector_int_destroy, &c_partition2); - c_source = (igraph_integer_t) REAL(source)[0]; - c_target = (igraph_integer_t) REAL(target)[0]; + 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); } /* 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)); + IGRAPH_R_CHECK(igraph_mincut(&c_graph, &c_value, &c_partition1, &c_partition2, &c_cut, (Rf_isNull(capacity) ? 0 : &c_capacity))); /* Convert output */ - PROTECT(r_result=NEW_LIST(6)); - PROTECT(r_names=NEW_CHARACTER(6)); + PROTECT(r_result=NEW_LIST(4)); + PROTECT(r_names=NEW_CHARACTER(4)); PROTECT(value=NEW_NUMERIC(1)); REAL(value)[0]=c_value; - PROTECT(flow=R_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)); - igraph_vector_int_destroy(&c_cut); - IGRAPH_FINALLY_CLEAN(1); PROTECT(partition1=R_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)); igraph_vector_int_destroy(&c_partition2); IGRAPH_FINALLY_CLEAN(1); - PROTECT(stats=R_igraph_maxflow_stats_to_SEXP(&c_stats)); + PROTECT(cut=R_igraph_vector_int_to_SEXPp1(&c_cut)); + igraph_vector_int_destroy(&c_cut); + IGRAPH_FINALLY_CLEAN(1); SET_VECTOR_ELT(r_result, 0, value); - SET_VECTOR_ELT(r_result, 1, flow); - SET_VECTOR_ELT(r_result, 2, cut); - SET_VECTOR_ELT(r_result, 3, partition1); - SET_VECTOR_ELT(r_result, 4, partition2); - SET_VECTOR_ELT(r_result, 5, stats); + SET_VECTOR_ELT(r_result, 1, partition1); + SET_VECTOR_ELT(r_result, 2, partition2); + SET_VECTOR_ELT(r_result, 3, cut); SET_STRING_ELT(r_names, 0, Rf_mkChar("value")); - SET_STRING_ELT(r_names, 1, Rf_mkChar("flow")); - SET_STRING_ELT(r_names, 2, Rf_mkChar("cut")); - SET_STRING_ELT(r_names, 3, Rf_mkChar("partition1")); - SET_STRING_ELT(r_names, 4, Rf_mkChar("partition2")); - SET_STRING_ELT(r_names, 5, Rf_mkChar("stats")); + SET_STRING_ELT(r_names, 1, Rf_mkChar("partition1")); + SET_STRING_ELT(r_names, 2, Rf_mkChar("partition2")); + SET_STRING_ELT(r_names, 3, Rf_mkChar("cut")); SET_NAMES(r_result, r_names); - UNPROTECT(7); + UNPROTECT(5); + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_mincut_value / +/-------------------------------------------*/ +SEXP R_igraph_mincut_value(SEXP graph, SEXP capacity) { + /* Declarations */ + igraph_t c_graph; + igraph_real_t c_res; + igraph_vector_t c_capacity; + SEXP res; + + SEXP r_result; + /* Convert input */ + R_SEXP_to_igraph(graph, &c_graph); + if (!Rf_isNull(capacity)) { + R_SEXP_to_vector(capacity, &c_capacity); + } + /* Call igraph */ + IGRAPH_R_CHECK(igraph_mincut_value(&c_graph, &c_res, (Rf_isNull(capacity) ? 0 : &c_capacity))); + + /* Convert output */ + PROTECT(res=NEW_NUMERIC(1)); + REAL(res)[0]=c_res; + r_result = res; UNPROTECT(1); return(r_result); @@ -9798,6 +11044,118 @@ SEXP R_igraph_st_mincut(SEXP graph, SEXP source, SEXP target, SEXP capacity) { return(r_result); } +/*-------------------------------------------/ +/ igraph_vertex_connectivity / +/-------------------------------------------*/ +SEXP R_igraph_vertex_connectivity(SEXP graph, SEXP checks) { + /* Declarations */ + igraph_t c_graph; + igraph_integer_t c_res; + igraph_bool_t c_checks; + SEXP res; + + SEXP r_result; + /* Convert input */ + R_SEXP_to_igraph(graph, &c_graph); + c_res=0; + IGRAPH_R_CHECK_BOOL(checks); + c_checks = LOGICAL(checks)[0]; + /* Call igraph */ + IGRAPH_R_CHECK(igraph_vertex_connectivity(&c_graph, &c_res, c_checks)); + + /* Convert output */ + PROTECT(res=NEW_NUMERIC(1)); + REAL(res)[0]=(double) c_res; + r_result = res; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_edge_connectivity / +/-------------------------------------------*/ +SEXP R_igraph_edge_connectivity(SEXP graph, SEXP checks) { + /* Declarations */ + igraph_t c_graph; + igraph_integer_t c_res; + igraph_bool_t c_checks; + SEXP res; + + SEXP r_result; + /* Convert input */ + R_SEXP_to_igraph(graph, &c_graph); + c_res=0; + IGRAPH_R_CHECK_BOOL(checks); + c_checks = LOGICAL(checks)[0]; + /* Call igraph */ + IGRAPH_R_CHECK(igraph_edge_connectivity(&c_graph, &c_res, c_checks)); + + /* Convert output */ + PROTECT(res=NEW_NUMERIC(1)); + REAL(res)[0]=(double) c_res; + r_result = res; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_adhesion / +/-------------------------------------------*/ +SEXP R_igraph_adhesion(SEXP graph, SEXP checks) { + /* Declarations */ + igraph_t c_graph; + igraph_integer_t c_res; + igraph_bool_t c_checks; + SEXP res; + + SEXP r_result; + /* Convert input */ + R_SEXP_to_igraph(graph, &c_graph); + c_res=0; + IGRAPH_R_CHECK_BOOL(checks); + c_checks = LOGICAL(checks)[0]; + /* Call igraph */ + IGRAPH_R_CHECK(igraph_adhesion(&c_graph, &c_res, c_checks)); + + /* Convert output */ + PROTECT(res=NEW_NUMERIC(1)); + REAL(res)[0]=(double) c_res; + r_result = res; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_cohesion / +/-------------------------------------------*/ +SEXP R_igraph_cohesion(SEXP graph, SEXP checks) { + /* Declarations */ + igraph_t c_graph; + igraph_integer_t c_res; + igraph_bool_t c_checks; + SEXP res; + + SEXP r_result; + /* Convert input */ + R_SEXP_to_igraph(graph, &c_graph); + c_res=0; + IGRAPH_R_CHECK_BOOL(checks); + c_checks = LOGICAL(checks)[0]; + /* Call igraph */ + IGRAPH_R_CHECK(igraph_cohesion(&c_graph, &c_res, c_checks)); + + /* Convert output */ + PROTECT(res=NEW_NUMERIC(1)); + REAL(res)[0]=(double) c_res; + r_result = res; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_dominator_tree / /-------------------------------------------*/ @@ -10104,6 +11462,93 @@ SEXP R_igraph_minimum_size_separators(SEXP graph) { return(r_result); } +/*-------------------------------------------/ +/ igraph_cohesive_blocks / +/-------------------------------------------*/ +SEXP R_igraph_cohesive_blocks(SEXP graph) { + /* Declarations */ + igraph_t c_graph; + igraph_vector_int_list_t c_blocks; + igraph_vector_int_t c_cohesion; + igraph_vector_int_t c_parent; + igraph_t c_blockTree; + SEXP blocks; + SEXP cohesion; + SEXP parent; + SEXP blockTree; + + SEXP r_result, r_names; + /* Convert input */ + R_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)); + IGRAPH_FINALLY(igraph_vector_int_destroy, &c_cohesion); + IGRAPH_R_CHECK(igraph_vector_int_init(&c_parent, 0)); + IGRAPH_FINALLY(igraph_vector_int_destroy, &c_parent); + /* Call igraph */ + IGRAPH_R_CHECK(igraph_cohesive_blocks(&c_graph, &c_blocks, &c_cohesion, &c_parent, &c_blockTree)); + + /* 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)); + igraph_vector_int_list_destroy(&c_blocks); + IGRAPH_FINALLY_CLEAN(1); + PROTECT(cohesion=R_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)); + igraph_vector_int_destroy(&c_parent); + IGRAPH_FINALLY_CLEAN(1); + IGRAPH_FINALLY(igraph_destroy, &c_blockTree); + PROTECT(blockTree=R_igraph_to_SEXP(&c_blockTree)); + IGRAPH_I_DESTROY(&c_blockTree); + IGRAPH_FINALLY_CLEAN(1); + SET_VECTOR_ELT(r_result, 0, blocks); + SET_VECTOR_ELT(r_result, 1, cohesion); + SET_VECTOR_ELT(r_result, 2, parent); + SET_VECTOR_ELT(r_result, 3, blockTree); + SET_STRING_ELT(r_names, 0, Rf_mkChar("blocks")); + SET_STRING_ELT(r_names, 1, Rf_mkChar("cohesion")); + SET_STRING_ELT(r_names, 2, Rf_mkChar("parent")); + SET_STRING_ELT(r_names, 3, Rf_mkChar("blockTree")); + SET_NAMES(r_result, r_names); + UNPROTECT(5); + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_coreness / +/-------------------------------------------*/ +SEXP R_igraph_coreness(SEXP graph, SEXP mode) { + /* Declarations */ + igraph_t c_graph; + igraph_vector_int_t c_cores; + igraph_neimode_t c_mode; + SEXP cores; + + SEXP r_result; + /* Convert input */ + R_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); + /* Call igraph */ + IGRAPH_R_CHECK(igraph_coreness(&c_graph, &c_cores, c_mode)); + + /* Convert output */ + PROTECT(cores=R_igraph_vector_int_to_SEXP(&c_cores)); + igraph_vector_int_destroy(&c_cores); + IGRAPH_FINALLY_CLEAN(1); + r_result = cores; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_isoclass / /-------------------------------------------*/ @@ -11255,7 +12700,7 @@ 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=R_igraph_arpack_options_to_SEXP(&c_options)); + PROTECT(options=Rx_igraph_arpack_options_to_SEXP(&c_options)); PROTECT(values=R_igraph_vector_to_SEXP(&c_values)); igraph_vector_destroy(&c_values); IGRAPH_FINALLY_CLEAN(1); @@ -11350,6 +12795,36 @@ SEXP R_igraph_sir(SEXP graph, SEXP beta, SEXP gamma, SEXP no_sim) { return(r_result); } +/*-------------------------------------------/ +/ igraph_running_mean / +/-------------------------------------------*/ +SEXP R_igraph_running_mean(SEXP data, SEXP binwidth) { + /* Declarations */ + igraph_vector_t c_data; + igraph_vector_t c_res; + igraph_integer_t c_binwidth; + SEXP res; + + SEXP r_result; + /* Convert input */ + R_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); + c_binwidth = (igraph_integer_t) REAL(binwidth)[0]; + /* Call igraph */ + IGRAPH_R_CHECK(igraph_running_mean(&c_data, &c_res, c_binwidth)); + + /* Convert output */ + PROTECT(res=R_igraph_vector_to_SEXP(&c_res)); + igraph_vector_destroy(&c_res); + IGRAPH_FINALLY_CLEAN(1); + r_result = res; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_convex_hull_2d / /-------------------------------------------*/ @@ -11922,6 +13397,60 @@ SEXP R_igraph_is_complete(SEXP graph) { return(r_result); } +/*-------------------------------------------/ +/ igraph_minimum_spanning_tree_unweighted / +/-------------------------------------------*/ +SEXP R_igraph_minimum_spanning_tree_unweighted(SEXP graph) { + /* Declarations */ + igraph_t c_graph; + igraph_t c_mst; + SEXP mst; + + SEXP r_result; + /* Convert input */ + R_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)); + IGRAPH_I_DESTROY(&c_mst); + IGRAPH_FINALLY_CLEAN(1); + r_result = mst; + + UNPROTECT(1); + return(r_result); +} + +/*-------------------------------------------/ +/ igraph_minimum_spanning_tree_prim / +/-------------------------------------------*/ +SEXP R_igraph_minimum_spanning_tree_prim(SEXP graph, SEXP weights) { + /* Declarations */ + igraph_t c_graph; + igraph_t c_mst; + igraph_vector_t c_weights; + SEXP mst; + + SEXP r_result; + /* Convert input */ + R_SEXP_to_igraph(graph, &c_graph); + R_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)); + IGRAPH_I_DESTROY(&c_mst); + IGRAPH_FINALLY_CLEAN(1); + r_result = mst; + + UNPROTECT(1); + return(r_result); +} + /*-------------------------------------------/ / igraph_random_spanning_tree / /-------------------------------------------*/ diff --git a/src/rinterface.h b/src/rinterface.h index e80a49ff997..4486ea3d91a 100644 --- a/src/rinterface.h +++ b/src/rinterface.h @@ -39,7 +39,7 @@ #define IGRAPH_I_DESTROY IGRAPH_I_ATTRIBUTE_DESTROY -SEXP R_igraph_add_env(SEXP graph); +SEXP Rx_igraph_add_env(SEXP graph); void R_igraph_attribute_clean_preserve_list(void); void R_igraph_set_in_r_check(bool set); @@ -68,7 +68,7 @@ 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_vector_ptr_t *ptr); +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); @@ -77,7 +77,7 @@ 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 R_igraph_arpack_options_to_SEXP(const igraph_arpack_options_t *opt); +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); @@ -145,6 +145,7 @@ 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); 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); diff --git a/src/rinterface_extra.c b/src/rinterface_extra.c index 5e08a4021b1..053aa2f9a0a 100644 --- a/src/rinterface_extra.c +++ b/src/rinterface_extra.c @@ -162,6 +162,15 @@ 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 *file; + + file=fopen(CHAR(STRING_ELT(instream, 0)), "r"); + if (file==0) { igraph_error("Cannot open file for reading", __FILE__, __LINE__, + IGRAPH_EFILE); } + return file; +} + SEXP R_igraph_i_lang7(SEXP s, SEXP t, SEXP u, SEXP v, SEXP w, SEXP x, SEXP y) { PROTECT(s); @@ -290,7 +299,7 @@ SEXP R_igraph_handle_safe_eval_result(SEXP result) { * Attributes * *****************************************************/ -SEXP R_igraph_get_attr_mode(SEXP graph, SEXP pwhich) { +SEXP Rx_igraph_get_attr_mode(SEXP graph, SEXP pwhich) { int which=INTEGER(pwhich)[0]-1; SEXP obj=VECTOR_ELT(VECTOR_ELT(graph, igraph_t_idx_attr), which); igraph_integer_t len=Rf_xlength(obj); @@ -2467,7 +2476,7 @@ void R_igraph_init_handlers(DllInfo *dll) { igraph_set_attribute_table(&R_igraph_attribute_table); } -SEXP R_igraph_set_verbose(SEXP verbose) { +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); @@ -2909,7 +2918,7 @@ SEXP R_igraph_to_SEXP(const igraph_t *graph) { /* Environment for vertex/edge seqs */ SET_VECTOR_ELT(result, igraph_t_idx_env, R_NilValue); - R_igraph_add_env(result); + Rx_igraph_add_env(result); R_igraph_set_pointer(result, graph); /* Set from and to requires environment */ R_igraph_set_from(result, graph); @@ -2994,13 +3003,13 @@ SEXP R_igraph_vector_int_list_to_SEXPp1(const igraph_vector_int_list_t *list) { return result; } -SEXP R_igraph_matrixlist_to_SEXP(const igraph_vector_ptr_t *ptr) { +SEXP R_igraph_matrixlist_to_SEXP(const igraph_matrix_list_t *ptr) { SEXP result; - igraph_integer_t n=igraph_vector_ptr_size(ptr); + igraph_integer_t n=igraph_matrix_list_size(ptr); PROTECT(result=NEW_LIST(n)); for (igraph_integer_t i=0; iiparam[6]=opt->mode; } -SEXP R_igraph_arpack_options_to_SEXP(const igraph_arpack_options_t *opt) { +SEXP Rx_igraph_arpack_options_to_SEXP(const igraph_arpack_options_t *opt) { SEXP result, names; char bmat[2], which[3]; @@ -3722,21 +3731,21 @@ SEXP R_igraph_bliss_info_to_SEXP(const igraph_bliss_info_t *info) { /*******************************************************************/ -SEXP R_igraph_copy_from(SEXP graph) +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); } -SEXP R_igraph_copy_to(SEXP graph) +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); } -SEXP R_igraph_copy_env(SEXP graph) +SEXP Rx_igraph_copy_env(SEXP graph) { return Rf_duplicate(R_igraph_graph_env(graph)); } @@ -3746,13 +3755,13 @@ SEXP R_igraph_mybracket(SEXP graph, SEXP pidx) { return Rf_duplicate(VECTOR_ELT(graph, idx)); } -SEXP R_igraph_mybracket2(SEXP graph, SEXP pidx1, SEXP pidx2) { +SEXP Rx_igraph_mybracket2(SEXP graph, SEXP pidx1, SEXP pidx2) { int idx1=INTEGER(pidx1)[0]-1; int idx2=INTEGER(pidx2)[0]-1; return Rf_duplicate(VECTOR_ELT(VECTOR_ELT(graph, idx1), idx2)); } -SEXP R_igraph_mybracket2_names(SEXP graph, SEXP pidx1, SEXP pidx2) { +SEXP Rx_igraph_mybracket2_names(SEXP graph, SEXP pidx1, SEXP pidx2) { SEXP result; int idx1=INTEGER(pidx1)[0]-1; int idx2=INTEGER(pidx2)[0]-1; @@ -3766,13 +3775,13 @@ SEXP R_igraph_mybracket2_names(SEXP graph, SEXP pidx1, SEXP pidx2) { return result; } -SEXP R_igraph_mybracket2_copy(SEXP graph, SEXP pidx1, SEXP pidx2) { +SEXP Rx_igraph_mybracket2_copy(SEXP graph, SEXP pidx1, SEXP pidx2) { int idx1=INTEGER(pidx1)[0]-1; int idx2=INTEGER(pidx2)[0]-1; return Rf_duplicate(VECTOR_ELT(VECTOR_ELT(graph, idx1), idx2)); } -SEXP R_igraph_mybracket2_set(SEXP graph, SEXP pidx1, SEXP pidx2, +SEXP Rx_igraph_mybracket2_set(SEXP graph, SEXP pidx1, SEXP pidx2, SEXP value) { SEXP newgraph; int idx1=INTEGER(pidx1)[0]-1; @@ -3845,7 +3854,7 @@ SEXP R_igraph_add_edges_manual(SEXP graph, SEXP edges) { return result; } -SEXP R_igraph_add_vertices(SEXP graph, SEXP pnv) { +SEXP Rx_igraph_add_vertices(SEXP graph, SEXP pnv) { igraph_integer_t nv; igraph_t g; @@ -3862,7 +3871,7 @@ SEXP R_igraph_add_vertices(SEXP graph, SEXP pnv) { return result; } -SEXP R_igraph_ecount(SEXP graph) { +SEXP Rx_igraph_ecount(SEXP graph) { igraph_t g; SEXP result; @@ -3875,7 +3884,7 @@ SEXP R_igraph_ecount(SEXP graph) { return result; } -SEXP R_igraph_incident(SEXP graph, SEXP pvid, SEXP pmode) { +SEXP Rx_igraph_incident(SEXP graph, SEXP pvid, SEXP pmode) { igraph_t g; igraph_vector_int_t neis; @@ -3896,7 +3905,7 @@ SEXP R_igraph_incident(SEXP graph, SEXP pvid, SEXP pmode) { return result; } -SEXP R_igraph_delete_edges(SEXP graph, SEXP edges) { +SEXP Rx_igraph_delete_edges(SEXP graph, SEXP edges) { igraph_es_t es; igraph_vector_int_t es_data; @@ -3915,7 +3924,7 @@ SEXP R_igraph_delete_edges(SEXP graph, SEXP edges) { return result; } -SEXP R_igraph_delete_vertices(SEXP graph, SEXP vertices) { +SEXP Rx_igraph_delete_vertices(SEXP graph, SEXP vertices) { igraph_vs_t vs; igraph_vector_int_t vs_data; @@ -3934,7 +3943,7 @@ SEXP R_igraph_delete_vertices(SEXP graph, SEXP vertices) { return result; } -SEXP R_igraph_is_directed(SEXP graph) { +SEXP Rx_igraph_is_directed(SEXP graph) { igraph_t g; SEXP result; @@ -4068,7 +4077,7 @@ SEXP R_igraph_subcomponent(SEXP graph, SEXP pvertex, SEXP pmode) { return result; } -SEXP R_igraph_running_mean(SEXP pdata, SEXP pbinwidth) { +SEXP Rx_igraph_running_mean(SEXP pdata, SEXP pbinwidth) { igraph_vector_t data; igraph_integer_t binwidth=(igraph_integer_t) REAL(pbinwidth)[0]; @@ -4088,7 +4097,7 @@ SEXP R_igraph_running_mean(SEXP pdata, SEXP pbinwidth) { return result; } -SEXP R_igraph_cocitation(SEXP graph, SEXP pvids) { +SEXP Rx_igraph_cocitation(SEXP graph, SEXP pvids) { igraph_t g; igraph_vs_t vs; @@ -4110,7 +4119,7 @@ SEXP R_igraph_cocitation(SEXP graph, SEXP pvids) { return result; } -SEXP R_igraph_bibcoupling(SEXP graph, SEXP pvids) { +SEXP Rx_igraph_bibcoupling(SEXP graph, SEXP pvids) { igraph_t g; igraph_vs_t vs; @@ -4524,7 +4533,7 @@ SEXP R_igraph_layout_lgl(SEXP graph, SEXP pmaxiter, SEXP pmaxdelta, return result; } -SEXP R_igraph_minimum_spanning_tree_unweighted(SEXP graph) { +SEXP Rx_igraph_minimum_spanning_tree_unweighted(SEXP graph) { igraph_t g; igraph_t mst; @@ -4539,7 +4548,7 @@ SEXP R_igraph_minimum_spanning_tree_unweighted(SEXP graph) { return result; } -SEXP R_igraph_minimum_spanning_tree_prim(SEXP graph, SEXP pweights) { +SEXP Rx_igraph_minimum_spanning_tree_prim(SEXP graph, SEXP pweights) { igraph_t g; igraph_t mst; @@ -4757,7 +4766,7 @@ SEXP R_igraph_random_sample(SEXP plow, SEXP phigh, SEXP plength) { return result; } -SEXP R_igraph_get_edgelist(SEXP graph, SEXP pbycol) { +SEXP Rx_igraph_get_edgelist(SEXP graph, SEXP pbycol) { igraph_t g; igraph_vector_int_t res; @@ -4821,7 +4830,7 @@ SEXP R_igraph_degree_sequence_game(SEXP pout_seq, SEXP pin_seq, return result; } -SEXP R_igraph_transitivity_local_undirected_all(SEXP graph, SEXP mode) { +SEXP Rx_igraph_transitivity_local_undirected_all(SEXP graph, SEXP mode) { igraph_t g; igraph_vector_t res; @@ -4866,7 +4875,7 @@ SEXP R_igraph_read_graph_edgelist(SEXP pvfile, SEXP pn, SEXP pdirected) { return result; } -SEXP R_igraph_read_graph_gml(SEXP pvfile) { +SEXP Rx_igraph_read_graph_gml(SEXP pvfile) { igraph_t g; FILE *file; @@ -4888,7 +4897,7 @@ SEXP R_igraph_read_graph_gml(SEXP pvfile) { return result; } -SEXP R_igraph_read_graph_dl(SEXP pvfile, SEXP pdirected) { +SEXP Rx_igraph_read_graph_dl(SEXP pvfile, SEXP pdirected) { igraph_t g; FILE *file; @@ -4911,7 +4920,7 @@ SEXP R_igraph_read_graph_dl(SEXP pvfile, SEXP pdirected) { return result; } -SEXP R_igraph_read_graph_graphdb(SEXP pvfile, SEXP pdirected) { +SEXP Rx_igraph_read_graph_graphdb(SEXP pvfile, SEXP pdirected) { igraph_t g; igraph_bool_t directed=LOGICAL(pdirected)[0]; FILE *file; @@ -4933,7 +4942,7 @@ SEXP R_igraph_read_graph_graphdb(SEXP pvfile, SEXP pdirected) { return result; } -SEXP R_igraph_write_graph_edgelist(SEXP graph, SEXP file) { +SEXP Rx_igraph_write_graph_edgelist(SEXP graph, SEXP file) { igraph_t g; FILE *stream; #if HAVE_OPEN_MEMSTREAM == 1 @@ -4964,7 +4973,7 @@ SEXP R_igraph_write_graph_edgelist(SEXP graph, SEXP file) { return result; } -SEXP R_igraph_write_graph_gml(SEXP graph, SEXP file, SEXP pid, SEXP pcreator) { +SEXP Rx_igraph_write_graph_gml(SEXP graph, SEXP file, SEXP pid, SEXP pcreator) { igraph_t g; FILE *stream; #if HAVE_OPEN_MEMSTREAM == 1 @@ -4999,7 +5008,7 @@ SEXP R_igraph_write_graph_gml(SEXP graph, SEXP file, SEXP pid, SEXP pcreator) { return result; } -SEXP R_igraph_write_graph_dot(SEXP graph, SEXP file) { +SEXP Rx_igraph_write_graph_dot(SEXP graph, SEXP file) { igraph_t g; FILE *stream; #if HAVE_OPEN_MEMSTREAM == 1 @@ -5030,7 +5039,7 @@ SEXP R_igraph_write_graph_dot(SEXP graph, SEXP file) { return result; } -SEXP R_igraph_write_graph_leda(SEXP graph, SEXP file, SEXP va, SEXP ea) { +SEXP Rx_igraph_write_graph_leda(SEXP graph, SEXP file, SEXP va, SEXP ea) { igraph_t g; FILE *stream; #if HAVE_OPEN_MEMSTREAM == 1 @@ -5061,7 +5070,7 @@ SEXP R_igraph_write_graph_leda(SEXP graph, SEXP file, SEXP va, SEXP ea) { return result; } -SEXP R_igraph_write_graph_pajek(SEXP graph, SEXP file) { +SEXP Rx_igraph_write_graph_pajek(SEXP graph, SEXP file) { igraph_t g; FILE *stream; @@ -5235,7 +5244,7 @@ SEXP R_igraph_write_graph_lgl(SEXP graph, SEXP file, SEXP pnames, return result; } -SEXP R_igraph_read_graph_pajek(SEXP pvfile) { +SEXP Rx_igraph_read_graph_pajek(SEXP pvfile) { igraph_t g; FILE *file; SEXP result; @@ -5356,7 +5365,7 @@ SEXP R_igraph_layout_merge_dla(SEXP graphs, SEXP layouts) { return result; } -SEXP R_igraph_disjoint_union(SEXP pgraphs) { +SEXP Rx_igraph_disjoint_union(SEXP pgraphs) { igraph_vector_ptr_t ptrvec; igraph_t *graphs; @@ -5379,7 +5388,7 @@ SEXP R_igraph_disjoint_union(SEXP pgraphs) { return result; } -SEXP R_igraph_union(SEXP pgraphs, SEXP pedgemaps) { +SEXP Rx_igraph_union(SEXP pgraphs, SEXP pedgemaps) { igraph_vector_ptr_t ptrvec; igraph_t *graphs; @@ -5416,7 +5425,7 @@ SEXP R_igraph_union(SEXP pgraphs, SEXP pedgemaps) { return result; } -SEXP R_igraph_intersection(SEXP pgraphs, SEXP pedgemaps) { +SEXP Rx_igraph_intersection(SEXP pgraphs, SEXP pedgemaps) { igraph_vector_ptr_t ptrvec; igraph_t *graphs; @@ -5453,7 +5462,7 @@ SEXP R_igraph_intersection(SEXP pgraphs, SEXP pedgemaps) { return result; } -SEXP R_igraph_difference(SEXP pleft, SEXP pright) { +SEXP Rx_igraph_difference(SEXP pleft, SEXP pright) { igraph_t left, right; igraph_t res; @@ -5469,7 +5478,7 @@ SEXP R_igraph_difference(SEXP pleft, SEXP pright) { return result; } -SEXP R_igraph_complementer(SEXP pgraph, SEXP ploops) { +SEXP Rx_igraph_complementer(SEXP pgraph, SEXP ploops) { igraph_t g; igraph_t res; @@ -5485,7 +5494,7 @@ SEXP R_igraph_complementer(SEXP pgraph, SEXP ploops) { return result; } -SEXP R_igraph_compose(SEXP pleft, SEXP pright, SEXP pedgemaps) { +SEXP Rx_igraph_compose(SEXP pleft, SEXP pright, SEXP pedgemaps) { igraph_t left, right; igraph_t res; @@ -5588,7 +5597,7 @@ SEXP R_igraph_recent_degree_aging_game(SEXP pn, SEXP ppa_exp, SEXP paging_exp, return result; } -SEXP R_igraph_get_edge(SEXP graph, SEXP peid) { +SEXP Rx_igraph_get_edge(SEXP graph, SEXP peid) { igraph_t g; igraph_integer_t eid=(igraph_integer_t) REAL(peid)[0]; @@ -5605,7 +5614,7 @@ SEXP R_igraph_get_edge(SEXP graph, SEXP peid) { return result; } -SEXP R_igraph_edges(SEXP graph, SEXP eids) { +SEXP Rx_igraph_edges(SEXP graph, SEXP eids) { igraph_t g; igraph_es_t es; igraph_vector_int_t es_data; @@ -5626,7 +5635,7 @@ SEXP R_igraph_edges(SEXP graph, SEXP eids) { return result; } -SEXP R_igraph_constraint(SEXP graph, SEXP vids, SEXP pweights) { +SEXP Rx_igraph_constraint(SEXP graph, SEXP vids, SEXP pweights) { igraph_t g; igraph_vs_t vs; @@ -5729,7 +5738,7 @@ SEXP R_igraph_layout_reingold_tilford(SEXP graph, SEXP proot, return result; } -SEXP R_igraph_rewire(SEXP graph, SEXP pn, SEXP pmode) { +SEXP Rx_igraph_rewire(SEXP graph, SEXP pn, SEXP pmode) { igraph_t g; igraph_integer_t n=(igraph_integer_t) REAL(pn)[0]; @@ -5745,7 +5754,7 @@ SEXP R_igraph_rewire(SEXP graph, SEXP pn, SEXP pmode) { return result; } -SEXP R_igraph_read_graph_graphml(SEXP pvfile, SEXP pindex) { +SEXP Rx_igraph_read_graph_graphml(SEXP pvfile, SEXP pindex) { igraph_t g; int index=(int) REAL(pindex)[0]; FILE *file; @@ -5767,7 +5776,7 @@ SEXP R_igraph_read_graph_graphml(SEXP pvfile, SEXP pindex) { return result; } -SEXP R_igraph_write_graph_graphml(SEXP graph, SEXP file, SEXP pprefixattr) { +SEXP Rx_igraph_write_graph_graphml(SEXP graph, SEXP file, SEXP pprefixattr) { igraph_t g; FILE *stream; @@ -5954,7 +5963,7 @@ SEXP R_igraph_grg_game(SEXP pn, SEXP pradius, SEXP ptorus, return result; } -SEXP R_igraph_read_graph_dimacs(SEXP pvfile, SEXP pdirected) { +SEXP Rx_igraph_read_graph_dimacs(SEXP pvfile, SEXP pdirected) { igraph_t g; igraph_bool_t directed=LOGICAL(pdirected)[0]; @@ -6049,7 +6058,7 @@ SEXP R_igraph_write_graph_dimacs(SEXP graph, SEXP file, return result; } -SEXP R_igraph_mincut(SEXP graph, SEXP pcapacity) { +SEXP Rx_igraph_mincut(SEXP graph, SEXP pcapacity) { igraph_t g; igraph_vector_t capacity, *ppcapacity=0; @@ -6091,7 +6100,7 @@ SEXP R_igraph_mincut(SEXP graph, SEXP pcapacity) { return result; } -SEXP R_igraph_mincut_value(SEXP graph, SEXP pcapacity) { +SEXP Rx_igraph_mincut_value(SEXP graph, SEXP pcapacity) { igraph_t g; igraph_vector_t capacity, *ppcapacity=0; @@ -6131,7 +6140,7 @@ SEXP R_igraph_st_vertex_connectivity(SEXP graph, SEXP psource, return result; } -SEXP R_igraph_vertex_connectivity(SEXP graph, SEXP pchecks) { +SEXP Rx_igraph_vertex_connectivity(SEXP graph, SEXP pchecks) { igraph_t g; igraph_integer_t res; @@ -6166,7 +6175,7 @@ SEXP R_igraph_st_edge_connectivity(SEXP graph, SEXP psource, SEXP ptarget) { return result; } -SEXP R_igraph_edge_connectivity(SEXP graph, SEXP pchecks) { +SEXP Rx_igraph_edge_connectivity(SEXP graph, SEXP pchecks) { igraph_t g; igraph_integer_t res; @@ -6239,7 +6248,7 @@ SEXP R_igraph_vertex_disjoint_paths(SEXP graph, SEXP psource, SEXP ptarget) { return result; } -SEXP R_igraph_adhesion(SEXP graph, SEXP pchecks) { +SEXP Rx_igraph_adhesion(SEXP graph, SEXP pchecks) { igraph_t g; igraph_integer_t res; @@ -6255,7 +6264,7 @@ SEXP R_igraph_adhesion(SEXP graph, SEXP pchecks) { return result; } -SEXP R_igraph_cohesion(SEXP graph, SEXP pchecks) { +SEXP Rx_igraph_cohesion(SEXP graph, SEXP pchecks) { igraph_t g; igraph_integer_t res; @@ -6371,7 +6380,7 @@ SEXP R_igraph_spinglass_my_community(SEXP graph, SEXP weights, return result; } -SEXP R_igraph_no_components(SEXP graph, SEXP pmode) { +SEXP Rx_igraph_no_components(SEXP graph, SEXP pmode) { igraph_t g; igraph_integer_t mode=(igraph_integer_t) INTEGER(pmode)[0]; @@ -6496,7 +6505,7 @@ SEXP R_igraph_watts_strogatz_game(SEXP pdim, SEXP psize, SEXP pnei, SEXP pp, return result; } -SEXP R_igraph_coreness(SEXP graph, SEXP pmode) { +SEXP Rx_igraph_coreness(SEXP graph, SEXP pmode) { igraph_t g; igraph_neimode_t mode=(igraph_neimode_t) Rf_asInteger(pmode); @@ -6590,7 +6599,7 @@ SEXP R_igraph_maximal_cliques_file(SEXP graph, SEXP psubset, SEXP file, return result; } -SEXP R_igraph_maximal_cliques_count(SEXP graph, SEXP psubset, +SEXP Rx_igraph_maximal_cliques_count(SEXP graph, SEXP psubset, SEXP min_size, SEXP max_size) { /* Declarations */ igraph_t c_graph; @@ -6645,7 +6654,7 @@ SEXP R_igraph_independent_vertex_sets(SEXP graph, return result; } -SEXP R_igraph_largest_independent_vertex_sets(SEXP graph) { +SEXP Rx_igraph_largest_independent_vertex_sets(SEXP graph) { igraph_t g; igraph_vector_int_list_t list; SEXP result; @@ -6660,7 +6669,7 @@ SEXP R_igraph_largest_independent_vertex_sets(SEXP graph) { return result; } -SEXP R_igraph_maximal_independent_vertex_sets(SEXP graph) { +SEXP Rx_igraph_maximal_independent_vertex_sets(SEXP graph) { igraph_t g; igraph_vector_int_list_t list; SEXP result; @@ -6675,7 +6684,7 @@ SEXP R_igraph_maximal_independent_vertex_sets(SEXP graph) { return result; } -SEXP R_igraph_independence_number(SEXP graph) { +SEXP Rx_igraph_independence_number(SEXP graph) { igraph_t g; igraph_integer_t res; SEXP result; @@ -6803,7 +6812,7 @@ SEXP R_igraph_walktrap_community(SEXP graph, SEXP pweights, return result; } -SEXP R_igraph_topological_sorting(SEXP graph, SEXP pmode) { +SEXP Rx_igraph_topological_sorting(SEXP graph, SEXP pmode) { igraph_t g; igraph_vector_int_t res; igraph_neimode_t mode=(igraph_neimode_t) Rf_asInteger(pmode); @@ -6971,7 +6980,7 @@ SEXP R_igraph_community_to_membership(SEXP graph, SEXP pmerges, return result; } -SEXP R_igraph_community_to_membership2(SEXP pmerges, SEXP pvcount, +SEXP Rx_igraph_community_to_membership2(SEXP pmerges, SEXP pvcount, SEXP psteps) { igraph_matrix_int_t merges; @@ -6997,7 +7006,7 @@ SEXP R_igraph_community_to_membership2(SEXP pmerges, SEXP pvcount, return result; } -SEXP R_igraph_girth(SEXP graph, SEXP pcircle) { +SEXP Rx_igraph_girth(SEXP graph, SEXP pcircle) { igraph_t g; igraph_vector_int_t circle, *ppcircle=0; @@ -7023,7 +7032,7 @@ SEXP R_igraph_girth(SEXP graph, SEXP pcircle) { return result; } -SEXP R_igraph_famous(SEXP name) { +SEXP Rx_igraph_famous(SEXP name) { igraph_t g; SEXP result; @@ -7036,7 +7045,7 @@ SEXP R_igraph_famous(SEXP name) { return result; } -SEXP R_igraph_get_adjlist(SEXP graph, SEXP pmode, SEXP ploops, SEXP pmultiple) { +SEXP Rx_igraph_get_adjlist(SEXP graph, SEXP pmode, SEXP ploops, SEXP pmultiple) { igraph_t g; igraph_neimode_t mode=(igraph_neimode_t) Rf_asInteger(pmode); @@ -7060,7 +7069,7 @@ SEXP R_igraph_get_adjlist(SEXP graph, SEXP pmode, SEXP ploops, SEXP pmultiple) { return result; } -SEXP R_igraph_get_adjedgelist(SEXP graph, SEXP pmode, SEXP ploops) { +SEXP Rx_igraph_get_adjedgelist(SEXP graph, SEXP pmode, SEXP ploops) { igraph_t g; igraph_neimode_t mode=(igraph_neimode_t) Rf_asInteger(pmode); @@ -7106,7 +7115,7 @@ igraph_error_t R_igraph_i_arpack_callback(igraph_real_t *to, const igraph_real_t return 0; } -SEXP R_igraph_arpack(SEXP function, SEXP extra, SEXP options, SEXP rho, +SEXP Rx_igraph_arpack(SEXP function, SEXP extra, SEXP options, SEXP rho, SEXP sym) { igraph_vector_t values; @@ -7158,7 +7167,7 @@ SEXP R_igraph_arpack(SEXP function, SEXP extra, SEXP options, SEXP rho, } SET_VECTOR_ELT(result, 1, R_igraph_matrix_to_SEXP(&vectors)); igraph_matrix_destroy(&vectors); IGRAPH_FINALLY_CLEAN(1); - SET_VECTOR_ELT(result, 2, R_igraph_arpack_options_to_SEXP(&c_options)); + SET_VECTOR_ELT(result, 2, Rx_igraph_arpack_options_to_SEXP(&c_options)); PROTECT(names=NEW_CHARACTER(3)); SET_STRING_ELT(names, 0, Rf_mkChar("values")); SET_STRING_ELT(names, 1, Rf_mkChar("vectors")); @@ -7514,7 +7523,7 @@ SEXP R_igraph_dfs(SEXP graph, SEXP proot, SEXP pmode, SEXP punreachable, return result; } -SEXP R_igraph_cohesive_blocks(SEXP graph) { +SEXP Rx_igraph_cohesive_blocks(SEXP graph) { igraph_vector_int_list_t c_blocks; igraph_vector_int_t c_cohesion; igraph_vector_int_t c_parent; @@ -7576,7 +7585,7 @@ typedef struct { igraph_arpack_function_t *fun; } R_igraph_i_function_container_t; -SEXP R_igraph_i_levc_arp(SEXP extP, SEXP extE, SEXP pv) { +SEXP Rx_igraph_i_levc_arp(SEXP extP, SEXP extE, SEXP pv) { R_igraph_i_function_container_t *cont = R_ExternalPtrAddr(extP); igraph_arpack_function_t *fun= cont->fun; void *extra=R_ExternalPtrAddr(extE); @@ -7702,7 +7711,7 @@ SEXP R_igraph_community_leading_eigenvector(SEXP graph, SEXP steps, PROTECT(membership=R_igraph_vector_int_to_SEXP(&c_membership)); igraph_vector_int_destroy(&c_membership); IGRAPH_FINALLY_CLEAN(1); - PROTECT(options=R_igraph_arpack_options_to_SEXP(&c_options)); + PROTECT(options=Rx_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)); @@ -7899,7 +7908,7 @@ SEXP R_igraph_graphlets(SEXP graph, SEXP weights, SEXP niter) { /*-------------------------------------------/ / igraph_graphlets_candidate_basis / /-------------------------------------------*/ -SEXP R_igraph_graphlets_candidate_basis(SEXP graph, SEXP weights) { +SEXP Rx_igraph_graphlets_candidate_basis(SEXP graph, SEXP weights) { /* Declarations */ igraph_t c_graph; igraph_vector_t c_weights; @@ -7953,7 +7962,7 @@ igraph_error_t igraph_i_graphlets_project( / igraph_graphlets_project / /-------------------------------------------*/ -SEXP R_igraph_graphlets_project(SEXP graph, SEXP weights, SEXP cliques, +SEXP Rx_igraph_graphlets_project(SEXP graph, SEXP weights, SEXP cliques, SEXP Mu, SEXP niter) { /* Declarations */ igraph_t c_graph; @@ -8067,7 +8076,7 @@ SEXP R_igraph_adjacency_spectral_embedding(SEXP graph, SEXP no, PROTECT(D=R_igraph_vector_to_SEXP(&c_D)); igraph_vector_destroy(&c_D); IGRAPH_FINALLY_CLEAN(1); - PROTECT(options=R_igraph_arpack_options_to_SEXP(&c_options)); + PROTECT(options=Rx_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); @@ -8146,7 +8155,7 @@ SEXP R_igraph_laplacian_spectral_embedding(SEXP graph, SEXP no, PROTECT(D=R_igraph_0orvector_to_SEXP(&c_D)); igraph_vector_destroy(&c_D); IGRAPH_FINALLY_CLEAN(1); - PROTECT(options=R_igraph_arpack_options_to_SEXP(&c_options)); + PROTECT(options=Rx_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); @@ -8238,7 +8247,7 @@ SEXP R_igraph_bipartite_projection(SEXP graph, SEXP types, SEXP probe1, return(result); } -SEXP R_igraph_adjacent_vertices(SEXP pgraph, SEXP pv, SEXP pmode) { +SEXP Rx_igraph_adjacent_vertices(SEXP pgraph, SEXP pv, SEXP pmode) { igraph_t graph; igraph_vs_t vs; @@ -8284,7 +8293,7 @@ SEXP R_igraph_adjacent_vertices(SEXP pgraph, SEXP pv, SEXP pmode) { return result; } -SEXP R_igraph_incident_edges(SEXP pgraph, SEXP pe, SEXP pmode) { +SEXP Rx_igraph_incident_edges(SEXP pgraph, SEXP pe, SEXP pmode) { igraph_t graph; igraph_vs_t vs; @@ -8515,7 +8524,7 @@ int igraphhcass2(int n, const int *ia, const int *ib, return 0; } /* hcass2_ */ -SEXP R_igraph_get_all_simple_paths_pp(SEXP vector) { +SEXP Rx_igraph_get_all_simple_paths_pp(SEXP vector) { SEXP result; igraph_integer_t no=0, n=Rf_xlength(vector); double *vec=REAL(vector), *p=vec, *pp=vec; @@ -8536,30 +8545,30 @@ SEXP R_igraph_get_all_simple_paths_pp(SEXP vector) { return result; } -SEXP R_igraph_address(SEXP object) { +SEXP Rx_igraph_address(SEXP object) { char s[64]; snprintf(s, 64, "%p", (void*) object); return Rf_ScalarString(Rf_mkChar(s)); } -SEXP R_igraph_make_weak_ref(SEXP key, SEXP value, SEXP finalizer) { +SEXP Rx_igraph_make_weak_ref(SEXP key, SEXP value, SEXP finalizer) { return R_MakeWeakRef(key, value, finalizer, Rf_isNull(finalizer) ? 0 : 1); } -SEXP R_igraph_weak_ref_key(SEXP ref) { +SEXP Rx_igraph_weak_ref_key(SEXP ref) { return R_WeakRefKey(ref); } -SEXP R_igraph_weak_ref_value(SEXP ref) { +SEXP Rx_igraph_weak_ref_value(SEXP ref) { return R_WeakRefValue(ref); } -SEXP R_igraph_weak_ref_run_finalizer(SEXP ref) { +SEXP Rx_igraph_weak_ref_run_finalizer(SEXP ref) { R_RunWeakRefFinalizer(ref); return R_NilValue; } -SEXP R_igraph_identical_graphs(SEXP g1, SEXP g2, SEXP attrs) { +SEXP Rx_igraph_identical_graphs(SEXP g1, SEXP g2, SEXP attrs) { igraph_integer_t n = LOGICAL(attrs)[0] ? igraph_t_idx_attr + 1 : igraph_t_idx_attr; for (igraph_integer_t i = 0; i < n; i++) { if (!R_compute_identical(VECTOR_ELT(g1, i), VECTOR_ELT(g2, i), 0)) { @@ -8569,7 +8578,7 @@ SEXP R_igraph_identical_graphs(SEXP g1, SEXP g2, SEXP attrs) { return Rf_ScalarLogical(1); } -SEXP R_igraph_graph_version(SEXP graph) { +SEXP Rx_igraph_graph_version(SEXP graph) { if (Rf_xlength(graph) == 11) { return Rf_ScalarInteger(ver_0_1_1); } @@ -8590,7 +8599,7 @@ SEXP R_igraph_graph_version(SEXP graph) { return ver; } -SEXP R_igraph_add_myid_to_env(SEXP graph) { +SEXP Rx_igraph_add_myid_to_env(SEXP graph) { uuid_t my_id; char my_id_chr[40]; @@ -8604,7 +8613,7 @@ SEXP R_igraph_add_myid_to_env(SEXP graph) { return graph; } -SEXP R_igraph_add_version_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)); @@ -8613,7 +8622,7 @@ SEXP R_igraph_add_version_to_env(SEXP graph) { return graph; } -SEXP R_igraph_add_env(SEXP graph) { +SEXP Rx_igraph_add_env(SEXP graph) { SEXP result = graph; R_xlen_t i; uuid_t my_id; @@ -8659,6 +8668,6 @@ SEXP R_igraph_add_env(SEXP graph) { return result; } -SEXP R_igraph_get_graph_id(SEXP graph) { +SEXP Rx_igraph_get_graph_id(SEXP graph) { return Rf_findVar(Rf_install("myid"), R_igraph_graph_env(graph)); } diff --git a/tests/testthat/_snaps/aaa-auto.md b/tests/testthat/_snaps/aaa-auto.md index b820114a9e0..6249283e3dd 100644 --- a/tests/testthat/_snaps/aaa-auto.md +++ b/tests/testthat/_snaps/aaa-auto.md @@ -9,7 +9,7 @@ --- Code - empty_impl(5, directed = FALSE) + empty_impl(n = 5, directed = FALSE) Output IGRAPH U--- 5 0 -- + edges: @@ -25,7 +25,7 @@ # add_edges_impl basic Code - add_edges_impl(g, c(0, 1, 1, 2)) + add_edges_impl(graph = g, edges = c(0, 1, 1, 2)) Output IGRAPH D--- 3 2 -- + edges: @@ -42,7 +42,7 @@ # copy_impl basic Code - copy_impl(g) + copy_impl(from = g) Output IGRAPH D--- 2 0 -- + edges: @@ -58,7 +58,7 @@ # delete_vertices_idx_impl basic Code - delete_vertices_idx_impl(g, 1) + delete_vertices_idx_impl(graph = g, vertices = 1) Output $graph IGRAPH D--- 2 0 -- @@ -82,7 +82,7 @@ # vcount_impl basic Code - vcount_impl(g) + vcount_impl(graph = g) Output [1] 4 @@ -97,14 +97,14 @@ # degree_impl basic Code - degree_impl(g) + degree_impl(graph = g) Output [1] 0 0 0 --- Code - degree_impl(g, mode = "in") + degree_impl(graph = g, mode = "in") Output [1] 0 0 0 @@ -119,7 +119,7 @@ # get_all_eids_between_impl basic Code - get_all_eids_between_impl(g, 1, 2) + get_all_eids_between_impl(graph = g, from = 1, to = 2) Output + 0/0 edges: @@ -134,7 +134,7 @@ # wheel_impl basic Code - wheel_impl(5) + wheel_impl(n = 5) Output IGRAPH D--- 5 8 -- + edges: @@ -143,7 +143,7 @@ --- Code - wheel_impl(5, mode = "in", center = 2) + wheel_impl(n = 5, mode = "in", center = 2) Output IGRAPH D--- 5 8 -- + edges: @@ -160,7 +160,7 @@ # hypercube_impl basic Code - hypercube_impl(3) + hypercube_impl(n = 3) Output IGRAPH U--- 8 12 -- + edges: @@ -169,7 +169,7 @@ --- Code - hypercube_impl(3, directed = TRUE) + hypercube_impl(n = 3, directed = TRUE) Output IGRAPH D--- 8 12 -- + edges: @@ -186,7 +186,7 @@ # square_lattice_impl basic Code - square_lattice_impl(c(2, 2)) + square_lattice_impl(dimvector = c(2, 2)) Output IGRAPH U--- 4 4 -- + edges: @@ -195,8 +195,8 @@ --- Code - square_lattice_impl(c(2, 2), nei = 2, directed = TRUE, mutual = TRUE, periodic = c( - TRUE, TRUE)) + square_lattice_impl(dimvector = c(2, 2), nei = 2, directed = TRUE, mutual = TRUE, + periodic = c(TRUE, TRUE)) Output IGRAPH D--- 4 10 -- + edges: @@ -213,7 +213,7 @@ # triangular_lattice_impl basic Code - triangular_lattice_impl(c(2, 2)) + triangular_lattice_impl(dimvector = c(2, 2)) Output IGRAPH U--- 4 5 -- + edges: @@ -222,7 +222,7 @@ --- Code - triangular_lattice_impl(c(2, 2), directed = TRUE, mutual = TRUE) + triangular_lattice_impl(dimvector = c(2, 2), directed = TRUE, mutual = TRUE) Output IGRAPH D--- 4 10 -- + edges: @@ -239,7 +239,7 @@ # path_graph_impl basic Code - path_graph_impl(5) + path_graph_impl(n = 5) Output IGRAPH U--- 5 4 -- + edges: @@ -248,7 +248,7 @@ --- Code - path_graph_impl(5, directed = TRUE, mutual = TRUE) + path_graph_impl(n = 5, directed = TRUE, mutual = TRUE) Output IGRAPH D--- 5 8 -- + edges: @@ -265,7 +265,7 @@ # cycle_graph_impl basic Code - cycle_graph_impl(5) + cycle_graph_impl(n = 5) Output IGRAPH U--- 5 5 -- + edges: @@ -274,7 +274,7 @@ --- Code - cycle_graph_impl(5, directed = TRUE, mutual = TRUE) + cycle_graph_impl(n = 5, directed = TRUE, mutual = TRUE) Output IGRAPH D--- 5 10 -- + edges: @@ -291,7 +291,7 @@ # symmetric_tree_impl basic Code - symmetric_tree_impl(3) + symmetric_tree_impl(branches = 3) Output IGRAPH D--- 4 3 -- + edges: @@ -300,7 +300,7 @@ --- Code - symmetric_tree_impl(3, type = "in") + symmetric_tree_impl(branches = 3, type = "in") Output IGRAPH D--- 4 3 -- + edges: @@ -317,7 +317,7 @@ # regular_tree_impl basic Code - regular_tree_impl(2) + regular_tree_impl(h = 2) Output IGRAPH U--- 10 9 -- + edges: @@ -326,7 +326,7 @@ --- Code - regular_tree_impl(2, k = 4, type = "in") + regular_tree_impl(h = 2, k = 4, type = "in") Output IGRAPH D--- 17 16 -- + edges: @@ -344,7 +344,7 @@ # full_citation_impl basic Code - full_citation_impl(5) + full_citation_impl(n = 5) Output IGRAPH D--- 5 10 -- + edges: @@ -353,7 +353,7 @@ --- Code - full_citation_impl(5, directed = FALSE) + full_citation_impl(n = 5, directed = FALSE) Output IGRAPH U--- 5 10 -- + edges: @@ -370,7 +370,7 @@ # atlas_impl basic Code - atlas_impl(0) + atlas_impl(number = 0) Output IGRAPH U--- 0 0 -- + edges: @@ -378,7 +378,7 @@ --- Code - atlas_impl(5) + atlas_impl(number = 5) Output IGRAPH U--- 3 1 -- + edge: @@ -395,7 +395,7 @@ # extended_chordal_ring_impl basic Code - extended_chordal_ring_impl(5, matrix(c(1, 2))) + extended_chordal_ring_impl(nodes = 5, W = matrix(c(1, 2))) Output IGRAPH U--- 5 15 -- + edges: @@ -404,7 +404,7 @@ --- Code - extended_chordal_ring_impl(5, matrix(c(1, 2)), directed = TRUE) + extended_chordal_ring_impl(nodes = 5, W = matrix(c(1, 2)), directed = TRUE) Output IGRAPH D--- 5 15 -- + edges: @@ -421,7 +421,7 @@ # graph_power_impl basic Code - graph_power_impl(g, 2) + graph_power_impl(graph = g, order = 2) Output IGRAPH U--- 5 7 -- + edges: @@ -430,7 +430,7 @@ --- Code - graph_power_impl(g, 2, directed = TRUE) + graph_power_impl(graph = g, order = 2, directed = TRUE) Output IGRAPH U--- 5 7 -- + edges: @@ -447,7 +447,7 @@ # linegraph_impl basic Code - linegraph_impl(g) + linegraph_impl(graph = g) Output IGRAPH U--- 4 3 -- + edges: @@ -464,7 +464,7 @@ # de_bruijn_impl basic Code - de_bruijn_impl(2, 3) + de_bruijn_impl(m = 2, n = 3) Output IGRAPH D--- 8 16 -- + edges: @@ -482,7 +482,7 @@ # kautz_impl basic Code - kautz_impl(2, 3) + kautz_impl(m = 2, n = 3) Output IGRAPH D--- 24 48 -- + edges: @@ -503,7 +503,7 @@ # lcf_vector_impl basic Code - lcf_vector_impl(10, c(3, -3, 4), 2) + lcf_vector_impl(n = 10, shifts = c(3, -3, 4), repeats = 2) Output IGRAPH U--- 10 16 -- LCF graph + attr: name (g/c) @@ -522,7 +522,7 @@ # mycielski_graph_impl basic Code - mycielski_graph_impl(3) + mycielski_graph_impl(k = 3) Output IGRAPH U--- 5 5 -- + edges: @@ -539,7 +539,7 @@ # adjlist_impl basic Code - adjlist_impl(list(c(2, 3), c(1), c(1)), mode = "out") + adjlist_impl(adjlist = list(c(2, 3), c(1), c(1)), mode = "out") Output IGRAPH D--- 3 4 -- + edges: @@ -556,7 +556,7 @@ # full_bipartite_impl basic Code - full_bipartite_impl(2, 3) + full_bipartite_impl(n1 = 2, n2 = 3) Output $graph IGRAPH U--- 5 6 -- @@ -570,7 +570,7 @@ --- Code - full_bipartite_impl(2, 3, directed = TRUE, mode = "in") + full_bipartite_impl(n1 = 2, n2 = 3, directed = TRUE, mode = "in") Output $graph IGRAPH D--- 5 6 -- @@ -592,7 +592,7 @@ # full_multipartite_impl basic Code - full_multipartite_impl(c(2, 3, 4)) + full_multipartite_impl(n = c(2, 3, 4)) Output $graph IGRAPH U--- 9 26 -- @@ -603,11 +603,20 @@ $types [1] 1 1 2 2 2 3 3 3 3 + $name + [1] "Full multipartite graph" + + $n + [1] 2 3 4 + + $mode + [1] 3 + --- Code - full_multipartite_impl(c(2, 3, 4), directed = TRUE, mode = "in") + full_multipartite_impl(n = c(2, 3, 4), directed = TRUE, mode = "in") Output $graph IGRAPH D--- 9 26 -- @@ -618,6 +627,15 @@ $types [1] 1 1 2 2 2 3 3 3 3 + $name + [1] "Full multipartite graph" + + $n + [1] 2 3 4 + + $mode + [1] 2 + # full_multipartite_impl errors @@ -630,7 +648,7 @@ # realize_degree_sequence_impl basic Code - realize_degree_sequence_impl(c(2, 2, 2)) + realize_degree_sequence_impl(out.deg = c(2, 2, 2)) Output IGRAPH U--- 3 3 -- Graph from degree sequence + attr: name (g/c), out.deg (g/n), in.deg (g/x), allowed.edge.types @@ -641,8 +659,8 @@ --- Code - realize_degree_sequence_impl(c(2, 2, 2), c(2, 2, 2), allowed.edge.types = "simple", - method = "largest") + realize_degree_sequence_impl(out.deg = c(2, 2, 2), in.deg = c(2, 2, 2), + allowed.edge.types = "simple", method = "largest") Output IGRAPH D--- 3 6 -- Graph from degree sequence + attr: name (g/c), out.deg (g/n), in.deg (g/n), allowed.edge.types @@ -661,7 +679,7 @@ # realize_bipartite_degree_sequence_impl basic Code - realize_bipartite_degree_sequence_impl(c(2, 2), c(2, 2)) + realize_bipartite_degree_sequence_impl(degrees1 = c(2, 2), degrees2 = c(2, 2)) Output IGRAPH U--- 4 4 -- Bipartite graph from degree sequence + attr: name (g/c), degrees1 (g/n), degrees2 (g/n), allowed.edge.types @@ -672,8 +690,8 @@ --- Code - realize_bipartite_degree_sequence_impl(c(2, 2), c(2, 2), allowed.edge.types = "loops", - method = "largest") + realize_bipartite_degree_sequence_impl(degrees1 = c(2, 2), degrees2 = c(2, 2), + allowed.edge.types = "loops", method = "largest") Output IGRAPH U--- 4 4 -- Bipartite graph from degree sequence + attr: name (g/c), degrees1 (g/n), degrees2 (g/n), allowed.edge.types @@ -692,18 +710,20 @@ # circulant_impl basic Code - circulant_impl(5, c(1, 2)) + circulant_impl(n = 5, shifts = c(1, 2)) Output - IGRAPH U--- 5 10 -- + IGRAPH U--- 5 10 -- Circulant graph + + attr: name (g/c), shifts (g/n) + edges: [1] 1--2 2--3 3--4 4--5 1--5 1--3 2--4 3--5 1--4 2--5 --- Code - circulant_impl(5, c(1, 2), directed = TRUE) + circulant_impl(n = 5, shifts = c(1, 2), directed = TRUE) Output - IGRAPH D--- 5 10 -- + IGRAPH D--- 5 10 -- Circulant graph + + attr: name (g/c), shifts (g/n) + edges: [1] 1->2 2->3 3->4 4->5 5->1 1->3 2->4 3->5 4->1 5->2 @@ -718,7 +738,7 @@ # generalized_petersen_impl basic Code - generalized_petersen_impl(5, 2) + generalized_petersen_impl(n = 5, k = 2) Output IGRAPH U--- 10 15 -- + edges: @@ -736,7 +756,7 @@ # turan_impl basic Code - turan_impl(5, 2) + turan_impl(n = 5, r = 2) Output $graph IGRAPH U--- 5 6 -- @@ -746,6 +766,15 @@ $types [1] 1 1 1 2 2 + $name + [1] "Turan graph" + + $n + [1] 5 + + $r + [1] 2 + # turan_impl errors @@ -758,7 +787,7 @@ # erdos_renyi_game_gnp_impl basic Code - erdos_renyi_game_gnp_impl(5, 0.5) + erdos_renyi_game_gnp_impl(n = 5, p = 0.5) Output IGRAPH U--- 5 7 -- + edges: @@ -767,7 +796,7 @@ --- Code - erdos_renyi_game_gnp_impl(5, 0.5, directed = TRUE, loops = TRUE) + erdos_renyi_game_gnp_impl(n = 5, p = 0.5, directed = TRUE, loops = TRUE) Output IGRAPH D--- 5 12 -- + edges: @@ -784,7 +813,7 @@ # erdos_renyi_game_gnm_impl basic Code - erdos_renyi_game_gnm_impl(5, 3) + erdos_renyi_game_gnm_impl(n = 5, m = 3) Output IGRAPH U--- 5 3 -- + edges: @@ -793,7 +822,7 @@ --- Code - erdos_renyi_game_gnm_impl(5, 3, directed = TRUE, loops = TRUE) + erdos_renyi_game_gnm_impl(n = 5, m = 3, directed = TRUE, loops = TRUE) Output IGRAPH D--- 5 3 -- + edges: @@ -810,7 +839,7 @@ # growing_random_game_impl basic Code - growing_random_game_impl(5, 2) + growing_random_game_impl(n = 5, m = 2) Output IGRAPH D--- 5 8 -- Growing random graph + attr: name (g/c), m (g/n), citation (g/l) @@ -820,7 +849,7 @@ --- Code - growing_random_game_impl(5, 2, directed = FALSE, citation = TRUE) + growing_random_game_impl(n = 5, m = 2, directed = FALSE, citation = TRUE) Output IGRAPH U--- 5 8 -- Growing random graph + attr: name (g/c), m (g/n), citation (g/l) @@ -838,8 +867,8 @@ # preference_game_impl basic Code - preference_game_impl(5, 2, c(0.5, 0.5), FALSE, matrix(c(0.5, 0.5, 0.5, 0.5), 2, - 2)) + preference_game_impl(nodes = 5, types = 2, type.dist = c(0.5, 0.5), + fixed.sizes = FALSE, pref.matrix = matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2)) Output $graph IGRAPH U--- 5 4 -- @@ -861,8 +890,9 @@ # asymmetric_preference_game_impl basic Code - asymmetric_preference_game_impl(5, 2, 2, matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2), - matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2)) + asymmetric_preference_game_impl(nodes = 5, out.types = 2, in.types = 2, + type.dist.matrix = matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2), pref.matrix = matrix( + c(0.5, 0.5, 0.5, 0.5), 2, 2)) Output $graph IGRAPH D--- 5 9 -- @@ -887,7 +917,7 @@ # rewire_edges_impl basic Code - rewire_edges_impl(g, 0.5) + rewire_edges_impl(graph = g, prob = 0.5) Output IGRAPH U--- 5 4 -- + edges: @@ -904,7 +934,7 @@ # rewire_directed_edges_impl basic Code - rewire_directed_edges_impl(g, 0.5) + rewire_directed_edges_impl(graph = g, prob = 0.5) Output IGRAPH D--- 5 4 -- + edges: @@ -921,7 +951,7 @@ # forest_fire_game_impl basic Code - forest_fire_game_impl(5, 0.5) + forest_fire_game_impl(nodes = 5, fw.prob = 0.5) Output IGRAPH D--- 5 9 -- Forest fire model + attr: name (g/c), fw.prob (g/n), bw.factor (g/n), ambs (g/n) @@ -931,7 +961,8 @@ --- Code - forest_fire_game_impl(5, 0.5, bw.factor = 0.2, ambs = 2, directed = FALSE) + forest_fire_game_impl(nodes = 5, fw.prob = 0.5, bw.factor = 0.2, ambs = 2, + directed = FALSE) Output IGRAPH U--- 5 4 -- Forest fire model + attr: name (g/c), fw.prob (g/n), bw.factor (g/n), ambs (g/n) @@ -949,7 +980,8 @@ # simple_interconnected_islands_game_impl basic Code - simple_interconnected_islands_game_impl(2, 3, 0.5, 1) + simple_interconnected_islands_game_impl(islands.n = 2, islands.size = 3, + islands.pin = 0.5, n.inter = 1) Output IGRAPH U--- 6 5 -- Interconnected islands model + attr: name (g/c), islands.n (g/n), islands.size (g/n), islands.pin @@ -968,7 +1000,7 @@ # chung_lu_game_impl basic Code - chung_lu_game_impl(c(2, 2, 2)) + chung_lu_game_impl(out.weights = c(2, 2, 2)) Output IGRAPH U--- 3 5 -- Chung-Lu model + attr: name (g/c), variant (g/n) @@ -978,7 +1010,8 @@ --- Code - chung_lu_game_impl(c(1, 2, 3), c(1, 2, 3), loops = FALSE, variant = "maxent") + chung_lu_game_impl(out.weights = c(1, 2, 3), in.weights = c(1, 2, 3), loops = FALSE, + variant = "maxent") Output IGRAPH D--- 3 1 -- Chung-Lu model + attr: name (g/c), variant (g/n) @@ -996,7 +1029,7 @@ # static_fitness_game_impl basic Code - static_fitness_game_impl(3, c(1, 2, 3)) + static_fitness_game_impl(no.of.edges = 3, fitness.out = c(1, 2, 3)) Output IGRAPH U--- 3 3 -- Static fitness model + attr: name (g/c), loops (g/l), multiple (g/l) @@ -1006,7 +1039,8 @@ --- Code - static_fitness_game_impl(3, c(1, 2, 3), c(1, 2, 3), loops = TRUE, multiple = TRUE) + static_fitness_game_impl(no.of.edges = 3, fitness.out = c(1, 2, 3), fitness.in = c( + 1, 2, 3), loops = TRUE, multiple = TRUE) Output IGRAPH D--- 3 3 -- Static fitness model + attr: name (g/c), loops (g/l), multiple (g/l) @@ -1024,7 +1058,7 @@ # static_power_law_game_impl basic Code - static_power_law_game_impl(5, 4, 2.5) + static_power_law_game_impl(no.of.nodes = 5, no.of.edges = 4, exponent.out = 2.5) Output IGRAPH U--- 5 4 -- Static power law model + attr: name (g/c), exponent.out (g/n), exponent.in (g/n), loops (g/l), @@ -1035,8 +1069,8 @@ --- Code - static_power_law_game_impl(5, 4, 2.5, exponent.in = 2, loops = TRUE, multiple = TRUE, - finite.size.correction = FALSE) + static_power_law_game_impl(no.of.nodes = 5, no.of.edges = 4, exponent.out = 2.5, + exponent.in = 2, loops = TRUE, multiple = TRUE, finite.size.correction = FALSE) Output IGRAPH D--- 5 4 -- Static power law model + attr: name (g/c), exponent.out (g/n), exponent.in (g/n), loops (g/l), @@ -1055,7 +1089,7 @@ # k_regular_game_impl basic Code - k_regular_game_impl(5, 2) + k_regular_game_impl(no.of.nodes = 5, k = 2) Output IGRAPH U--- 5 5 -- k-regular graph + attr: name (g/c), k (g/n) @@ -1065,7 +1099,7 @@ --- Code - k_regular_game_impl(5, 2, directed = TRUE, multiple = TRUE) + k_regular_game_impl(no.of.nodes = 5, k = 2, directed = TRUE, multiple = TRUE) Output IGRAPH D--- 5 10 -- k-regular graph + attr: name (g/c), k (g/n) @@ -1083,7 +1117,7 @@ # sbm_game_impl basic Code - sbm_game_impl(5, matrix(0.5, 2, 2), c(2, 3)) + sbm_game_impl(n = 5, pref.matrix = matrix(0.5, 2, 2), block.sizes = c(2, 3)) Output IGRAPH U--- 5 6 -- Stochastic block model + attr: name (g/c), loops (g/l) @@ -1093,7 +1127,8 @@ --- Code - sbm_game_impl(5, matrix(0.5, 2, 2), c(2, 3), directed = TRUE, loops = TRUE) + sbm_game_impl(n = 5, pref.matrix = matrix(0.5, 2, 2), block.sizes = c(2, 3), + directed = TRUE, loops = TRUE) Output IGRAPH D--- 5 14 -- Stochastic block model + attr: name (g/c), loops (g/l) @@ -1111,7 +1146,7 @@ # hsbm_game_impl basic Code - hsbm_game_impl(6, 2, c(0.5, 0.5), matrix(1, 2, 2), 0.5) + hsbm_game_impl(n = 6, m = 2, rho = c(0.5, 0.5), C = matrix(1, 2, 2), p = 0.5) Output IGRAPH U--- 6 9 -- Hierarchical stochastic block model + attr: name (g/c), m (g/n), rho (g/n), C (g/n), p (g/n) @@ -1129,8 +1164,8 @@ # hsbm_list_game_impl basic Code - hsbm_list_game_impl(100, list(50, 50), rho = list(c(3, 3, 4) / 10), C = list(C), - p = 1 / 20) + hsbm_list_game_impl(n = 100, mlist = list(50, 50), rholist = list(c(3, 3, 4) / + 10), Clist = list(C), p = 1 / 20) Output IGRAPH U--- 100 783 -- Hierarchical stochastic block model + attr: name (g/c), p (g/n) @@ -1156,7 +1191,7 @@ # correlated_game_impl basic Code - correlated_game_impl(g, 0.5) + correlated_game_impl(old.graph = g, corr = 0.5) Output IGRAPH U--- 5 3 -- Correlated random graph + attr: name (g/c), corr (g/n), p (g/n) @@ -1174,7 +1209,7 @@ # correlated_pair_game_impl basic Code - correlated_pair_game_impl(5, 0.5, 0.5) + correlated_pair_game_impl(n = 5, corr = 0.5, p = 0.5) Output $graph1 IGRAPH U--- 5 7 -- @@ -1190,7 +1225,7 @@ --- Code - correlated_pair_game_impl(5, 0.5, 0.5, directed = TRUE) + correlated_pair_game_impl(n = 5, corr = 0.5, p = 0.5, directed = TRUE) Output $graph1 IGRAPH D--- 5 10 -- @@ -1214,7 +1249,7 @@ # dot_product_game_impl basic Code - dot_product_game_impl(matrix(0.5, 5, 2)) + dot_product_game_impl(vecs = matrix(0.5, 5, 2)) Condition Warning in `dot_product_game_impl()`: At vendor/cigraph/src/games/dotproduct.c:90 : Greater than 1 connection probability in dot-product graph. @@ -1226,7 +1261,7 @@ --- Code - dot_product_game_impl(matrix(0.5, 5, 2), directed = TRUE) + dot_product_game_impl(vecs = matrix(0.5, 5, 2), directed = TRUE) Condition Warning in `dot_product_game_impl()`: At vendor/cigraph/src/games/dotproduct.c:90 : Greater than 1 connection probability in dot-product graph. @@ -1246,7 +1281,7 @@ # sample_sphere_surface_impl basic Code - sample_sphere_surface_impl(3, 5) + sample_sphere_surface_impl(dim = 3, n = 5) Output [,1] [,2] [,3] [,4] [,5] [1,] 0.87877523 0.8206548 0.1430028 0.6349227 0.99933629 @@ -1256,7 +1291,7 @@ --- Code - sample_sphere_surface_impl(3, 5, radius = 2, positive = FALSE) + sample_sphere_surface_impl(dim = 3, n = 5, radius = 2, positive = FALSE) Output [,1] [,2] [,3] [,4] [,5] [1,] -0.4904253 -1.4825368 -0.5141332 1.95644246 0.369407 @@ -1274,7 +1309,7 @@ # sample_sphere_volume_impl basic Code - sample_sphere_volume_impl(3, 5) + sample_sphere_volume_impl(dim = 3, n = 5) Output [,1] [,2] [,3] [,4] [,5] [1,] 0.67165090 0.6105364 0.09806950 0.4132698 0.73325518 @@ -1284,7 +1319,7 @@ --- Code - sample_sphere_volume_impl(3, 5, radius = 2, positive = FALSE) + sample_sphere_volume_impl(dim = 3, n = 5, radius = 2, positive = FALSE) Output [,1] [,2] [,3] [,4] [,5] [1,] 1.903629152 -1.3795904 -1.2061886 0.9035986 -1.1692436 @@ -1302,7 +1337,7 @@ # sample_dirichlet_impl basic Code - sample_dirichlet_impl(5, c(1, 1, 1)) + sample_dirichlet_impl(n = 5, alpha = c(1, 1, 1)) Output [,1] [,2] [,3] [,4] [,5] [1,] 0.6298008 0.4168413 0.29594281 0.2432340 0.1516815 @@ -1320,7 +1355,7 @@ # are_adjacent_impl basic Code - are_adjacent_impl(g, 1, 2) + are_adjacent_impl(graph = g, v1 = 1, v2 = 2) Output [1] TRUE @@ -1335,7 +1370,7 @@ # closeness_impl basic Code - closeness_impl(g) + closeness_impl(graph = g) Output $res [1] 0.3333333 0.5000000 0.3333333 @@ -1350,7 +1385,7 @@ --- Code - closeness_impl(g, mode = "in", normalized = TRUE) + closeness_impl(graph = g, mode = "in", normalized = TRUE) Output $res [1] 0.6666667 1.0000000 0.6666667 @@ -1373,7 +1408,7 @@ # closeness_cutoff_impl basic Code - closeness_cutoff_impl(g, cutoff = 2) + closeness_cutoff_impl(graph = g, cutoff = 2) Output $res [1] 0.3333333 0.5000000 0.3333333 @@ -1388,7 +1423,7 @@ --- Code - closeness_cutoff_impl(g, mode = "in", normalized = TRUE, cutoff = 1) + closeness_cutoff_impl(graph = g, mode = "in", normalized = TRUE, cutoff = 1) Output $res [1] 1 1 1 @@ -1411,7 +1446,7 @@ # get_shortest_path_impl basic Code - get_shortest_path_impl(g, 1, 3) + get_shortest_path_impl(graph = g, from = 1, to = 3) Output $vertices + 3/3 vertices: @@ -1433,7 +1468,7 @@ # get_shortest_path_bellman_ford_impl basic Code - get_shortest_path_bellman_ford_impl(g, 1, 3) + get_shortest_path_bellman_ford_impl(graph = g, from = 1, to = 3) Output $vertices + 3/3 vertices: @@ -1455,7 +1490,7 @@ # get_shortest_path_dijkstra_impl basic Code - get_shortest_path_dijkstra_impl(g, 1, 3) + get_shortest_path_dijkstra_impl(graph = g, from = 1, to = 3) Output $vertices + 3/3 vertices: @@ -1477,7 +1512,7 @@ # get_all_shortest_paths_impl basic Code - get_all_shortest_paths_impl(g, 1, 3) + get_all_shortest_paths_impl(graph = g, from = 1, to = 3) Output $vpaths $vpaths[[1]] @@ -1506,7 +1541,7 @@ # get_all_shortest_paths_dijkstra_impl basic Code - get_all_shortest_paths_dijkstra_impl(g, 1, 3) + get_all_shortest_paths_dijkstra_impl(graph = g, from = 1, to = 3) Output $vpaths $vpaths[[1]] @@ -1535,7 +1570,7 @@ # voronoi_impl basic Code - voronoi_impl(g, 1) + voronoi_impl(graph = g, generators = 1) Output $membership [1] 0 0 0 @@ -1547,7 +1582,7 @@ --- Code - voronoi_impl(g, 1, mode = "in", tiebreaker = "first") + voronoi_impl(graph = g, generators = 1, mode = "in", tiebreaker = "first") Output $membership [1] 0 0 0 @@ -1567,7 +1602,7 @@ # get_all_simple_paths_impl basic Code - get_all_simple_paths_impl(g, 1, 3) + get_all_simple_paths_impl(graph = g, from = 1, to = 3) Output + 3/3 vertices: [1] 1 2 3 @@ -1583,7 +1618,7 @@ # get_k_shortest_paths_impl basic Code - get_k_shortest_paths_impl(g, 1, 3, k = 2) + get_k_shortest_paths_impl(graph = g, from = 1, to = 3, k = 2) Output $vpaths $vpaths[[1]] @@ -1609,7 +1644,7 @@ # get_widest_path_impl basic Code - get_widest_path_impl(g, 1, 3, weights = c(1, 2)) + get_widest_path_impl(graph = g, from = 1, to = 3, weights = c(1, 2)) Output $vertices + 3/3 vertices: @@ -1631,7 +1666,7 @@ # get_widest_paths_impl basic Code - get_widest_paths_impl(g, 1, 3, weights = c(1, 2)) + get_widest_paths_impl(graph = g, from = 1, to = 3, weights = c(1, 2)) Output $vertices $vertices[[1]] @@ -1663,7 +1698,7 @@ # spanner_impl basic Code - spanner_impl(g, 2) + spanner_impl(graph = g, stretch = 2) Output + 2/2 edges: [1] 1--2 2--3 @@ -1679,7 +1714,7 @@ # betweenness_cutoff_impl basic Code - betweenness_cutoff_impl(g, cutoff = 2) + betweenness_cutoff_impl(graph = g, cutoff = 2) Output [1] 0 1 0 @@ -1694,7 +1729,7 @@ # betweenness_subset_impl basic Code - betweenness_subset_impl(g) + betweenness_subset_impl(graph = g) Output [1] 0 1 0 @@ -1709,7 +1744,7 @@ # edge_betweenness_impl basic Code - edge_betweenness_impl(g) + edge_betweenness_impl(graph = g) Output [1] 2 2 @@ -1724,7 +1759,7 @@ # edge_betweenness_cutoff_impl basic Code - edge_betweenness_cutoff_impl(g, cutoff = 2) + edge_betweenness_cutoff_impl(graph = g, cutoff = 2) Output [1] 2 2 @@ -1739,7 +1774,7 @@ # edge_betweenness_subset_impl basic Code - edge_betweenness_subset_impl(g) + edge_betweenness_subset_impl(graph = g) Output [1] 2 2 @@ -1754,7 +1789,7 @@ # harmonic_centrality_cutoff_impl basic Code - harmonic_centrality_cutoff_impl(g, cutoff = 2) + harmonic_centrality_cutoff_impl(graph = g, cutoff = 2) Output [1] 1.5 2.0 1.5 @@ -1769,7 +1804,7 @@ # personalized_pagerank_impl basic Code - personalized_pagerank_impl(g) + personalized_pagerank_impl(graph = g) Output $vector [1] 0.2567568 0.4864865 0.2567568 @@ -1784,7 +1819,7 @@ --- Code - personalized_pagerank_impl(g, algo = "arpack", damping = 0.9) + personalized_pagerank_impl(graph = g, algo = "arpack", damping = 0.9) Output $vector [1] 0.2543860 0.4912281 0.2543860 @@ -1866,14 +1901,15 @@ # personalized_pagerank_vs_impl basic Code - personalized_pagerank_vs_impl(g, reset.vids = 1) + personalized_pagerank_vs_impl(graph = g, reset.vids = 1) Output [1] 0.3452703 0.4594595 0.1952703 --- Code - personalized_pagerank_vs_impl(g, algo = "arpack", reset.vids = 1, details = TRUE) + personalized_pagerank_vs_impl(graph = g, algo = "arpack", reset.vids = 1, + details = TRUE) Output $vector [1] 0.3452703 0.4594595 0.1952703 @@ -1955,7 +1991,7 @@ # induced_subgraph_impl basic Code - induced_subgraph_impl(g, 1:2) + induced_subgraph_impl(graph = g, vids = 1:2) Output IGRAPH U--- 2 1 -- + edge: @@ -1972,7 +2008,7 @@ # subgraph_from_edges_impl basic Code - subgraph_from_edges_impl(g, 1) + subgraph_from_edges_impl(graph = g, eids = 1) Output IGRAPH U--- 2 1 -- + edge: @@ -1989,7 +2025,7 @@ # reverse_edges_impl basic Code - reverse_edges_impl(g) + reverse_edges_impl(graph = g) Output IGRAPH U--- 3 2 -- + edges: @@ -2006,7 +2042,7 @@ # path_length_hist_impl basic Code - path_length_hist_impl(g) + path_length_hist_impl(graph = g) Output $res [1] 2 1 @@ -2018,7 +2054,7 @@ --- Code - path_length_hist_impl(g, directed = FALSE) + path_length_hist_impl(graph = g, directed = FALSE) Output $res [1] 2 1 @@ -2038,7 +2074,7 @@ # simplify_impl basic Code - simplify_impl(g) + simplify_impl(graph = g) Output IGRAPH U--- 3 2 -- + edges: @@ -2047,7 +2083,7 @@ --- Code - simplify_impl(g, remove.multiple = FALSE, remove.loops = FALSE) + simplify_impl(graph = g, remove.multiple = FALSE, remove.loops = FALSE) Output IGRAPH U--- 3 2 -- + edges: @@ -2064,14 +2100,14 @@ # transitivity_undirected_impl basic Code - transitivity_undirected_impl(g) + transitivity_undirected_impl(graph = g) Output [1] 0 --- Code - transitivity_undirected_impl(g, mode = "zero") + transitivity_undirected_impl(graph = g, mode = "zero") Output [1] 0 @@ -2086,14 +2122,14 @@ # transitivity_local_undirected_impl basic Code - transitivity_local_undirected_impl(g) + transitivity_local_undirected_impl(graph = g) Output [1] NaN 0 NaN --- Code - transitivity_local_undirected_impl(g, mode = "zero") + transitivity_local_undirected_impl(graph = g, mode = "zero") Output [1] 0 0 0 @@ -2108,14 +2144,14 @@ # transitivity_avglocal_undirected_impl basic Code - transitivity_avglocal_undirected_impl(g) + transitivity_avglocal_undirected_impl(graph = g) Output [1] 0 --- Code - transitivity_avglocal_undirected_impl(g, mode = "zero") + transitivity_avglocal_undirected_impl(graph = g, mode = "zero") Output [1] 0 @@ -2130,7 +2166,7 @@ # transitivity_barrat_impl basic Code - transitivity_barrat_impl(g) + transitivity_barrat_impl(graph = g) Condition Warning in `transitivity_barrat_impl()`: At vendor/cigraph/src/properties/triangles.c:913 : No weights given for Barrat's transitivity, unweighted version is used. @@ -2140,7 +2176,7 @@ --- Code - transitivity_barrat_impl(g, mode = "zero") + transitivity_barrat_impl(graph = g, mode = "zero") Condition Warning in `transitivity_barrat_impl()`: At vendor/cigraph/src/properties/triangles.c:913 : No weights given for Barrat's transitivity, unweighted version is used. @@ -2158,14 +2194,14 @@ # ecc_impl basic Code - ecc_impl(g) + ecc_impl(graph = g) Output [1] NaN 0 NaN --- Code - ecc_impl(g, k = 3, offset = TRUE, normalize = FALSE) + ecc_impl(graph = g, k = 3, offset = TRUE, normalize = FALSE) Output [1] 1 1 1 @@ -2180,14 +2216,14 @@ # reciprocity_impl basic Code - reciprocity_impl(g) + reciprocity_impl(graph = g) Output [1] 1 --- Code - reciprocity_impl(g, ignore.loops = FALSE, mode = "ratio") + reciprocity_impl(graph = g, ignore.loops = FALSE, mode = "ratio") Output [1] 1 @@ -2202,14 +2238,14 @@ # maxdegree_impl basic Code - maxdegree_impl(g) + maxdegree_impl(graph = g) Output [1] 2 --- Code - maxdegree_impl(g, mode = "in", loops = FALSE) + maxdegree_impl(graph = g, mode = "in", loops = FALSE) Output [1] 2 @@ -2224,14 +2260,14 @@ # density_impl basic Code - density_impl(g) + density_impl(graph = g) Output [1] 0.6666667 --- Code - density_impl(g, loops = TRUE) + density_impl(graph = g, loops = TRUE) Output [1] 0.3333333 @@ -2246,14 +2282,14 @@ # mean_degree_impl basic Code - mean_degree_impl(g) + mean_degree_impl(graph = g) Output [1] 1.333333 --- Code - mean_degree_impl(g, loops = FALSE) + mean_degree_impl(graph = g, loops = FALSE) Output [1] 1.333333 @@ -2268,14 +2304,14 @@ # feedback_arc_set_impl basic Code - feedback_arc_set_impl(g) + feedback_arc_set_impl(graph = g) Output + 0/2 edges: --- Code - feedback_arc_set_impl(g, algo = "exact_ip") + feedback_arc_set_impl(graph = g, algo = "exact_ip") Output + 0/2 edges: @@ -2290,7 +2326,7 @@ # feedback_vertex_set_impl basic Code - feedback_vertex_set_impl(g) + feedback_vertex_set_impl(graph = g) Output + 0/3 vertices: @@ -2305,7 +2341,7 @@ # is_loop_impl basic Code - is_loop_impl(g) + is_loop_impl(graph = g) Output [1] FALSE FALSE @@ -2320,7 +2356,7 @@ # is_dag_impl basic Code - is_dag_impl(g) + is_dag_impl(graph = g) Output [1] FALSE @@ -2335,7 +2371,7 @@ # is_acyclic_impl basic Code - is_acyclic_impl(g) + is_acyclic_impl(graph = g) Output [1] TRUE @@ -2350,7 +2386,7 @@ # is_simple_impl basic Code - is_simple_impl(g) + is_simple_impl(graph = g) Output [1] TRUE @@ -2365,7 +2401,7 @@ # is_multiple_impl basic Code - is_multiple_impl(g) + is_multiple_impl(graph = g) Output [1] FALSE FALSE @@ -2380,7 +2416,7 @@ # has_loop_impl basic Code - has_loop_impl(g) + has_loop_impl(graph = g) Output [1] FALSE @@ -2395,7 +2431,7 @@ # has_multiple_impl basic Code - has_multiple_impl(g) + has_multiple_impl(graph = g) Output [1] FALSE @@ -2410,7 +2446,7 @@ # count_loops_impl basic Code - count_loops_impl(g) + count_loops_impl(graph = g) Output [1] 0 @@ -2425,7 +2461,7 @@ # count_multiple_impl basic Code - count_multiple_impl(g) + count_multiple_impl(graph = g) Output [1] 1 1 @@ -2440,7 +2476,7 @@ # is_perfect_impl basic Code - is_perfect_impl(g) + is_perfect_impl(graph = g) Output [1] TRUE @@ -2455,7 +2491,7 @@ # eigenvector_centrality_impl basic Code - eigenvector_centrality_impl(g) + eigenvector_centrality_impl(graph = g) Output $vector [1] 0.7071068 1.0000000 0.7071068 @@ -2529,7 +2565,7 @@ --- Code - eigenvector_centrality_impl(g, directed = TRUE, scale = FALSE) + eigenvector_centrality_impl(graph = g, directed = TRUE, scale = FALSE) Output $vector [1] 0.5000000 0.7071068 0.5000000 @@ -2611,7 +2647,7 @@ # hub_and_authority_scores_impl basic Code - hub_and_authority_scores_impl(g) + hub_and_authority_scores_impl(graph = g) Output $hub [1] 1 1 1 1 1 @@ -2688,7 +2724,7 @@ --- Code - hub_and_authority_scores_impl(g, scale = FALSE) + hub_and_authority_scores_impl(graph = g, scale = FALSE) Output $hub [1] 0.4472136 0.4472136 0.4472136 0.4472136 0.4472136 @@ -2773,7 +2809,7 @@ # unfold_tree_impl basic Code - unfold_tree_impl(g, roots = 1) + unfold_tree_impl(graph = g, roots = 1) Output $tree IGRAPH U--- 3 2 -- @@ -2787,7 +2823,7 @@ --- Code - unfold_tree_impl(g, mode = "in", roots = 1) + unfold_tree_impl(graph = g, mode = "in", roots = 1) Output $tree IGRAPH U--- 3 2 -- @@ -2809,14 +2845,14 @@ # is_mutual_impl basic Code - is_mutual_impl(g) + is_mutual_impl(graph = g) Output [1] TRUE TRUE --- Code - is_mutual_impl(g, loops = FALSE) + is_mutual_impl(graph = g, loops = FALSE) Output [1] TRUE TRUE @@ -2831,14 +2867,14 @@ # has_mutual_impl basic Code - has_mutual_impl(g) + has_mutual_impl(graph = g) Output [1] TRUE --- Code - has_mutual_impl(g, loops = FALSE) + has_mutual_impl(graph = g, loops = FALSE) Output [1] TRUE @@ -2853,7 +2889,7 @@ # maximum_cardinality_search_impl basic Code - maximum_cardinality_search_impl(g) + maximum_cardinality_search_impl(graph = g) Output $alpha [1] 3 2 1 @@ -2874,7 +2910,7 @@ # avg_nearest_neighbor_degree_impl basic Code - avg_nearest_neighbor_degree_impl(g) + avg_nearest_neighbor_degree_impl(graph = g) Output $knn [1] 2 1 2 @@ -2886,7 +2922,7 @@ --- Code - avg_nearest_neighbor_degree_impl(g, mode = "in", neighbor.degree.mode = "out") + avg_nearest_neighbor_degree_impl(graph = g, mode = "in", neighbor.degree.mode = "out") Output $knn [1] 2 1 2 @@ -2906,14 +2942,14 @@ # degree_correlation_vector_impl basic Code - degree_correlation_vector_impl(g) + degree_correlation_vector_impl(graph = g) Output [1] NaN 2 1 --- Code - degree_correlation_vector_impl(g, from.mode = "in", to.mode = "out", + degree_correlation_vector_impl(graph = g, from.mode = "in", to.mode = "out", directed.neighbors = FALSE) Output [1] NaN 2 1 @@ -2929,15 +2965,15 @@ # rich_club_sequence_impl basic Code - rich_club_sequence_impl(g, vertex.order = 1:3) + rich_club_sequence_impl(graph = g, vertex.order = 1:3) Output [1] 0.6666667 1.0000000 NaN --- Code - rich_club_sequence_impl(g, vertex.order = 1:3, normalized = FALSE, loops = TRUE, - directed = FALSE) + rich_club_sequence_impl(graph = g, vertex.order = 1:3, normalized = FALSE, + loops = TRUE, directed = FALSE) Output [1] 2 1 0 @@ -2952,14 +2988,14 @@ # strength_impl basic Code - strength_impl(g) + strength_impl(graph = g) Output [1] 1 2 1 --- Code - strength_impl(g, mode = "in", loops = FALSE) + strength_impl(graph = g, mode = "in", loops = FALSE) Output [1] 1 2 1 @@ -2974,14 +3010,14 @@ # centralization_impl basic Code - centralization_impl(c(1, 2, 3)) + centralization_impl(scores = c(1, 2, 3)) Output [1] Inf --- Code - centralization_impl(c(1, 2, 3), theoretical.max = 2, normalized = FALSE) + centralization_impl(scores = c(1, 2, 3), theoretical.max = 2, normalized = FALSE) Output [1] 3 @@ -2996,7 +3032,7 @@ # centralization_degree_impl basic Code - centralization_degree_impl(g) + centralization_degree_impl(graph = g) Output $res [1] 1 2 1 @@ -3011,7 +3047,7 @@ --- Code - centralization_degree_impl(g, mode = "in", loops = FALSE, normalized = FALSE) + centralization_degree_impl(graph = g, mode = "in", loops = FALSE, normalized = FALSE) Output $res [1] 1 2 1 @@ -3056,7 +3092,7 @@ # centralization_betweenness_impl basic Code - centralization_betweenness_impl(g) + centralization_betweenness_impl(graph = g) Output $res [1] 0 1 0 @@ -3071,7 +3107,7 @@ --- Code - centralization_betweenness_impl(g, directed = FALSE, normalized = FALSE) + centralization_betweenness_impl(graph = g, directed = FALSE, normalized = FALSE) Output $res [1] 0 1 0 @@ -3116,7 +3152,7 @@ # centralization_closeness_impl basic Code - centralization_closeness_impl(g) + centralization_closeness_impl(graph = g) Output $res [1] 0.6666667 1.0000000 0.6666667 @@ -3131,7 +3167,7 @@ --- Code - centralization_closeness_impl(g, mode = "in", normalized = FALSE) + centralization_closeness_impl(graph = g, mode = "in", normalized = FALSE) Output $res [1] 0.6666667 1.0000000 0.6666667 @@ -3176,7 +3212,7 @@ # centralization_eigenvector_centrality_impl basic Code - centralization_eigenvector_centrality_impl(g) + centralization_eigenvector_centrality_impl(graph = g) Output $vector [1] 0.7071068 1.0000000 0.7071068 @@ -3256,7 +3292,8 @@ --- Code - centralization_eigenvector_centrality_impl(g, directed = TRUE, normalized = FALSE) + centralization_eigenvector_centrality_impl(graph = g, directed = TRUE, + normalized = FALSE) Output $vector [1] 0.7071068 1.0000000 0.7071068 @@ -3366,14 +3403,15 @@ # assortativity_nominal_impl basic Code - assortativity_nominal_impl(g, c(1, 2, 1)) + assortativity_nominal_impl(graph = g, types = c(1, 2, 1)) Output [1] -1 --- Code - assortativity_nominal_impl(g, c(1, 2, 1), directed = FALSE, normalized = FALSE) + assortativity_nominal_impl(graph = g, types = c(1, 2, 1), directed = FALSE, + normalized = FALSE) Output [1] -0.5 @@ -3388,14 +3426,15 @@ # assortativity_impl basic Code - assortativity_impl(g, c(1, 2, 1)) + assortativity_impl(graph = g, values = c(1, 2, 1)) Output [1] -1 --- Code - assortativity_impl(g, c(1, 2, 1), directed = FALSE, normalized = FALSE) + assortativity_impl(graph = g, values = c(1, 2, 1), directed = FALSE, + normalized = FALSE) Output [1] -0.25 @@ -3410,14 +3449,14 @@ # assortativity_degree_impl basic Code - assortativity_degree_impl(g) + assortativity_degree_impl(graph = g) Output [1] -1 --- Code - assortativity_degree_impl(g, directed = FALSE) + assortativity_degree_impl(graph = g, directed = FALSE) Output [1] -1 @@ -3432,7 +3471,7 @@ # joint_degree_matrix_impl basic Code - joint_degree_matrix_impl(g) + joint_degree_matrix_impl(graph = g) Output [,1] [,2] [1,] 0 2 @@ -3441,7 +3480,7 @@ --- Code - joint_degree_matrix_impl(g, max.out.degree = 2, max.in.degree = 2) + joint_degree_matrix_impl(graph = g, max.out.degree = 2, max.in.degree = 2) Output [,1] [,2] [1,] 0 2 @@ -3458,7 +3497,7 @@ # joint_degree_distribution_impl basic Code - joint_degree_distribution_impl(g) + joint_degree_distribution_impl(graph = g) Output [,1] [,2] [,3] [1,] 0 0.0 0.0 @@ -3468,7 +3507,7 @@ --- Code - joint_degree_distribution_impl(g, from.mode = "in", to.mode = "out", + joint_degree_distribution_impl(graph = g, from.mode = "in", to.mode = "out", directed.neighbors = FALSE, normalized = FALSE, max.from.degree = 2, max.to.degree = 2) Output @@ -3488,7 +3527,7 @@ # joint_type_distribution_impl basic Code - joint_type_distribution_impl(g, from.types = c(1, 2, 1)) + joint_type_distribution_impl(graph = g, from.types = c(1, 2, 1)) Output [,1] [,2] [1,] 0.0 0.5 @@ -3497,8 +3536,8 @@ --- Code - joint_type_distribution_impl(g, from.types = c(1, 2, 1), to.types = c(1, 2, 1), - directed = FALSE, normalized = FALSE) + joint_type_distribution_impl(graph = g, from.types = c(1, 2, 1), to.types = c(1, + 2, 1), directed = FALSE, normalized = FALSE) Output [,1] [,2] [1,] 0 2 @@ -3515,7 +3554,7 @@ # contract_vertices_impl basic Code - contract_vertices_impl(g, c(1, 1, 2)) + contract_vertices_impl(graph = g, mapping = c(1, 1, 2)) Output IGRAPH U--- 2 2 -- + edges: @@ -3532,14 +3571,14 @@ # eccentricity_dijkstra_impl basic Code - eccentricity_dijkstra_impl(g) + eccentricity_dijkstra_impl(graph = g) Output [1] 2 1 2 --- Code - eccentricity_dijkstra_impl(g, mode = "in") + eccentricity_dijkstra_impl(graph = g, mode = "in") Output [1] 2 1 2 @@ -3554,7 +3593,7 @@ # graph_center_dijkstra_impl basic Code - graph_center_dijkstra_impl(g) + graph_center_dijkstra_impl(graph = g) Output + 1/3 vertex: [1] 2 @@ -3562,7 +3601,7 @@ --- Code - graph_center_dijkstra_impl(g, mode = "in") + graph_center_dijkstra_impl(graph = g, mode = "in") Output + 1/3 vertex: [1] 2 @@ -3578,14 +3617,14 @@ # radius_dijkstra_impl basic Code - radius_dijkstra_impl(g) + radius_dijkstra_impl(graph = g) Output [1] 1 --- Code - radius_dijkstra_impl(g, mode = "in") + radius_dijkstra_impl(graph = g, mode = "in") Output [1] 1 @@ -3600,7 +3639,7 @@ # pseudo_diameter_impl basic Code - pseudo_diameter_impl(g, 1) + pseudo_diameter_impl(graph = g, start.vid = 1) Output $diameter [1] 2 @@ -3615,7 +3654,7 @@ --- Code - pseudo_diameter_impl(g, 1, directed = FALSE, unconnected = FALSE) + pseudo_diameter_impl(graph = g, start.vid = 1, directed = FALSE, unconnected = FALSE) Output $diameter [1] 2 @@ -3638,7 +3677,7 @@ # pseudo_diameter_dijkstra_impl basic Code - pseudo_diameter_dijkstra_impl(g, start.vid = 1) + pseudo_diameter_dijkstra_impl(graph = g, start.vid = 1) Output $diameter [1] 2 @@ -3653,7 +3692,8 @@ --- Code - pseudo_diameter_dijkstra_impl(g, start.vid = 1, directed = FALSE, unconnected = FALSE) + pseudo_diameter_dijkstra_impl(graph = g, start.vid = 1, directed = FALSE, + unconnected = FALSE) Output $diameter [1] 2 @@ -3676,7 +3716,7 @@ # diversity_impl basic Code - diversity_impl(g) + diversity_impl(graph = g) Output [1] 0.0000000 0.9182958 0.0000000 @@ -3691,7 +3731,7 @@ # random_walk_impl basic Code - random_walk_impl(g, 1, 2) + random_walk_impl(graph = g, start = 1, steps = 2) Output $vertices + 3/3 vertices: @@ -3705,7 +3745,7 @@ --- Code - random_walk_impl(g, 1, 2, mode = "in", stuck = "error") + random_walk_impl(graph = g, start = 1, steps = 2, mode = "in", stuck = "error") Output $vertices + 3/3 vertices: @@ -3727,14 +3767,14 @@ # global_efficiency_impl basic Code - global_efficiency_impl(g) + global_efficiency_impl(graph = g) Output [1] 0.8333333 --- Code - global_efficiency_impl(g, directed = FALSE) + global_efficiency_impl(graph = g, directed = FALSE) Output [1] 0.8333333 @@ -3749,14 +3789,14 @@ # local_efficiency_impl basic Code - local_efficiency_impl(g) + local_efficiency_impl(graph = g) Output [1] 0 0 0 --- Code - local_efficiency_impl(g, directed = FALSE, mode = "in") + local_efficiency_impl(graph = g, directed = FALSE, mode = "in") Output [1] 0 0 0 @@ -3771,14 +3811,14 @@ # average_local_efficiency_impl basic Code - average_local_efficiency_impl(g) + average_local_efficiency_impl(graph = g) Output [1] 0 --- Code - average_local_efficiency_impl(g, directed = FALSE, mode = "in") + average_local_efficiency_impl(graph = g, directed = FALSE, mode = "in") Output [1] 0 @@ -3793,7 +3833,7 @@ # transitive_closure_dag_impl basic Code - transitive_closure_dag_impl(g) + transitive_closure_dag_impl(graph = g) Output IGRAPH D--- 3 3 -- + edges: @@ -3810,7 +3850,7 @@ # transitive_closure_impl basic Code - transitive_closure_impl(g) + transitive_closure_impl(graph = g) Output IGRAPH U--- 3 3 -- + edges: @@ -3827,7 +3867,7 @@ # trussness_impl basic Code - trussness_impl(g) + trussness_impl(graph = g) Output [1] 2 2 @@ -3842,14 +3882,15 @@ # is_graphical_impl basic Code - is_graphical_impl(c(2, 2, 2)) + is_graphical_impl(out.deg = c(2, 2, 2)) Output [1] TRUE --- Code - is_graphical_impl(c(2, 2, 2), c(1, 1, 1), allowed.edge.types = "all") + is_graphical_impl(out.deg = c(2, 2, 2), in.deg = c(1, 1, 1), + allowed.edge.types = "all") Output [1] FALSE @@ -3866,7 +3907,7 @@ # bfs_simple_impl basic Code - bfs_simple_impl(g, 1) + bfs_simple_impl(graph = g, root = 1) Output $order + 3/3 vertices: @@ -3882,7 +3923,7 @@ --- Code - bfs_simple_impl(g, 1, mode = "in") + bfs_simple_impl(graph = g, root = 1, mode = "in") Output $order + 3/3 vertices: @@ -3906,7 +3947,7 @@ # bipartite_projection_size_impl basic Code - bipartite_projection_size_impl(g) + bipartite_projection_size_impl(graph = g) Output $vcount1 [1] 2 @@ -3932,7 +3973,7 @@ # biadjacency_impl basic Code - biadjacency_impl(m) + biadjacency_impl(incidence = m) Output $graph IGRAPH U--- 5 4 -- @@ -3946,7 +3987,7 @@ --- Code - biadjacency_impl(m, directed = TRUE, mode = "in", multiple = TRUE) + biadjacency_impl(incidence = m, directed = TRUE, mode = "in", multiple = TRUE) Output $graph IGRAPH D--- 5 4 -- @@ -3970,7 +4011,7 @@ # get_biadjacency_impl basic Code - get_biadjacency_impl(g, c(TRUE, FALSE, TRUE)) + get_biadjacency_impl(graph = g, types = c(TRUE, FALSE, TRUE)) Output $res [,1] [,2] @@ -3994,7 +4035,7 @@ # is_bipartite_impl basic Code - is_bipartite_impl(g) + is_bipartite_impl(graph = g) Output $res [1] TRUE @@ -4014,7 +4055,7 @@ # bipartite_game_gnp_impl basic Code - bipartite_game_gnp_impl(2, 2, 0.5) + bipartite_game_gnp_impl(n1 = 2, n2 = 2, p = 0.5) Output $graph IGRAPH U--- 4 4 -- @@ -4028,7 +4069,7 @@ --- Code - bipartite_game_gnp_impl(2, 2, 0.5, directed = TRUE, mode = "in") + bipartite_game_gnp_impl(n1 = 2, n2 = 2, p = 0.5, directed = TRUE, mode = "in") Output $graph IGRAPH D--- 4 1 -- @@ -4050,7 +4091,7 @@ # bipartite_game_gnm_impl basic Code - bipartite_game_gnm_impl(2, 2, 1) + bipartite_game_gnm_impl(n1 = 2, n2 = 2, m = 1) Output $graph IGRAPH U--- 4 1 -- @@ -4064,7 +4105,7 @@ --- Code - bipartite_game_gnm_impl(2, 2, 1, directed = TRUE, mode = "in") + bipartite_game_gnm_impl(n1 = 2, n2 = 2, m = 1, directed = TRUE, mode = "in") Output $graph IGRAPH D--- 4 1 -- @@ -4086,7 +4127,7 @@ # get_laplacian_impl basic Code - get_laplacian_impl(g) + get_laplacian_impl(graph = g) Output [,1] [,2] [,3] [1,] 1 -1 0 @@ -4096,8 +4137,8 @@ --- Code - get_laplacian_impl(g, mode = "in", normalization = "symmetric", weights = c(1, - 2)) + get_laplacian_impl(graph = g, mode = "in", normalization = "symmetric", + weights = c(1, 2)) Output [,1] [,2] [,3] [1,] 1.0000000 -0.5773503 0.0000000 @@ -4115,7 +4156,7 @@ # get_laplacian_sparse_impl basic Code - get_laplacian_sparse_impl(g) + get_laplacian_sparse_impl(graph = g) Output $type [1] "triplet" @@ -4138,8 +4179,8 @@ --- Code - get_laplacian_sparse_impl(g, mode = "in", normalization = "symmetric", weights = c( - 1, 2)) + get_laplacian_sparse_impl(graph = g, mode = "in", normalization = "symmetric", + weights = c(1, 2)) Output $type [1] "triplet" @@ -4170,14 +4211,14 @@ # connected_components_impl basic Code - connected_components_impl(g) + connected_components_impl(graph = g) Output [1] 0 0 0 --- Code - connected_components_impl(g, mode = "strong", details = TRUE) + connected_components_impl(graph = g, mode = "strong", details = TRUE) Output $membership [1] 0 0 0 @@ -4200,14 +4241,14 @@ # is_connected_impl basic Code - is_connected_impl(g) + is_connected_impl(graph = g) Output [1] TRUE --- Code - is_connected_impl(g, mode = "strong") + is_connected_impl(graph = g, mode = "strong") Output [1] TRUE @@ -4222,7 +4263,7 @@ # articulation_points_impl basic Code - articulation_points_impl(g) + articulation_points_impl(graph = g) Output + 1/3 vertex: [1] 2 @@ -4238,7 +4279,7 @@ # biconnected_components_impl basic Code - biconnected_components_impl(g) + biconnected_components_impl(graph = g) Output $no [1] 2 @@ -4293,7 +4334,7 @@ # bridges_impl basic Code - bridges_impl(g) + bridges_impl(graph = g) Output + 2/2 edges: [1] 2--3 1--2 @@ -4309,7 +4350,7 @@ # is_biconnected_impl basic Code - is_biconnected_impl(g) + is_biconnected_impl(graph = g) Output [1] FALSE @@ -4324,14 +4365,14 @@ # count_reachable_impl basic Code - count_reachable_impl(g, mode = "out") + count_reachable_impl(graph = g, mode = "out") Output [1] 5 5 5 5 5 --- Code - count_reachable_impl(g, mode = "in") + count_reachable_impl(graph = g, mode = "in") Output [1] 5 5 5 5 5 @@ -4346,7 +4387,7 @@ # bond_percolation_impl basic Code - bond_percolation_impl(g) + bond_percolation_impl(graph = g) Output $giant_size numeric(0) @@ -4366,7 +4407,7 @@ # site_percolation_impl basic Code - site_percolation_impl(g) + site_percolation_impl(graph = g) Output $giant_size numeric(0) @@ -4386,7 +4427,7 @@ # edgelist_percolation_impl basic Code - edgelist_percolation_impl(matrix(c(1, 2, 2, 3), ncol = 2)) + edgelist_percolation_impl(edges = matrix(c(1, 2, 2, 3), ncol = 2)) Output $giant_size [1] 2 3 @@ -4406,14 +4447,14 @@ # is_clique_impl basic Code - is_clique_impl(g, 1:2) + is_clique_impl(graph = g, candidate = 1:2) Output [1] TRUE --- Code - is_clique_impl(g, 1:2, directed = TRUE) + is_clique_impl(graph = g, candidate = 1:2, directed = TRUE) Output [1] TRUE @@ -4428,7 +4469,7 @@ # cliques_impl basic Code - cliques_impl(g) + cliques_impl(graph = g) Output [[1]] + 1/3 vertex: @@ -4454,7 +4495,7 @@ --- Code - cliques_impl(g, min = 2, max = 2) + cliques_impl(graph = g, min = 2, max = 2) Output [[1]] + 2/3 vertices: @@ -4476,14 +4517,14 @@ # clique_size_hist_impl basic Code - clique_size_hist_impl(g) + clique_size_hist_impl(graph = g) Output [1] 3 2 --- Code - clique_size_hist_impl(g, min.size = 2, max.size = 2) + clique_size_hist_impl(graph = g, min.size = 2, max.size = 2) Output [1] 0 2 @@ -4498,7 +4539,7 @@ # largest_cliques_impl basic Code - largest_cliques_impl(g) + largest_cliques_impl(graph = g) Output [[1]] + 2/3 vertices: @@ -4520,14 +4561,14 @@ # maximal_cliques_hist_impl basic Code - maximal_cliques_hist_impl(g) + maximal_cliques_hist_impl(graph = g) Output [1] 0 2 --- Code - maximal_cliques_hist_impl(g, min.size = 2, max.size = 2) + maximal_cliques_hist_impl(graph = g, min.size = 2, max.size = 2) Output [1] 0 2 @@ -4542,7 +4583,7 @@ # clique_number_impl basic Code - clique_number_impl(g) + clique_number_impl(graph = g) Output [1] 2 @@ -4557,7 +4598,7 @@ # weighted_cliques_impl basic Code - weighted_cliques_impl(g) + weighted_cliques_impl(graph = g) Output [[1]] + 1/3 vertex: @@ -4583,7 +4624,7 @@ --- Code - weighted_cliques_impl(g, vertex.weights = c(1, 2, 3), min.weight = 1, + weighted_cliques_impl(graph = g, vertex.weights = c(1, 2, 3), min.weight = 1, max.weight = 3, maximal = TRUE) Output [[1]] @@ -4602,7 +4643,7 @@ # largest_weighted_cliques_impl basic Code - largest_weighted_cliques_impl(g) + largest_weighted_cliques_impl(graph = g) Output [[1]] + 2/3 vertices: @@ -4616,7 +4657,7 @@ --- Code - largest_weighted_cliques_impl(g, vertex.weights = c(1, 2, 3)) + largest_weighted_cliques_impl(graph = g, vertex.weights = c(1, 2, 3)) Output [[1]] + 2/3 vertices: @@ -4634,14 +4675,14 @@ # weighted_clique_number_impl basic Code - weighted_clique_number_impl(g) + weighted_clique_number_impl(graph = g) Output [1] 2 --- Code - weighted_clique_number_impl(g, vertex.weights = c(1, 2, 3)) + weighted_clique_number_impl(graph = g, vertex.weights = c(1, 2, 3)) Output [1] 5 @@ -4656,7 +4697,7 @@ # is_independent_vertex_set_impl basic Code - is_independent_vertex_set_impl(g, 1:2) + is_independent_vertex_set_impl(graph = g, candidate = 1:2) Output [1] FALSE @@ -4671,7 +4712,7 @@ # layout_random_impl basic Code - layout_random_impl(g) + layout_random_impl(graph = g) Output [,1] [,2] [1,] 0.91714717 0.7003783 @@ -4689,7 +4730,7 @@ # layout_circle_impl basic Code - layout_circle_impl(g) + layout_circle_impl(graph = g) Output [,1] [,2] [1,] 1.0 0.0000000 @@ -4699,7 +4740,7 @@ --- Code - layout_circle_impl(g, order = 1:3) + layout_circle_impl(graph = g, order = 1:3) Output [,1] [,2] [1,] 1.0 0.0000000 @@ -4717,7 +4758,7 @@ # layout_star_impl basic Code - round(layout_star_impl(g), 4) + round(layout_star_impl(graph = g), 4) Output [,1] [,2] [1,] 0 0 @@ -4727,7 +4768,7 @@ --- Code - round(layout_star_impl(g, center = 1, order = 3:1), 4) + round(layout_star_impl(graph = g, center = 1, order = 3:1), 4) Output [,1] [,2] [1,] 0 0 @@ -4745,7 +4786,7 @@ # layout_grid_impl basic Code - layout_grid_impl(g) + layout_grid_impl(graph = g) Output [,1] [,2] [1,] 0 0 @@ -4755,7 +4796,7 @@ --- Code - layout_grid_impl(g, width = 2) + layout_grid_impl(graph = g, width = 2) Output [,1] [,2] [1,] 0 0 @@ -4773,7 +4814,7 @@ # layout_grid_3d_impl basic Code - layout_grid_3d_impl(g) + layout_grid_3d_impl(graph = g) Output [,1] [,2] [,3] [1,] 0 0 0 @@ -4783,7 +4824,7 @@ --- Code - layout_grid_3d_impl(g, width = 2, height = 2) + layout_grid_3d_impl(graph = g, width = 2, height = 2) Output [,1] [,2] [,3] [1,] 0 0 0 @@ -4801,7 +4842,7 @@ # roots_for_tree_layout_impl basic Code - roots_for_tree_layout_impl(g, mode = "out", heuristic = 1) + roots_for_tree_layout_impl(graph = g, mode = "out", heuristic = 1) Output + 1/3 vertex: [1] 2 @@ -4817,7 +4858,7 @@ # layout_random_3d_impl basic Code - layout_random_3d_impl(g) + layout_random_3d_impl(graph = g) Output [,1] [,2] [,3] [1,] 0.91714717 0.7003783 0.7338074 @@ -4835,7 +4876,7 @@ # layout_sphere_impl basic Code - layout_sphere_impl(g) + layout_sphere_impl(graph = g) Output [,1] [,2] [,3] [1,] 0.0000000 0.0000000 -1 @@ -4853,7 +4894,7 @@ # layout_sugiyama_impl basic Code - layout_sugiyama_impl(g) + layout_sugiyama_impl(graph = g) Output $res [,1] [,2] @@ -4873,7 +4914,7 @@ --- Code - layout_sugiyama_impl(g, layers = 1:3, hgap = 2, vgap = 2, maxiter = 10, + layout_sugiyama_impl(graph = g, layers = 1:3, hgap = 2, vgap = 2, maxiter = 10, weights = c(1, 2)) Output $res @@ -4902,7 +4943,7 @@ # layout_mds_impl basic Code - layout_mds_impl(g) + layout_mds_impl(graph = g) Output [,1] [,2] [1,] 1 2.807594e-08 @@ -4912,7 +4953,7 @@ --- Code - layout_mds_impl(g, dist = matrix(1:9, nrow = 3), dim = 3) + layout_mds_impl(graph = g, dist = matrix(1:9, nrow = 3), dim = 3) Output [,1] [,2] [,3] [1,] -2.907521 2.32638426 1.444979 @@ -4930,7 +4971,7 @@ # layout_bipartite_impl basic Code - layout_bipartite_impl(g, types = c(TRUE, FALSE, TRUE)) + layout_bipartite_impl(graph = g, types = c(TRUE, FALSE, TRUE)) Output [,1] [,2] [1,] 0.0 0 @@ -4940,7 +4981,7 @@ --- Code - layout_bipartite_impl(g, types = c(TRUE, FALSE, TRUE), hgap = 2, vgap = 2, + layout_bipartite_impl(graph = g, types = c(TRUE, FALSE, TRUE), hgap = 2, vgap = 2, maxiter = 10) Output [,1] [,2] @@ -4959,7 +5000,7 @@ # layout_gem_impl basic Code - layout_gem_impl(g, res = matrix(0, nrow = 3, ncol = 2)) + layout_gem_impl(graph = g, res = matrix(0, nrow = 3, ncol = 2)) Output [,1] [,2] [1,] 200.18284 -69.23950 @@ -4969,7 +5010,7 @@ --- Code - layout_gem_impl(g, res = matrix(0, nrow = 3, ncol = 2), use.seed = TRUE, + layout_gem_impl(graph = g, res = matrix(0, nrow = 3, ncol = 2), use.seed = TRUE, maxiter = 10, temp.max = 2, temp.min = 0.1, temp.init = 1) Output [,1] [,2] @@ -4988,7 +5029,7 @@ # layout_davidson_harel_impl basic Code - layout_davidson_harel_impl(g, res = matrix(0, nrow = 3, ncol = 2)) + layout_davidson_harel_impl(graph = g, res = matrix(0, nrow = 3, ncol = 2)) Output [,1] [,2] [1,] 1.152116 0.9424808 @@ -4998,8 +5039,8 @@ --- Code - layout_davidson_harel_impl(g, res = matrix(0, nrow = 3, ncol = 2), use.seed = TRUE, - maxiter = 10, fineiter = 5, cool.fact = 0.5, weight.node.dist = 2, + layout_davidson_harel_impl(graph = g, res = matrix(0, nrow = 3, ncol = 2), + use.seed = TRUE, maxiter = 10, fineiter = 5, cool.fact = 0.5, weight.node.dist = 2, weight.border = 1, weight.edge.lengths = 0.1, weight.edge.crossings = 0.2, weight.node.edge.dist = 0.3) Output @@ -5019,7 +5060,7 @@ # layout_umap_impl basic Code - layout_umap_impl(g, res = matrix(0, nrow = 3, ncol = 2), use.seed = TRUE) + layout_umap_impl(graph = g, res = matrix(0, nrow = 3, ncol = 2), use.seed = TRUE) Output [,1] [,2] [1,] 0 0 @@ -5029,7 +5070,7 @@ --- Code - layout_umap_impl(g, res = matrix(0, nrow = 3, ncol = 2), use.seed = TRUE, + layout_umap_impl(graph = g, res = matrix(0, nrow = 3, ncol = 2), use.seed = TRUE, distances = 1:3, min.dist = 0.1, epochs = 10, distances.are.weights = TRUE) Output [,1] [,2] @@ -5048,7 +5089,7 @@ # layout_umap_3d_impl basic Code - layout_umap_3d_impl(g, res = matrix(0, nrow = 3, ncol = 3), use.see = TRUE) + layout_umap_3d_impl(graph = g, res = matrix(0, nrow = 3, ncol = 3), use.seed = TRUE) Output [,1] [,2] [,3] [1,] 0 0 0 @@ -5058,7 +5099,7 @@ --- Code - layout_umap_3d_impl(g, res = matrix(0, nrow = 3, ncol = 3), use.seed = TRUE, + layout_umap_3d_impl(graph = g, res = matrix(0, nrow = 3, ncol = 3), use.seed = TRUE, distances = 1:3, min.dist = 0.1, epochs = 10, distances.are.weights = TRUE) Output [,1] [,2] [,3] @@ -5077,7 +5118,7 @@ # layout_umap_compute_weights_impl basic Code - layout_umap_compute_weights_impl(g, distances = 1:2, weights = 1:3) + layout_umap_compute_weights_impl(graph = g, distances = 1:2, weights = 1:3) Output [1] 1 1 @@ -5092,7 +5133,7 @@ # layout_align_impl basic Code - layout_align_impl(g, layout = matrix(0, nrow = 3, ncol = 2)) + layout_align_impl(graph = g, layout = matrix(0, nrow = 3, ncol = 2)) Output [,1] [,2] [1,] 0 0 @@ -5110,7 +5151,7 @@ # similarity_dice_impl basic Code - similarity_dice_impl(g) + similarity_dice_impl(graph = g) Output [,1] [,2] [,3] [1,] 1 0 1 @@ -5120,7 +5161,7 @@ --- Code - similarity_dice_impl(g, vids = 1:2, mode = "in", loops = TRUE) + similarity_dice_impl(graph = g, vids = 1:2, mode = "in", loops = TRUE) Output [,1] [,2] [1,] 1.0 0.8 @@ -5137,14 +5178,14 @@ # similarity_dice_es_impl basic Code - similarity_dice_es_impl(g) + similarity_dice_es_impl(graph = g) Output [1] 0 0 --- Code - similarity_dice_es_impl(g, es = 1:2, mode = "in", loops = TRUE) + similarity_dice_es_impl(graph = g, es = 1:2, mode = "in", loops = TRUE) Output [1] 0.8 0.8 @@ -5159,15 +5200,15 @@ # similarity_dice_pairs_impl basic Code - similarity_dice_pairs_impl(g, pairs = matrix(c(1, 2, 2, 3), ncol = 2)) + similarity_dice_pairs_impl(graph = g, pairs = matrix(c(1, 2, 2, 3), ncol = 2)) Output [1] 0 0 --- Code - similarity_dice_pairs_impl(g, pairs = matrix(c(1, 2, 2, 3), ncol = 2), mode = "in", - loops = TRUE) + similarity_dice_pairs_impl(graph = g, pairs = matrix(c(1, 2, 2, 3), ncol = 2), + mode = "in", loops = TRUE) Output [1] 0.6666667 0.8000000 @@ -5182,7 +5223,7 @@ # similarity_inverse_log_weighted_impl basic Code - similarity_inverse_log_weighted_impl(g) + similarity_inverse_log_weighted_impl(graph = g) Output [,1] [,2] [,3] [1,] 0.000000 0 1.442695 @@ -5192,7 +5233,7 @@ --- Code - similarity_inverse_log_weighted_impl(g, vids = 1:2, mode = "in") + similarity_inverse_log_weighted_impl(graph = g, vids = 1:2, mode = "in") Output [,1] [,2] [,3] [1,] 0 0 1.442695 @@ -5209,7 +5250,7 @@ # similarity_jaccard_impl basic Code - similarity_jaccard_impl(g) + similarity_jaccard_impl(graph = g) Output [,1] [,2] [,3] [1,] 1 0 1 @@ -5219,7 +5260,7 @@ --- Code - similarity_jaccard_impl(g, vids = 1:2, mode = "in", loops = TRUE) + similarity_jaccard_impl(graph = g, vids = 1:2, mode = "in", loops = TRUE) Output [,1] [,2] [1,] 1.0000000 0.6666667 @@ -5236,14 +5277,14 @@ # similarity_jaccard_es_impl basic Code - similarity_jaccard_es_impl(g) + similarity_jaccard_es_impl(graph = g) Output [1] 0 0 --- Code - similarity_jaccard_es_impl(g, es = 1:2, mode = "in", loops = TRUE) + similarity_jaccard_es_impl(graph = g, es = 1:2, mode = "in", loops = TRUE) Output [1] 0.6666667 0.6666667 @@ -5258,15 +5299,15 @@ # similarity_jaccard_pairs_impl basic Code - similarity_jaccard_pairs_impl(g, pairs = matrix(c(1, 2, 2, 3), ncol = 2)) + similarity_jaccard_pairs_impl(graph = g, pairs = matrix(c(1, 2, 2, 3), ncol = 2)) Output [1] 0 0 --- Code - similarity_jaccard_pairs_impl(g, pairs = matrix(c(1, 2, 2, 3), ncol = 2), mode = "in", - loops = TRUE) + similarity_jaccard_pairs_impl(graph = g, pairs = matrix(c(1, 2, 2, 3), ncol = 2), + mode = "in", loops = TRUE) Output [1] 0.5000000 0.6666667 @@ -5281,14 +5322,14 @@ # compare_communities_impl basic Code - compare_communities_impl(c(1, 2, 1), c(2, 1, 2)) + compare_communities_impl(comm1 = c(1, 2, 1), comm2 = c(2, 1, 2)) Output [1] 0 --- Code - compare_communities_impl(c(1, 2, 1), c(2, 1, 2), method = "nmi") + compare_communities_impl(comm1 = c(1, 2, 1), comm2 = c(2, 1, 2), method = "nmi") Output [1] 1 @@ -5305,15 +5346,15 @@ # modularity_impl basic Code - modularity_impl(g, membership = c(1, 2, 1)) + modularity_impl(graph = g, membership = c(1, 2, 1)) Output [1] -0.5 --- Code - modularity_impl(g, membership = c(1, 2, 1), weights = c(1, 2), resolution = 0.5, - directed = FALSE) + modularity_impl(graph = g, membership = c(1, 2, 1), weights = c(1, 2), + resolution = 0.5, directed = FALSE) Output [1] -0.25 @@ -5328,7 +5369,7 @@ # modularity_matrix_impl basic Code - modularity_matrix_impl(g) + modularity_matrix_impl(graph = g) Output [,1] [,2] [,3] [1,] -0.25 0.5 -0.25 @@ -5338,7 +5379,8 @@ --- Code - modularity_matrix_impl(g, weights = c(1, 2), resolution = 0.5, directed = FALSE) + modularity_matrix_impl(graph = g, weights = c(1, 2), resolution = 0.5, + directed = FALSE) Output [,1] [,2] [,3] [1,] -0.08333333 0.75 -0.1666667 @@ -5356,7 +5398,7 @@ # community_fluid_communities_impl basic Code - community_fluid_communities_impl(g, no.of.communities = 2) + community_fluid_communities_impl(graph = g, no.of.communities = 2) Output [1] 1 0 0 @@ -5371,15 +5413,15 @@ # community_label_propagation_impl basic Code - community_label_propagation_impl(g) + community_label_propagation_impl(graph = g) Output [1] 0 0 0 --- Code - community_label_propagation_impl(g, mode = "in", weights = c(1, 2), initial = 1: - 3, fixed = c(TRUE, FALSE, TRUE)) + community_label_propagation_impl(graph = g, mode = "in", weights = c(1, 2), + initial = 1:3, fixed = c(TRUE, FALSE, TRUE)) Output [1] 0 1 1 @@ -5394,7 +5436,7 @@ # community_multilevel_impl basic Code - community_multilevel_impl(g) + community_multilevel_impl(graph = g) Output $membership [1] 0 0 0 @@ -5410,7 +5452,7 @@ --- Code - community_multilevel_impl(g, weights = c(1, 2), resolution = 0.5) + community_multilevel_impl(graph = g, weights = c(1, 2), resolution = 0.5) Output $membership [1] 0 0 0 @@ -5434,7 +5476,7 @@ # community_optimal_modularity_impl basic Code - community_optimal_modularity_impl(g) + community_optimal_modularity_impl(graph = g) Output $modularity [1] 0 @@ -5446,7 +5488,7 @@ --- Code - community_optimal_modularity_impl(g, weights = c(1, 2)) + community_optimal_modularity_impl(graph = g, weights = c(1, 2)) Output $modularity [1] 1.850372e-17 @@ -5466,7 +5508,7 @@ # community_leiden_impl basic Code - community_leiden_impl(g, weights = c(1, 2), vertex.weights = c(1, 2, 3), + community_leiden_impl(graph = g, weights = c(1, 2), vertex.weights = c(1, 2, 3), resolution = 0.5, beta = 0.1, start = TRUE, n.iterations = 1, membership = 1:3) Output $membership @@ -5490,7 +5532,7 @@ # split_join_distance_impl basic Code - split_join_distance_impl(c(1, 2, 1), c(2, 1, 2)) + split_join_distance_impl(comm1 = c(1, 2, 1), comm2 = c(2, 1, 2)) Output $distance12 [1] 0 @@ -5512,7 +5554,7 @@ # community_infomap_impl basic Code - community_infomap_impl(g) + community_infomap_impl(graph = g) Output $membership [1] 0 0 0 @@ -5524,7 +5566,7 @@ --- Code - community_infomap_impl(g, e.weights = c(1, 2), v.weights = c(1, 2, 3), + community_infomap_impl(graph = g, e.weights = c(1, 2), v.weights = c(1, 2, 3), nb.trials = 2) Output $membership @@ -5545,7 +5587,7 @@ # graphlets_impl basic Code - graphlets_impl(g) + graphlets_impl(graph = g) Output $cliques $cliques[[1]] @@ -5564,7 +5606,7 @@ --- Code - graphlets_impl(g, weights = c(3, 4), niter = 10) + graphlets_impl(graph = g, weights = c(3, 4), niter = 10) Output $cliques $cliques[[1]] @@ -5591,7 +5633,7 @@ # hrg_fit_impl basic Code - hrg_fit_impl(g1) + hrg_fit_impl(graph = g1) Output $left [1] -2 0 @@ -5620,7 +5662,7 @@ # hrg_sample_impl basic Code - hrg_sample_impl(hrg_model) + hrg_sample_impl(hrg = hrg_model) Output IGRAPH U--- 10 45 -- + edges: @@ -5641,7 +5683,7 @@ # hrg_sample_many_impl basic Code - hrg_sample_many_impl(hrg_model, num.samples = 2) + hrg_sample_many_impl(hrg = hrg_model, num.samples = 2) Output [[1]] IGRAPH U--- 10 45 -- @@ -5672,7 +5714,7 @@ # hrg_game_impl basic Code - hrg_game_impl(hrg_model) + hrg_game_impl(hrg = hrg_model) Output IGRAPH U--- 10 45 -- Hierarchical random graph model + attr: name (g/c) @@ -5710,7 +5752,7 @@ # hrg_create_impl basic Code - hrg_create_impl(g, prob = rep(0.5, 2)) + hrg_create_impl(graph = g, prob = rep(0.5, 2)) Output Hierarchical random graph, at level 3: g1 p=0.5 1 @@ -5727,7 +5769,7 @@ # hrg_resize_impl basic Code - hrg_resize_impl(hrg_model, newsize = 5) + hrg_resize_impl(hrg = hrg_model, newsize = 5) Output $left [1] 0 -9 -6 -2 @@ -5756,7 +5798,7 @@ # hrg_size_impl basic Code - hrg_size_impl(hrg_model) + hrg_size_impl(hrg = hrg_model) Output [1] 10 @@ -5771,7 +5813,7 @@ # from_hrg_dendrogram_impl basic Code - from_hrg_dendrogram_impl(hrg_model) + from_hrg_dendrogram_impl(hrg = hrg_model) Output $graph IGRAPH D--- 19 18 -- @@ -5794,7 +5836,7 @@ # get_adjacency_sparse_impl basic Code - get_adjacency_sparse_impl(g) + get_adjacency_sparse_impl(graph = g) Output $type [1] "triplet" @@ -5817,7 +5859,7 @@ --- Code - get_adjacency_sparse_impl(g, type = "upper", weights = c(1, 2), loops = "none") + get_adjacency_sparse_impl(graph = g, type = "upper", weights = c(1, 2), loops = "none") Output $type [1] "triplet" @@ -5848,7 +5890,7 @@ # get_stochastic_impl basic Code - get_stochastic_impl(g) + get_stochastic_impl(graph = g) Output [,1] [,2] [,3] [1,] 0.0 1 0.0 @@ -5858,7 +5900,7 @@ --- Code - get_stochastic_impl(g, column.wise = TRUE, weights = c(1, 2)) + get_stochastic_impl(graph = g, column.wise = TRUE, weights = c(1, 2)) Output [,1] [,2] [,3] [1,] 0 0.3333333 0 @@ -5876,7 +5918,7 @@ # get_stochastic_sparse_impl basic Code - get_stochastic_sparse_impl(g) + get_stochastic_sparse_impl(graph = g) Output $type [1] "triplet" @@ -5899,7 +5941,7 @@ --- Code - get_stochastic_sparse_impl(g, column.wise = TRUE, weights = c(1, 2)) + get_stochastic_sparse_impl(graph = g, column.wise = TRUE, weights = c(1, 2)) Output $type [1] "triplet" @@ -5930,7 +5972,7 @@ # to_directed_impl basic Code - to_directed_impl(g) + to_directed_impl(graph = g) Output IGRAPH D--- 3 4 -- + edges: @@ -5939,7 +5981,7 @@ --- Code - to_directed_impl(g, mode = "acyclic") + to_directed_impl(graph = g, mode = "acyclic") Output IGRAPH D--- 3 2 -- + edges: @@ -5956,7 +5998,7 @@ # to_undirected_impl basic Code - to_undirected_impl(g) + to_undirected_impl(graph = g) Output IGRAPH U--- 3 2 -- + edges: @@ -5965,7 +6007,7 @@ --- Code - to_undirected_impl(g, mode = "mutual", edge.attr.comb = "sum") + to_undirected_impl(graph = g, mode = "mutual", edge.attr.comb = "sum") Output IGRAPH U--- 3 2 -- + edges: @@ -5982,14 +6024,14 @@ # motifs_randesu_impl basic Code - motifs_randesu_impl(g) + motifs_randesu_impl(graph = g) Output [1] NaN NaN 1 0 --- Code - motifs_randesu_impl(g, size = 4, cut.prob = rep(0.1, 4)) + motifs_randesu_impl(graph = g, size = 4, cut.prob = rep(0.1, 4)) Output [1] NaN NaN NaN NaN 0 NaN 0 0 0 0 0 @@ -6004,15 +6046,15 @@ # motifs_randesu_estimate_impl basic Code - motifs_randesu_estimate_impl(g, size = 3, sample.size = 2) + motifs_randesu_estimate_impl(graph = g, size = 3, sample.size = 2) Output [1] 3 --- Code - motifs_randesu_estimate_impl(g, size = 4, cut.prob = rep(0.1, 4), sample.size = 2, - sample = 1:2) + motifs_randesu_estimate_impl(graph = g, size = 4, cut.prob = rep(0.1, 4), + sample.size = 2, sample = 1:2) Output [1] 3 @@ -6027,14 +6069,14 @@ # motifs_randesu_no_impl basic Code - motifs_randesu_no_impl(g) + motifs_randesu_no_impl(graph = g) Output [1] 1 --- Code - motifs_randesu_no_impl(g, size = 4, cut.prob = c(0.1, 0.1, 0.1, 0.1)) + motifs_randesu_no_impl(graph = g, size = 4, cut.prob = c(0.1, 0.1, 0.1, 0.1)) Output [1] 0 @@ -6049,7 +6091,7 @@ # dyad_census_impl basic Code - dyad_census_impl(g) + dyad_census_impl(graph = g) Output $mut [1] 2 @@ -6072,7 +6114,7 @@ # triad_census_impl basic Code - triad_census_impl(g) + triad_census_impl(graph = g) Condition Warning in `triad_census_impl()`: At vendor/cigraph/src/misc/motifs.c:1157 : Triad census called on an undirected graph. All connections will be treated as mutual. @@ -6090,14 +6132,14 @@ # count_adjacent_triangles_impl basic Code - count_adjacent_triangles_impl(g) + count_adjacent_triangles_impl(graph = g) Output [1] 0 0 0 --- Code - count_adjacent_triangles_impl(g, vids = 1:2) + count_adjacent_triangles_impl(graph = g, vids = 1:2) Output [1] 0 0 @@ -6112,7 +6154,7 @@ # count_triangles_impl basic Code - count_triangles_impl(g) + count_triangles_impl(graph = g) Output [1] 0 @@ -6127,14 +6169,14 @@ # local_scan_0_impl basic Code - local_scan_0_impl(g) + local_scan_0_impl(graph = g) Output [1] 1 2 1 --- Code - local_scan_0_impl(g, weights = c(1, 2), mode = "in") + local_scan_0_impl(graph = g, weights = c(1, 2), mode = "in") Output [1] 1 3 2 @@ -6149,14 +6191,14 @@ # local_scan_0_them_impl basic Code - local_scan_0_them_impl(g1, g2) + local_scan_0_them_impl(us = g1, them = g2) Output [1] 1 2 1 --- Code - local_scan_0_them_impl(g1, g2, weights.them = c(1, 2), mode = "in") + local_scan_0_them_impl(us = g1, them = g2, weights.them = c(1, 2), mode = "in") Output [1] 1 3 2 @@ -6171,14 +6213,14 @@ # local_scan_1_ecount_impl basic Code - local_scan_1_ecount_impl(g) + local_scan_1_ecount_impl(graph = g) Output [1] 1 2 1 --- Code - local_scan_1_ecount_impl(g, weights = c(1, 2), mode = "in") + local_scan_1_ecount_impl(graph = g, weights = c(1, 2), mode = "in") Output [1] 1 3 2 @@ -6193,14 +6235,14 @@ # local_scan_1_ecount_them_impl basic Code - local_scan_1_ecount_them_impl(g1, g2) + local_scan_1_ecount_them_impl(us = g1, them = g2) Output [1] 1 2 1 --- Code - local_scan_1_ecount_them_impl(g1, g2, weights.them = c(1, 2), mode = "in") + local_scan_1_ecount_them_impl(us = g1, them = g2, weights.them = c(1, 2), mode = "in") Output [1] 1 3 2 @@ -6215,14 +6257,14 @@ # local_scan_k_ecount_impl basic Code - local_scan_k_ecount_impl(g, k = 1) + local_scan_k_ecount_impl(graph = g, k = 1) Output [1] 1 2 1 --- Code - local_scan_k_ecount_impl(g, k = 1, weights = c(1, 2), mode = "in") + local_scan_k_ecount_impl(graph = g, k = 1, weights = c(1, 2), mode = "in") Output [1] 1 3 2 @@ -6237,14 +6279,15 @@ # local_scan_k_ecount_them_impl basic Code - local_scan_k_ecount_them_impl(g1, g2, k = 1) + local_scan_k_ecount_them_impl(us = g1, them = g2, k = 1) Output [1] 1 2 1 --- Code - local_scan_k_ecount_them_impl(g1, g2, k = 1, weights.them = c(1, 2), mode = "in") + local_scan_k_ecount_them_impl(us = g1, them = g2, k = 1, weights.them = c(1, 2), + mode = "in") Output [1] 1 3 2 @@ -6259,15 +6302,16 @@ # local_scan_neighborhood_ecount_impl basic Code - local_scan_neighborhood_ecount_impl(g, neighborhoods = list(1:2, 2:3, 2:4, 2)) + local_scan_neighborhood_ecount_impl(graph = g, neighborhoods = list(1:2, 2:3, 2: + 4, 2)) Output [1] 1 1 2 0 --- Code - local_scan_neighborhood_ecount_impl(g, weights = c(1, 2, 3), neighborhoods = list( - 1:2, 1:3, 2:4, 1)) + local_scan_neighborhood_ecount_impl(graph = g, weights = c(1, 2, 3), + neighborhoods = list(1:2, 1:3, 2:4, 1)) Output [1] 1 3 5 0 @@ -6282,15 +6326,15 @@ # local_scan_subset_ecount_impl basic Code - local_scan_subset_ecount_impl(g, subsets = list(c(1, 2), c(2, 3))) + local_scan_subset_ecount_impl(graph = g, subsets = list(c(1, 2), c(2, 3))) Output [1] 1 1 --- Code - local_scan_subset_ecount_impl(g, weights = c(1, 2, 3), subsets = list(c(1, 2), - c(2, 3))) + local_scan_subset_ecount_impl(graph = g, weights = c(1, 2, 3), subsets = list(c( + 1, 2), c(2, 3))) Output [1] 1 2 @@ -6305,7 +6349,7 @@ # list_triangles_impl basic Code - list_triangles_impl(g) + list_triangles_impl(graph = g) Output + 0/3 vertices: @@ -6320,7 +6364,7 @@ # join_impl basic Code - join_impl(g1, g2) + join_impl(left = g1, right = g2) Output IGRAPH U--- 6 13 -- + edges: @@ -6337,7 +6381,7 @@ # induced_subgraph_map_impl basic Code - induced_subgraph_map_impl(g, 1:2, impl = "auto") + induced_subgraph_map_impl(graph = g, vids = 1:2, impl = "auto") Output $res IGRAPH U--- 2 1 -- @@ -6354,7 +6398,7 @@ --- Code - induced_subgraph_map_impl(g, 1:2, impl = "copy_and_delete") + induced_subgraph_map_impl(graph = g, vids = 1:2, impl = "copy_and_delete") Output $res IGRAPH U--- 2 1 -- @@ -6379,7 +6423,7 @@ # mycielskian_impl basic Code - mycielskian_impl(g) + mycielskian_impl(graph = g) Output IGRAPH U--- 7 9 -- + edges: @@ -6388,7 +6432,7 @@ --- Code - mycielskian_impl(g, k = 2) + mycielskian_impl(graph = g, k = 2) Output IGRAPH U--- 15 34 -- + edges: @@ -6408,7 +6452,7 @@ # product_impl basic Code - product_impl(g1, g2) + product_impl(g1 = g1, g2 = g2) Output IGRAPH U--- 9 12 -- + edges: @@ -6417,7 +6461,7 @@ --- Code - product_impl(g1, g2, type = "tensor") + product_impl(g1 = g1, g2 = g2, type = "tensor") Output IGRAPH U--- 9 8 -- + edges: @@ -6434,7 +6478,7 @@ # rooted_product_impl basic Code - rooted_product_impl(g1, g2, root = 1) + rooted_product_impl(g1 = g1, g2 = g2, root = 1) Output IGRAPH U--- 9 8 -- + edges: @@ -6451,7 +6495,7 @@ # gomory_hu_tree_impl basic Code - gomory_hu_tree_impl(g) + gomory_hu_tree_impl(graph = g) Output $tree IGRAPH U--- 3 2 -- @@ -6465,7 +6509,7 @@ --- Code - gomory_hu_tree_impl(g, capacity = c(1, 2)) + gomory_hu_tree_impl(graph = g, capacity = c(1, 2)) Output $tree IGRAPH U--- 3 2 -- @@ -6487,7 +6531,7 @@ # maxflow_impl basic Code - maxflow_impl(g, source = 1, target = 3) + maxflow_impl(graph = g, source = 1, target = 3) Output $value [1] 1 @@ -6528,7 +6572,7 @@ --- Code - maxflow_impl(g, source = 1, target = 3, capacity = c(1, 2)) + maxflow_impl(graph = g, source = 1, target = 3, capacity = c(1, 2)) Output $value [1] 1 @@ -6577,7 +6621,7 @@ # residual_graph_impl basic Code - residual_graph_impl(g, capacity = c(1, 2), flow = c(1, 2)) + residual_graph_impl(graph = g, capacity = c(1, 2), flow = c(1, 2)) Output $residual IGRAPH D--- 3 0 -- @@ -6598,7 +6642,7 @@ # reverse_residual_graph_impl basic Code - reverse_residual_graph_impl(g, capacity = c(1, 2), flow = c(1, 2)) + reverse_residual_graph_impl(graph = g, capacity = c(1, 2), flow = c(1, 2)) Output IGRAPH D--- 3 2 -- + edges: @@ -6615,7 +6659,7 @@ # st_mincut_impl basic Code - st_mincut_impl(g, source = 1, target = 3) + st_mincut_impl(graph = g, source = 1, target = 3) Output $value [1] 1 @@ -6636,7 +6680,7 @@ --- Code - st_mincut_impl(g, source = 1, target = 3, capacity = c(1, 2)) + st_mincut_impl(graph = g, source = 1, target = 3, capacity = c(1, 2)) Output $value [1] 1 @@ -6665,7 +6709,7 @@ # dominator_tree_impl basic Code - dominator_tree_impl(g, root = 1) + dominator_tree_impl(graph = g, root = 1) Output $dom [1] 0 1 2 @@ -6682,7 +6726,7 @@ --- Code - dominator_tree_impl(g, root = 1, mode = "in") + dominator_tree_impl(graph = g, root = 1, mode = "in") Output $dom [1] 0 -1 -1 @@ -6707,7 +6751,7 @@ # all_st_cuts_impl basic Code - all_st_cuts_impl(g, source = 1, target = 3) + all_st_cuts_impl(graph = g, source = 1, target = 3) Output $cuts $cuts[[1]] @@ -6741,7 +6785,7 @@ # all_st_mincuts_impl basic Code - all_st_mincuts_impl(g, source = 1, target = 3) + all_st_mincuts_impl(graph = g, source = 1, target = 3) Output $value [1] 1 @@ -6770,7 +6814,7 @@ --- Code - all_st_mincuts_impl(g, source = 1, target = 3, capacity = c(1, 2)) + all_st_mincuts_impl(graph = g, source = 1, target = 3, capacity = c(1, 2)) Output $value [1] 1 @@ -6799,7 +6843,7 @@ # even_tarjan_reduction_impl basic Code - even_tarjan_reduction_impl(g) + even_tarjan_reduction_impl(graph = g) Output $graphbar IGRAPH D--- 6 7 -- @@ -6821,7 +6865,7 @@ # is_separator_impl basic Code - is_separator_impl(g, 1:2) + is_separator_impl(graph = g, candidate = 1:2) Output [1] FALSE @@ -6836,7 +6880,7 @@ # is_minimal_separator_impl basic Code - is_minimal_separator_impl(g, 1:2) + is_minimal_separator_impl(graph = g, candidate = 1:2) Output [1] FALSE @@ -6851,7 +6895,7 @@ # all_minimal_st_separators_impl basic Code - all_minimal_st_separators_impl(g) + all_minimal_st_separators_impl(graph = g) Output [[1]] + 1/3 vertex: @@ -6869,7 +6913,7 @@ # minimum_size_separators_impl basic Code - minimum_size_separators_impl(g) + minimum_size_separators_impl(graph = g) Output [[1]] + 1/3 vertex: @@ -6887,7 +6931,7 @@ # isoclass_impl basic Code - isoclass_impl(g) + isoclass_impl(graph = g) Output [1] 2 @@ -6902,7 +6946,7 @@ # isomorphic_impl basic Code - isomorphic_impl(g1, g2) + isomorphic_impl(graph1 = g1, graph2 = g2) Output [1] TRUE @@ -6917,7 +6961,7 @@ # isoclass_subgraph_impl basic Code - isoclass_subgraph_impl(g, c(1, 2, 3)) + isoclass_subgraph_impl(graph = g, vids = c(1, 2, 3)) Output [1] 2 @@ -6960,7 +7004,7 @@ # isomorphic_vf2_impl basic Code - isomorphic_vf2_impl(g1, g2) + isomorphic_vf2_impl(graph1 = g1, graph2 = g2) Output $iso [1] TRUE @@ -6975,8 +7019,8 @@ --- Code - isomorphic_vf2_impl(g1, g2, vertex.color1 = c(1, 2, 3), vertex.color2 = c(1, 2, - 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2)) + isomorphic_vf2_impl(graph1 = g1, graph2 = g2, vertex.color1 = c(1, 2, 3), + vertex.color2 = c(1, 2, 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2)) Output $iso [1] TRUE @@ -6999,15 +7043,15 @@ # count_isomorphisms_vf2_impl basic Code - count_isomorphisms_vf2_impl(g1, g2) + count_isomorphisms_vf2_impl(graph1 = g1, graph2 = g2) Output [1] 2 --- Code - count_isomorphisms_vf2_impl(g1, g2, vertex.color1 = c(1, 2, 3), vertex.color2 = c( - 1, 2, 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2)) + count_isomorphisms_vf2_impl(graph1 = g1, graph2 = g2, vertex.color1 = c(1, 2, 3), + vertex.color2 = c(1, 2, 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2)) Output [1] 1 @@ -7022,7 +7066,7 @@ # get_isomorphisms_vf2_impl basic Code - get_isomorphisms_vf2_impl(g1, g2) + get_isomorphisms_vf2_impl(graph1 = g1, graph2 = g2) Output [[1]] [1] 0 1 2 @@ -7034,8 +7078,8 @@ --- Code - get_isomorphisms_vf2_impl(g1, g2, vertex.color1 = c(1, 2, 3), vertex.color2 = c( - 1, 2, 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2)) + get_isomorphisms_vf2_impl(graph1 = g1, graph2 = g2, vertex.color1 = c(1, 2, 3), + vertex.color2 = c(1, 2, 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2)) Output [[1]] [1] 0 1 2 @@ -7052,7 +7096,7 @@ # subisomorphic_impl basic Code - subisomorphic_impl(g1, g2) + subisomorphic_impl(graph1 = g1, graph2 = g2) Output [1] TRUE @@ -7067,7 +7111,7 @@ # subisomorphic_vf2_impl basic Code - subisomorphic_vf2_impl(g1, g2) + subisomorphic_vf2_impl(graph1 = g1, graph2 = g2) Output $iso [1] TRUE @@ -7082,8 +7126,8 @@ --- Code - subisomorphic_vf2_impl(g1, g2, vertex.color1 = c(1, 2, 3), vertex.color2 = c(1, - 2, 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2)) + subisomorphic_vf2_impl(graph1 = g1, graph2 = g2, vertex.color1 = c(1, 2, 3), + vertex.color2 = c(1, 2, 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2)) Output $iso [1] TRUE @@ -7106,15 +7150,15 @@ # count_subisomorphisms_vf2_impl basic Code - count_subisomorphisms_vf2_impl(g1, g2) + count_subisomorphisms_vf2_impl(graph1 = g1, graph2 = g2) Output [1] 2 --- Code - count_subisomorphisms_vf2_impl(g1, g2, vertex.color1 = c(1, 2, 3), - vertex.color2 = c(1, 2, 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2)) + count_subisomorphisms_vf2_impl(graph1 = g1, graph2 = g2, vertex.color1 = c(1, 2, + 3), vertex.color2 = c(1, 2, 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2)) Output [1] 1 @@ -7129,7 +7173,7 @@ # get_subisomorphisms_vf2_impl basic Code - get_subisomorphisms_vf2_impl(g1, g2) + get_subisomorphisms_vf2_impl(graph1 = g1, graph2 = g2) Output [[1]] [1] 0 1 2 @@ -7141,8 +7185,8 @@ --- Code - get_subisomorphisms_vf2_impl(g1, g2, vertex.color1 = c(1, 2, 3), vertex.color2 = c( - 1, 2, 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2)) + get_subisomorphisms_vf2_impl(graph1 = g1, graph2 = g2, vertex.color1 = c(1, 2, + 3), vertex.color2 = c(1, 2, 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2)) Output [[1]] [1] 0 1 2 @@ -7159,7 +7203,7 @@ # canonical_permutation_impl basic Code - canonical_permutation_impl(g) + canonical_permutation_impl(graph = g) Output $labeling [1] 2 3 1 @@ -7188,7 +7232,7 @@ --- Code - canonical_permutation_impl(g, colors = c(1, 2, 3), sh = "fl") + canonical_permutation_impl(graph = g, colors = c(1, 2, 3), sh = "fl") Output $labeling [1] 1 2 3 @@ -7225,7 +7269,7 @@ # permute_vertices_impl basic Code - permute_vertices_impl(g, permutation = 3:1) + permute_vertices_impl(graph = g, permutation = 3:1) Output IGRAPH U--- 3 2 -- + edges: @@ -7242,7 +7286,7 @@ # isomorphic_bliss_impl basic Code - isomorphic_bliss_impl(g1, g2) + isomorphic_bliss_impl(graph1 = g1, graph2 = g2) Output $iso [1] TRUE @@ -7297,7 +7341,8 @@ --- Code - isomorphic_bliss_impl(g1, g2, colors1 = c(1, 2, 3), colors2 = c(1, 2, 3), sh = "fl") + isomorphic_bliss_impl(graph1 = g1, graph2 = g2, colors1 = c(1, 2, 3), colors2 = c( + 1, 2, 3), sh = "fl") Output $iso [1] TRUE @@ -7360,7 +7405,7 @@ # count_automorphisms_impl basic Code - count_automorphisms_impl(g) + count_automorphisms_impl(graph = g) Output $nof_nodes [1] 3 @@ -7384,7 +7429,7 @@ --- Code - count_automorphisms_impl(g, colors = c(1, 2, 3), sh = "fl") + count_automorphisms_impl(graph = g, colors = c(1, 2, 3), sh = "fl") Output $nof_nodes [1] 1 @@ -7416,7 +7461,7 @@ # automorphism_group_impl basic Code - automorphism_group_impl(g) + automorphism_group_impl(graph = g) Output [[1]] + 3/3 vertices: @@ -7426,7 +7471,7 @@ --- Code - automorphism_group_impl(g, colors = c(1, 2, 3), sh = "fl", details = TRUE) + automorphism_group_impl(graph = g, colors = c(1, 2, 3), sh = "fl", details = TRUE) Output $generators list() @@ -7463,7 +7508,7 @@ # simplify_and_colorize_impl basic Code - simplify_and_colorize_impl(g) + simplify_and_colorize_impl(graph = g) Output $res IGRAPH U--- 3 2 -- @@ -7488,14 +7533,14 @@ # graph_count_impl basic Code - graph_count_impl(3) + graph_count_impl(n = 3) Output [1] 4 --- Code - graph_count_impl(3, directed = TRUE) + graph_count_impl(n = 3, directed = TRUE) Output [1] 16 @@ -7512,14 +7557,14 @@ # is_matching_impl basic Code - is_matching_impl(g, matching = 1:2) + is_matching_impl(graph = g, matching = 1:2) Output [1] FALSE --- Code - is_matching_impl(g, types = c(TRUE, FALSE, TRUE), matching = 1:2) + is_matching_impl(graph = g, types = c(TRUE, FALSE, TRUE), matching = 1:2) Output [1] FALSE @@ -7534,14 +7579,15 @@ # is_maximal_matching_impl basic Code - is_maximal_matching_impl(g, matching = 1:2) + is_maximal_matching_impl(graph = g, matching = 1:2) Output [1] FALSE --- Code - is_maximal_matching_impl(g, types = c(TRUE, FALSE, TRUE), matching = 1:2) + is_maximal_matching_impl(graph = g, types = c(TRUE, FALSE, TRUE), matching = 1: + 2) Output [1] FALSE @@ -7556,7 +7602,7 @@ # maximum_bipartite_matching_impl basic Code - maximum_bipartite_matching_impl(g, types = c(TRUE, FALSE, TRUE)) + maximum_bipartite_matching_impl(graph = g, types = c(TRUE, FALSE, TRUE)) Output $matching_size [1] 1 @@ -7571,8 +7617,8 @@ --- Code - maximum_bipartite_matching_impl(g, types = c(TRUE, FALSE, TRUE), weights = c(1, - 2), eps = 1e-05) + maximum_bipartite_matching_impl(graph = g, types = c(TRUE, FALSE, TRUE), + weights = c(1, 2), eps = 1e-05) Output $matching_size [1] 1 @@ -7595,7 +7641,7 @@ # adjacency_spectral_embedding_impl basic Code - adjacency_spectral_embedding_impl(g, no = 2) + adjacency_spectral_embedding_impl(graph = g, no = 2) Output $X [,1] [,2] @@ -7675,7 +7721,7 @@ --- Code - adjacency_spectral_embedding_impl(g, no = 2, weights = c(1, 2), which = "la", + adjacency_spectral_embedding_impl(graph = g, no = 2, weights = c(1, 2), which = "la", scaled = FALSE, cvec = c(1, 2, 3), options = list(maxiter = 10)) Output $X @@ -7764,7 +7810,7 @@ # laplacian_spectral_embedding_impl basic Code - laplacian_spectral_embedding_impl(g, no = 2) + laplacian_spectral_embedding_impl(graph = g, no = 2) Output $X [,1] [,2] @@ -7852,7 +7898,7 @@ # eigen_adjacency_impl basic Code - eigen_adjacency_impl(g) + eigen_adjacency_impl(graph = g) Output $options $options$bmat @@ -7951,7 +7997,7 @@ # power_law_fit_impl basic Code - power_law_fit_impl(c(1, 2, 3)) + power_law_fit_impl(data = c(1, 2, 3)) Output $continuous [1] FALSE @@ -7972,7 +8018,7 @@ --- Code - power_law_fit_impl(c(1, 2, 3), xmin = 1, force.continuous = TRUE) + power_law_fit_impl(data = c(1, 2, 3), xmin = 1, force.continuous = TRUE) Output $continuous [1] TRUE @@ -8003,7 +8049,7 @@ # sir_impl basic Code - sir_impl(g, beta = 0.1, gamma = 0.1) + sir_impl(graph = g, beta = 0.1, gamma = 0.1) Output [[1]] [[1]]$times @@ -9411,7 +9457,7 @@ --- Code - sir_impl(g, beta = 0.1, gamma = 0.1, no.sim = 2) + sir_impl(graph = g, beta = 0.1, gamma = 0.1, no.sim = 2) Output [[1]] [[1]]$times @@ -9455,7 +9501,7 @@ # convex_hull_2d_impl basic Code - convex_hull_2d_impl(matrix(1:6, ncol = 2)) + convex_hull_2d_impl(data = matrix(1:6, ncol = 2)) Output $resverts [1] 1 3 @@ -9479,7 +9525,7 @@ # dim_select_impl basic Code - dim_select_impl(c(1, 2, 3)) + dim_select_impl(sv = c(1, 2, 3)) Output [1] 1 @@ -9494,7 +9540,7 @@ # solve_lsap_impl basic Code - solve_lsap_impl(matrix(1:4, ncol = 2), n = 2) + solve_lsap_impl(c = matrix(1:4, ncol = 2), n = 2) Output [1] 0 1 @@ -9511,7 +9557,7 @@ # find_cycle_impl basic Code - find_cycle_impl(g) + find_cycle_impl(graph = g) Output $vertices + 0/3 vertices: @@ -9523,7 +9569,7 @@ --- Code - find_cycle_impl(g, mode = "in") + find_cycle_impl(graph = g, mode = "in") Output $vertices + 0/3 vertices: @@ -9543,7 +9589,7 @@ # simple_cycles_impl basic Code - simple_cycles_impl(g) + simple_cycles_impl(graph = g) Output $vertices list() @@ -9555,7 +9601,8 @@ --- Code - simple_cycles_impl(g, mode = "in", min.cycle.length = 2, max.cycle.length = 3) + simple_cycles_impl(graph = g, mode = "in", min.cycle.length = 2, + max.cycle.length = 3) Output $vertices list() @@ -9575,7 +9622,7 @@ # is_eulerian_impl basic Code - is_eulerian_impl(g) + is_eulerian_impl(graph = g) Output $has_path [1] TRUE @@ -9595,7 +9642,7 @@ # eulerian_path_impl basic Code - eulerian_path_impl(g) + eulerian_path_impl(graph = g) Output $epath + 2/2 edges: @@ -9625,7 +9672,7 @@ --- Code - eulerian_cycle_impl(g2) + eulerian_cycle_impl(graph = g2) Output $epath + 4/4 edges: @@ -9647,14 +9694,14 @@ # fundamental_cycles_impl basic Code - fundamental_cycles_impl(g, start = 1) + fundamental_cycles_impl(graph = g, start = 1) Output list() --- Code - fundamental_cycles_impl(g, start = 1, bfs.cutoff = 2, weights = c(1, 2)) + fundamental_cycles_impl(graph = g, start = 1, bfs.cutoff = 2, weights = c(1, 2)) Output list() @@ -9669,15 +9716,15 @@ # minimum_cycle_basis_impl basic Code - minimum_cycle_basis_impl(g) + minimum_cycle_basis_impl(graph = g) Output list() --- Code - minimum_cycle_basis_impl(g, bfs.cutoff = 2, complete = FALSE, use.cycle.order = FALSE, - weights = c(1, 2)) + minimum_cycle_basis_impl(graph = g, bfs.cutoff = 2, complete = FALSE, + use.cycle.order = FALSE, weights = c(1, 2)) Output list() @@ -9692,14 +9739,14 @@ # is_tree_impl basic Code - is_tree_impl(g) + is_tree_impl(graph = g) Output [1] TRUE --- Code - is_tree_impl(g, mode = "in", details = TRUE) + is_tree_impl(graph = g, mode = "in", details = TRUE) Output $res [1] TRUE @@ -9720,14 +9767,14 @@ # is_forest_impl basic Code - is_forest_impl(g) + is_forest_impl(graph = g) Output [1] TRUE --- Code - is_forest_impl(g, mode = "in", details = TRUE) + is_forest_impl(graph = g, mode = "in", details = TRUE) Output $res [1] TRUE @@ -9748,7 +9795,7 @@ # from_prufer_impl basic Code - from_prufer_impl(1:2) + from_prufer_impl(prufer = 1:2) Output IGRAPH U--- 4 3 -- Tree from Prufer sequence + attr: name (g/c), prufer (g/n) @@ -9768,7 +9815,7 @@ # to_prufer_impl basic Code - to_prufer_impl(g) + to_prufer_impl(graph = g) Output [1] 2 @@ -9783,7 +9830,7 @@ # tree_from_parent_vector_impl basic Code - tree_from_parent_vector_impl(c(-1, 1, 2, 3)) + tree_from_parent_vector_impl(parents = c(-1, 1, 2, 3)) Output IGRAPH D--- 4 3 -- + edges: @@ -9792,7 +9839,7 @@ --- Code - tree_from_parent_vector_impl(c(-1, 1, 2, 3), type = "in") + tree_from_parent_vector_impl(parents = c(-1, 1, 2, 3), type = "in") Output IGRAPH D--- 4 3 -- + edges: @@ -9811,7 +9858,7 @@ # is_complete_impl basic Code - is_complete_impl(g) + is_complete_impl(graph = g) Output [1] FALSE @@ -9826,7 +9873,7 @@ # random_spanning_tree_impl basic Code - random_spanning_tree_impl(g, vid = 1) + random_spanning_tree_impl(graph = g, vid = 1) Output + 2/2 edges: [1] 1--2 2--3 @@ -9842,7 +9889,7 @@ # tree_game_impl basic Code - tree_game_impl(3) + tree_game_impl(n = 3) Output IGRAPH U--- 3 2 -- + edges: @@ -9851,7 +9898,7 @@ --- Code - tree_game_impl(3, directed = TRUE, method = "lerw") + tree_game_impl(n = 3, directed = TRUE, method = "lerw") Output IGRAPH D--- 3 2 -- + edges: @@ -9870,14 +9917,14 @@ # vertex_coloring_greedy_impl basic Code - vertex_coloring_greedy_impl(g) + vertex_coloring_greedy_impl(graph = g) Output [1] 2 1 2 --- Code - vertex_coloring_greedy_impl(g, heuristic = "dsatur") + vertex_coloring_greedy_impl(graph = g, heuristic = "dsatur") Output [1] 2 1 2 @@ -9892,7 +9939,7 @@ # is_vertex_coloring_impl basic Code - is_vertex_coloring_impl(g, types = c(1, 2, 3)) + is_vertex_coloring_impl(graph = g, types = c(1, 2, 3)) Output [1] TRUE @@ -9907,7 +9954,7 @@ # is_bipartite_coloring_impl basic Code - is_bipartite_coloring_impl(g, types = c(TRUE, FALSE, TRUE)) + is_bipartite_coloring_impl(graph = g, types = c(TRUE, FALSE, TRUE)) Output [1] TRUE @@ -9922,14 +9969,14 @@ # is_edge_coloring_impl basic Code - is_edge_coloring_impl(g, types = c(1, 2)) + is_edge_coloring_impl(graph = g, types = c(1, 2)) Output [1] TRUE --- Code - is_edge_coloring_impl(g) + is_edge_coloring_impl(graph = g) Output [1] TRUE @@ -9944,16 +9991,16 @@ # deterministic_optimal_imitation_impl basic Code - deterministic_optimal_imitation_impl(g, 1, quantities = c(1, 2, 3), strategies = c( - 1, 2, 3)) + deterministic_optimal_imitation_impl(graph = g, vid = 1, quantities = c(1, 2, 3), + strategies = c(1, 2, 3)) Output [1] 2 2 3 --- Code - deterministic_optimal_imitation_impl(g, 1, optimality = "minimum", quantities = c( - 1, 2, 3), strategies = c(1, 2, 3), mode = "in") + deterministic_optimal_imitation_impl(graph = g, vid = 1, optimality = "minimum", + quantities = c(1, 2, 3), strategies = c(1, 2, 3), mode = "in") Output [1] 1 2 3 @@ -9968,8 +10015,8 @@ # moran_process_impl basic Code - moran_process_impl(g, weights = c(1, 1), quantities = c(1, 2, 3), strategies = c( - 1, 2, 3), mode = "in") + moran_process_impl(graph = g, weights = c(1, 1), quantities = c(1, 2, 3), + strategies = c(1, 2, 3), mode = "in") Output $quantities [1] 1 3 3 @@ -9989,16 +10036,16 @@ # roulette_wheel_imitation_impl basic Code - roulette_wheel_imitation_impl(g, 1, TRUE, quantities = c(1, 2, 3), strategies = c( - 1, 2, 3)) + roulette_wheel_imitation_impl(graph = g, vid = 1, is.local = TRUE, quantities = c( + 1, 2, 3), strategies = c(1, 2, 3)) Output [1] 1 2 3 --- Code - roulette_wheel_imitation_impl(g, 1, FALSE, quantities = c(1, 2, 3), strategies = c( - 1, 2, 3), mode = "in") + roulette_wheel_imitation_impl(graph = g, vid = 1, is.local = FALSE, quantities = c( + 1, 2, 3), strategies = c(1, 2, 3), mode = "in") Output [1] 3 2 3 @@ -10013,16 +10060,16 @@ # stochastic_imitation_impl basic Code - stochastic_imitation_impl(g, 1, algo = 1, quantities = c(1, 2, 3), strategies = c( - 1, 2, 3)) + stochastic_imitation_impl(graph = g, vid = 1, algo = 1, quantities = c(1, 2, 3), + strategies = c(1, 2, 3)) Output [1] 1 2 3 --- Code - stochastic_imitation_impl(g, 1, algo = 2, quantities = c(1, 2, 3), strategies = c( - 1, 2, 3), mode = "in") + stochastic_imitation_impl(graph = g, vid = 1, algo = 2, quantities = c(1, 2, 3), + strategies = c(1, 2, 3), mode = "in") Output [1] 1 2 3 @@ -10037,7 +10084,7 @@ # invalidate_cache_impl basic Code - invalidate_cache_impl(g) + invalidate_cache_impl(graph = g) Output IGRAPH U--- 3 2 -- + edges: @@ -10054,7 +10101,7 @@ # vertex_path_from_edge_path_impl basic Code - vertex_path_from_edge_path_impl(g, start = 1, edge.path = c(1, 2)) + vertex_path_from_edge_path_impl(graph = g, start = 1, edge.path = c(1, 2)) Output + 3/3 vertices: [1] 1 2 3 @@ -10062,7 +10109,7 @@ --- Code - vertex_path_from_edge_path_impl(g, start = 1, edge.path = c(1), mode = "in") + vertex_path_from_edge_path_impl(graph = g, start = 1, edge.path = c(1), mode = "in") Output + 2/3 vertices: [1] 1 2 @@ -10090,3 +10137,271 @@ Error in `version_impl()`: ! unused argument ("invalid") +# ecount_impl basic + + Code + ecount_impl(graph = g) + Output + [1] 0 + +--- + + Code + ecount_impl(graph = g) + Output + [1] 3 + +# ecount_impl errors + + Code + x + Condition + Error in `ensure_igraph()`: + ! Must provide a graph object (provided `NULL`). + +# is_directed_impl basic + + Code + is_directed_impl(graph = g) + Output + [1] TRUE + +--- + + Code + is_directed_impl(graph = g) + Output + [1] FALSE + +# is_directed_impl errors + + Code + x + Condition + Error in `ensure_igraph()`: + ! Must provide a graph object (provided `NULL`). + +# edges_impl basic + + Code + edges_impl(graph = g, eids = E(g)) + Output + [1] 0 1 1 2 2 3 + +--- + + Code + edges_impl(graph = g, eids = c(1, 3)) + Output + [1] 0 1 2 3 + +# edges_impl errors + + Code + x + Condition + Error in `ensure_igraph()`: + ! Must provide a graph object (provided `NULL`). + +# add_vertices_impl basic + + Code + vcount(g_new) + Output + [1] 5 + +# add_vertices_impl errors + + Code + x + Condition + Error in `ensure_igraph()`: + ! Must provide a graph object (provided `NULL`). + +# delete_edges_impl basic + + Code + ecount(g_new) + Output + [1] 1 + +# delete_edges_impl errors + + Code + x + Condition + Error in `ensure_igraph()`: + ! Must provide a graph object (provided `NULL`). + +# delete_vertices_impl basic + + Code + vcount(g_new) + Output + [1] 2 + +# delete_vertices_impl errors + + Code + x + Condition + Error in `ensure_igraph()`: + ! Must provide a graph object (provided `NULL`). + +# incident_impl basic + + Code + incident_impl(graph = g, vid = 2, mode = "out") + Output + [1] 2 + +--- + + Code + incident_impl(graph = g, vid = 2, mode = "in") + Output + [1] 1 + +--- + + Code + incident_impl(graph = g, vid = 2, mode = "all") + Output + [1] 1 2 + +# incident_impl errors + + Code + x + Condition + Error in `ensure_igraph()`: + ! Must provide a graph object (provided `NULL`). + +# famous_impl basic + + Code + famous_impl(name = "Zachary") + Output + IGRAPH U--- 34 78 -- + + edges: + [1] 1-- 2 1-- 3 1-- 4 1-- 5 1-- 6 1-- 7 1-- 8 1-- 9 1--11 1--12 + [11] 1--13 1--14 1--18 1--20 1--22 1--32 2-- 3 2-- 4 2-- 8 2--14 + [21] 2--18 2--20 2--22 2--31 3-- 4 3-- 8 3--28 3--29 3--33 3--10 + [31] 3-- 9 3--14 4-- 8 4--13 4--14 5-- 7 5--11 6-- 7 6--11 6--17 + [41] 7--17 9--31 9--33 9--34 10--34 14--34 15--33 15--34 16--33 16--34 + [51] 19--33 19--34 20--34 21--33 21--34 23--33 23--34 24--26 24--28 24--33 + [61] 24--34 24--30 25--26 25--28 25--32 26--32 27--30 27--34 28--34 29--32 + [71] 29--34 30--33 30--34 31--33 31--34 32--33 32--34 33--34 + +# famous_impl errors + + Code + x + Condition + Error in `famous_impl()`: + ! At vendor/cigraph/src/constructors/famous.c:xx : NonexistentGraph is not a known graph. See the documentation for valid graph names. Invalid value + +# constraint_impl errors + + Code + x + Condition + Error in `ensure_igraph()`: + ! Must provide a graph object (provided `NULL`). + +# cocitation_impl errors + + Code + x + Condition + Error in `ensure_igraph()`: + ! Must provide a graph object (provided `NULL`). + +# bibcoupling_impl errors + + Code + x + Condition + Error in `ensure_igraph()`: + ! Must provide a graph object (provided `NULL`). + +# girth_impl basic + + Code + result$girth + Output + [1] 5 + +# girth_impl errors + + Code + x + Condition + Error in `ensure_igraph()`: + ! Must provide a graph object (provided `NULL`). + +# coreness_impl basic + + Code + coreness_impl(graph = g) + Output + [1] 2 2 2 1 + +# coreness_impl errors + + Code + x + Condition + Error in `ensure_igraph()`: + ! Must provide a graph object (provided `NULL`). + +# union_impl basic + + Code + union_impl(left = g1, right = g2) + Output + $res + IGRAPH D--- 4 4 -- + + edges: + [1] 1->2 1->3 2->3 3->4 + + $edge_map_left + [1] 1 3 + + $edge_map_right + [1] 2 4 + + +# union_impl errors + + Code + x + Condition + Error in `ensure_igraph()`: + ! Must provide a graph object (provided `NULL`). + +# intersection_impl basic + + Code + intersection_impl(left = g1, right = g2) + Output + $res + IGRAPH D--- 3 2 -- + + edges: + [1] 1->2 2->3 + + $edge_map_left + [1] 1 2 + + $edge_map_right + [1] 1 2 + + +# intersection_impl errors + + Code + x + Condition + Error in `ensure_igraph()`: + ! Must provide a graph object (provided `NULL`). + diff --git a/tests/testthat/_snaps/operators.md b/tests/testthat/_snaps/operators.md index 7e3a04b7e14..c60e2dc767a 100644 --- a/tests/testthat/_snaps/operators.md +++ b/tests/testthat/_snaps/operators.md @@ -2,3 +2,19 @@ Can't recycle `name` (size 2) to match `foo` (size 3). +# vertices() errors on duplicate attribute names + + Duplicate attribute name in `vertices()`: "name". + +--- + + Duplicate attribute name in `vertices()`: "blop". + +--- + + Duplicate attribute name in `vertices()`: "name". + +--- + + Duplicate attribute names in `vertices()`: "foo" and "bar". + diff --git a/tests/testthat/_snaps/utils-assert-args.md b/tests/testthat/_snaps/utils-assert-args.md index be2c21ee633..88628bf245a 100644 --- a/tests/testthat/_snaps/utils-assert-args.md +++ b/tests/testthat/_snaps/utils-assert-args.md @@ -10,7 +10,7 @@ Must provide a graph object (provided `NULL`). -# igraph.match.arg() works +# igraph_match_arg() works Code cluster_leiden(make_graph("Zachary"), objective_function = "something") diff --git a/tests/testthat/test-aaa-auto.R b/tests/testthat/test-aaa-auto.R index b51a615c7b2..c1a5e38860e 100644 --- a/tests/testthat/test-aaa-auto.R +++ b/tests/testthat/test-aaa-auto.R @@ -1,16 +1,46 @@ +# FIXME: ASAN tests for this file are crashing on CRAN, can we replicate? +skip_on_cran() + +# NOTE: This file tests all auto-generated _impl functions. +# According to the issue, each function should have: +# 1. Snapshot tests (using expect_snapshot) - captures the full output +# 2. Structured tests (using regular expectations) - tests specific aspects +# +# The first several functions demonstrate this pattern with comprehensive +# structured tests. For remaining functions, structured tests should be added +# as they are enhanced or when bugs are found. + # 1. empty_impl test_that("empty_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot(empty_impl()) - expect_snapshot(empty_impl(5, directed = FALSE)) + expect_snapshot(empty_impl( + n = 5, + directed = FALSE + )) + + # Structured tests + g1 <- empty_impl() + expect_s3_class(g1, "igraph") + expect_equal(vcount(g1), 0) + expect_equal(ecount(g1), 0) + expect_true(is_directed(g1)) + + g2 <- empty_impl(n = 5, directed = FALSE) + expect_s3_class(g2, "igraph") + expect_equal(vcount(g2), 5) + expect_equal(ecount(g2), 0) + expect_false(is_directed(g2)) }) test_that("empty_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(empty_impl(-1)) + expect_snapshot_igraph_error(empty_impl( + n = -1 + )) }) # 2. add_edges_impl @@ -18,14 +48,29 @@ test_that("empty_impl errors", { test_that("add_edges_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- empty_impl(3) - expect_snapshot(add_edges_impl(g, c(0, 1, 1, 2))) + g <- empty_impl( + n = 3 + ) + + expect_snapshot(add_edges_impl( + graph = g, + edges = c(0, 1, 1, 2) + )) + + # Structured tests + result <- add_edges_impl(graph = g, edges = c(0, 1, 1, 2)) + expect_s3_class(result, "igraph") + expect_equal(vcount(result), 3) + expect_equal(ecount(result), 2) }) test_that("add_edges_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(add_edges_impl(NULL, c(1, 2))) + expect_snapshot_igraph_error(add_edges_impl( + graph = NULL, + edges = c(1, 2) + )) }) # 3. copy_impl @@ -33,14 +78,28 @@ test_that("add_edges_impl errors", { test_that("copy_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- empty_impl(2) - expect_snapshot(copy_impl(g)) + g <- empty_impl( + n = 2 + ) + + expect_snapshot(copy_impl( + from = g + )) + + # Structured tests + result <- copy_impl(from = g) + expect_s3_class(result, "igraph") + expect_equal(vcount(result), vcount(g)) + expect_equal(ecount(result), ecount(g)) + expect_equal(is_directed(result), is_directed(g)) }) test_that("copy_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(copy_impl(NULL)) + expect_snapshot_igraph_error(copy_impl( + from = NULL + )) }) # 4. delete_vertices_idx_impl @@ -48,14 +107,30 @@ test_that("copy_impl errors", { test_that("delete_vertices_idx_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- empty_impl(3) - expect_snapshot(delete_vertices_idx_impl(g, 1)) + g <- empty_impl( + n = 3 + ) + + expect_snapshot(delete_vertices_idx_impl( + graph = g, + vertices = 1 + )) + + # Structured tests + result <- delete_vertices_idx_impl(graph = g, vertices = 1) + expect_type(result, "list") + expect_named(result, c("graph", "idx", "invidx")) + expect_s3_class(result$graph, "igraph") + expect_equal(vcount(result$graph), 2) }) test_that("delete_vertices_idx_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(delete_vertices_idx_impl(NULL, 1)) + expect_snapshot_igraph_error(delete_vertices_idx_impl( + graph = NULL, + vertices = 1 + )) }) # 5. vcount_impl @@ -63,14 +138,27 @@ test_that("delete_vertices_idx_impl errors", { test_that("vcount_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- empty_impl(4) - expect_snapshot(vcount_impl(g)) + g <- empty_impl( + n = 4 + ) + + expect_snapshot(vcount_impl( + graph = g + )) + + # Structured tests + result <- vcount_impl(graph = g) + expect_type(result, "double") + expect_length(result, 1) + expect_equal(result, 4) }) test_that("vcount_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(vcount_impl(NULL)) + expect_snapshot_igraph_error(vcount_impl( + graph = NULL + )) }) # 6. degree_impl @@ -78,15 +166,31 @@ test_that("vcount_impl errors", { test_that("degree_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- empty_impl(3) - expect_snapshot(degree_impl(g)) - expect_snapshot(degree_impl(g, mode = "in")) + g <- empty_impl( + n = 3 + ) + + expect_snapshot(degree_impl( + graph = g + )) + expect_snapshot(degree_impl( + graph = g, + mode = "in" + )) + + # Structured tests + result <- degree_impl(graph = g) + expect_type(result, "double") + expect_length(result, 3) + expect_equal(result, c(0, 0, 0)) }) test_that("degree_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(degree_impl(NULL)) + expect_snapshot_igraph_error(degree_impl( + graph = NULL + )) }) # 7. get_all_eids_between_impl @@ -94,14 +198,33 @@ test_that("degree_impl errors", { test_that("get_all_eids_between_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- empty_impl(2) - expect_snapshot(get_all_eids_between_impl(g, 1, 2)) + g <- empty_impl( + n = 2 + ) + + expect_snapshot(get_all_eids_between_impl( + graph = g, + from = 1, + to = 2 + )) + + # Structured tests + result <- get_all_eids_between_impl( + graph = g, + from = 1, + to = 2 + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("get_all_eids_between_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(get_all_eids_between_impl(NULL, 1, 2)) + expect_snapshot_igraph_error(get_all_eids_between_impl( + graph = NULL, + from = 1, + to = 2 + )) }) # 8. wheel_impl @@ -109,14 +232,28 @@ test_that("get_all_eids_between_impl errors", { test_that("wheel_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(wheel_impl(5)) - expect_snapshot(wheel_impl(5, mode = "in", center = 2)) + expect_snapshot(wheel_impl( + n = 5 + )) + expect_snapshot(wheel_impl( + n = 5, + mode = "in", + center = 2 + )) + + # Structured tests + result <- wheel_impl( + n = 5 + ) + expect_s3_class(result, "igraph") }) test_that("wheel_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(wheel_impl(-1)) + expect_snapshot_igraph_error(wheel_impl( + n = -1 + )) }) # 9. hypercube_impl @@ -124,14 +261,27 @@ test_that("wheel_impl errors", { test_that("hypercube_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(hypercube_impl(3)) - expect_snapshot(hypercube_impl(3, directed = TRUE)) + expect_snapshot(hypercube_impl( + n = 3 + )) + expect_snapshot(hypercube_impl( + n = 3, + directed = TRUE + )) + + # Structured tests + result <- hypercube_impl( + n = 3 + ) + expect_s3_class(result, "igraph") }) test_that("hypercube_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(hypercube_impl(10000)) + expect_snapshot_igraph_error(hypercube_impl( + n = 10000 + )) }) # 10. square_lattice_impl @@ -139,20 +289,30 @@ test_that("hypercube_impl errors", { test_that("square_lattice_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(square_lattice_impl(c(2, 2))) expect_snapshot(square_lattice_impl( - c(2, 2), + dimvector = c(2, 2) + )) + expect_snapshot(square_lattice_impl( + dimvector = c(2, 2), nei = 2, directed = TRUE, mutual = TRUE, periodic = c(TRUE, TRUE) )) + + # Structured tests + result <- square_lattice_impl( + dimvector = c(2, 2) + ) + expect_s3_class(result, "igraph") }) test_that("square_lattice_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(square_lattice_impl(-1)) + expect_snapshot_igraph_error(square_lattice_impl( + dimvector = -1 + )) }) # 11. triangular_lattice_impl @@ -160,18 +320,28 @@ test_that("square_lattice_impl errors", { test_that("triangular_lattice_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(triangular_lattice_impl(c(2, 2))) expect_snapshot(triangular_lattice_impl( - c(2, 2), + dimvector = c(2, 2) + )) + expect_snapshot(triangular_lattice_impl( + dimvector = c(2, 2), directed = TRUE, mutual = TRUE )) + + # Structured tests + result <- triangular_lattice_impl( + dimvector = c(2, 2) + ) + expect_s3_class(result, "igraph") }) test_that("triangular_lattice_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(triangular_lattice_impl(-1)) + expect_snapshot_igraph_error(triangular_lattice_impl( + dimvector = -1 + )) }) # 12. path_graph_impl @@ -179,14 +349,28 @@ test_that("triangular_lattice_impl errors", { test_that("path_graph_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(path_graph_impl(5)) - expect_snapshot(path_graph_impl(5, directed = TRUE, mutual = TRUE)) + expect_snapshot(path_graph_impl( + n = 5 + )) + expect_snapshot(path_graph_impl( + n = 5, + directed = TRUE, + mutual = TRUE + )) + + # Structured tests + result <- path_graph_impl( + n = 5 + ) + expect_s3_class(result, "igraph") }) test_that("path_graph_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(path_graph_impl(-1)) + expect_snapshot_igraph_error(path_graph_impl( + n = -1 + )) }) # 13. cycle_graph_impl @@ -194,14 +378,28 @@ test_that("path_graph_impl errors", { test_that("cycle_graph_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(cycle_graph_impl(5)) - expect_snapshot(cycle_graph_impl(5, directed = TRUE, mutual = TRUE)) + expect_snapshot(cycle_graph_impl( + n = 5 + )) + expect_snapshot(cycle_graph_impl( + n = 5, + directed = TRUE, + mutual = TRUE + )) + + # Structured tests + result <- cycle_graph_impl( + n = 5 + ) + expect_s3_class(result, "igraph") }) test_that("cycle_graph_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(cycle_graph_impl(-1)) + expect_snapshot_igraph_error(cycle_graph_impl( + n = -1 + )) }) # 14. symmetric_tree_impl @@ -209,14 +407,27 @@ test_that("cycle_graph_impl errors", { test_that("symmetric_tree_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(symmetric_tree_impl(3)) - expect_snapshot(symmetric_tree_impl(3, type = "in")) + expect_snapshot(symmetric_tree_impl( + branches = 3 + )) + expect_snapshot(symmetric_tree_impl( + branches = 3, + type = "in" + )) + + # Structured tests + result <- symmetric_tree_impl( + branches = 3 + ) + expect_s3_class(result, "igraph") }) test_that("symmetric_tree_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(symmetric_tree_impl(-1)) + expect_snapshot_igraph_error(symmetric_tree_impl( + branches = -1 + )) }) # 15. regular_tree_impl @@ -224,14 +435,28 @@ test_that("symmetric_tree_impl errors", { test_that("regular_tree_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(regular_tree_impl(2)) - expect_snapshot(regular_tree_impl(2, k = 4, type = "in")) + expect_snapshot(regular_tree_impl( + h = 2 + )) + expect_snapshot(regular_tree_impl( + h = 2, + k = 4, + type = "in" + )) + + # Structured tests + result <- regular_tree_impl( + h = 2 + ) + expect_s3_class(result, "igraph") }) test_that("regular_tree_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(regular_tree_impl(-1)) + expect_snapshot_igraph_error(regular_tree_impl( + h = -1 + )) }) # 16. full_citation_impl @@ -239,14 +464,27 @@ test_that("regular_tree_impl errors", { test_that("full_citation_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(full_citation_impl(5)) - expect_snapshot(full_citation_impl(5, directed = FALSE)) + expect_snapshot(full_citation_impl( + n = 5 + )) + expect_snapshot(full_citation_impl( + n = 5, + directed = FALSE + )) + + # Structured tests + result <- full_citation_impl( + n = 5 + ) + expect_s3_class(result, "igraph") }) test_that("full_citation_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(full_citation_impl(-1)) + expect_snapshot_igraph_error(full_citation_impl( + n = -1 + )) }) # 17. atlas_impl @@ -254,14 +492,26 @@ test_that("full_citation_impl errors", { test_that("atlas_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(atlas_impl(0)) - expect_snapshot(atlas_impl(5)) + expect_snapshot(atlas_impl( + number = 0 + )) + expect_snapshot(atlas_impl( + number = 5 + )) + + # Structured tests + result <- atlas_impl( + number = 0 + ) + expect_s3_class(result, "igraph") }) test_that("atlas_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(atlas_impl(-1)) + expect_snapshot_igraph_error(atlas_impl( + number = -1 + )) }) # 18. extended_chordal_ring_impl @@ -269,18 +519,31 @@ test_that("atlas_impl errors", { test_that("extended_chordal_ring_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(extended_chordal_ring_impl(5, matrix(c(1, 2)))) expect_snapshot(extended_chordal_ring_impl( - 5, - matrix(c(1, 2)), + nodes = 5, + W = matrix(c(1, 2)) + )) + expect_snapshot(extended_chordal_ring_impl( + nodes = 5, + W = matrix(c(1, 2)), directed = TRUE )) + + # Structured tests + result <- extended_chordal_ring_impl( + nodes = 5, + W = matrix(c(1, 2)) + ) + expect_s3_class(result, "igraph") }) test_that("extended_chordal_ring_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(extended_chordal_ring_impl(-1, matrix(c(1, 2)))) + expect_snapshot_igraph_error(extended_chordal_ring_impl( + nodes = -1, + W = matrix(c(1, 2)) + )) }) # 19. graph_power_impl @@ -288,15 +551,35 @@ test_that("extended_chordal_ring_impl errors", { test_that("graph_power_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(5) - expect_snapshot(graph_power_impl(g, 2)) - expect_snapshot(graph_power_impl(g, 2, directed = TRUE)) + g <- path_graph_impl( + n = 5 + ) + + expect_snapshot(graph_power_impl( + graph = g, + order = 2 + )) + expect_snapshot(graph_power_impl( + graph = g, + order = 2, + directed = TRUE + )) + + # Structured tests + result <- graph_power_impl( + graph = g, + order = 2 + ) + expect_s3_class(result, "igraph") }) test_that("graph_power_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(graph_power_impl(NULL, 2)) + expect_snapshot_igraph_error(graph_power_impl( + graph = NULL, + order = 2 + )) }) # 20. linegraph_impl @@ -304,62 +587,127 @@ test_that("graph_power_impl errors", { test_that("linegraph_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(5) - expect_snapshot(linegraph_impl(g)) + g <- path_graph_impl( + n = 5 + ) + + expect_snapshot(linegraph_impl( + graph = g + )) + + # Structured tests + result <- linegraph_impl( + graph = g + ) + expect_s3_class(result, "igraph") }) test_that("linegraph_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(linegraph_impl(NULL)) + expect_snapshot_igraph_error(linegraph_impl( + graph = NULL + )) }) # 21. de_bruijn_impl test_that("de_bruijn_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(de_bruijn_impl(2, 3)) + expect_snapshot(de_bruijn_impl( + m = 2, + n = 3 + )) + + # Structured tests + result <- de_bruijn_impl( + m = 2, + n = 3 + ) + expect_s3_class(result, "igraph") }) test_that("de_bruijn_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(de_bruijn_impl(-1, 3)) + expect_snapshot_igraph_error(de_bruijn_impl( + m = -1, + n = 3 + )) }) # 22. kautz_impl test_that("kautz_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(kautz_impl(2, 3)) + expect_snapshot(kautz_impl( + m = 2, + n = 3 + )) + + # Structured tests + result <- kautz_impl( + m = 2, + n = 3 + ) + expect_s3_class(result, "igraph") }) test_that("kautz_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(kautz_impl(-1, 3)) + expect_snapshot_igraph_error(kautz_impl( + m = -1, + n = 3 + )) }) # 23. lcf_vector_impl test_that("lcf_vector_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(lcf_vector_impl(10, c(3, -3, 4), 2)) + expect_snapshot(lcf_vector_impl( + n = 10, + shifts = c(3, -3, 4), + repeats = 2 + )) + + # Structured tests + result <- lcf_vector_impl( + n = 10, + shifts = c(3, -3, 4), + repeats = 2 + ) + expect_s3_class(result, "igraph") }) test_that("lcf_vector_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(lcf_vector_impl(-1, c(3, -3, 4), 2)) + expect_snapshot_igraph_error(lcf_vector_impl( + n = -1, + shifts = c(3, -3, 4), + repeats = 2 + )) }) # 24. mycielski_graph_impl test_that("mycielski_graph_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(mycielski_graph_impl(3)) + expect_snapshot(mycielski_graph_impl( + k = 3 + )) + + # Structured tests + result <- mycielski_graph_impl( + k = 3 + ) + expect_s3_class(result, "igraph") }) test_that("mycielski_graph_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(mycielski_graph_impl(-1)) + expect_snapshot_igraph_error(mycielski_graph_impl( + k = -1 + )) }) # 25. adjlist_impl @@ -367,80 +715,152 @@ test_that("adjlist_impl basic", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(adjlist_impl(list(c(2, 3), c(1), c(1)), mode = "out")) + expect_snapshot(adjlist_impl( + adjlist = list( + c(2, 3), + c(1), + c(1) + ), + mode = "out" + )) + + # Structured tests + result <- adjlist_impl( + adjlist = list( + c(2, 3), + c(1), + c(1) + ), + mode = "out" + ) + expect_s3_class(result, "igraph") }) test_that("adjlist_impl errors", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(adjlist_impl(-1, mode = "out")) + expect_snapshot_igraph_error(adjlist_impl( + adjlist = -1, + mode = "out" + )) }) # 26. full_bipartite_impl test_that("full_bipartite_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(full_bipartite_impl(2, 3)) - expect_snapshot(full_bipartite_impl(2, 3, directed = TRUE, mode = "in")) + expect_snapshot(full_bipartite_impl( + n1 = 2, + n2 = 3 + )) + expect_snapshot(full_bipartite_impl( + n1 = 2, + n2 = 3, + directed = TRUE, + mode = "in" + )) + + # Structured tests + result <- full_bipartite_impl( + n1 = 2, + n2 = 3 + ) + expect_type(result, "list") }) test_that("full_bipartite_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(full_bipartite_impl(-1, 3)) + expect_snapshot_igraph_error(full_bipartite_impl( + n1 = -1, + n2 = 3 + )) }) # 27. full_multipartite_impl test_that("full_multipartite_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(full_multipartite_impl(c(2, 3, 4))) expect_snapshot(full_multipartite_impl( - c(2, 3, 4), + n = c(2, 3, 4) + )) + expect_snapshot(full_multipartite_impl( + n = c(2, 3, 4), directed = TRUE, mode = "in" )) + + # Structured tests + result <- full_multipartite_impl( + n = c(2, 3, 4) + ) + expect_type(result, "list") }) test_that("full_multipartite_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(full_multipartite_impl(-1)) + expect_snapshot_igraph_error(full_multipartite_impl( + n = -1 + )) }) # 28. realize_degree_sequence_impl test_that("realize_degree_sequence_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(realize_degree_sequence_impl(c(2, 2, 2))) expect_snapshot(realize_degree_sequence_impl( - c(2, 2, 2), - c(2, 2, 2), + out.deg = c(2, 2, 2) + )) + expect_snapshot(realize_degree_sequence_impl( + out.deg = c(2, 2, 2), + in.deg = c(2, 2, 2), allowed.edge.types = "simple", method = "largest" )) + + # Structured tests + result <- realize_degree_sequence_impl( + out.deg = c(2, 2, 2) + ) + expect_s3_class(result, "igraph") }) test_that("realize_degree_sequence_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(realize_degree_sequence_impl(-1)) + expect_snapshot_igraph_error(realize_degree_sequence_impl( + out.deg = -1 + )) }) # 29. realize_bipartite_degree_sequence_impl test_that("realize_bipartite_degree_sequence_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(realize_bipartite_degree_sequence_impl(c(2, 2), c(2, 2))) expect_snapshot(realize_bipartite_degree_sequence_impl( - c(2, 2), - c(2, 2), + degrees1 = c(2, 2), + degrees2 = c(2, 2) + )) + expect_snapshot(realize_bipartite_degree_sequence_impl( + degrees1 = c(2, 2), + degrees2 = c(2, 2), allowed.edge.types = "loops", method = "largest" )) + + # Structured tests + result <- realize_bipartite_degree_sequence_impl( + degrees1 = c(2, 2), + degrees2 = c(2, 2) + ) + expect_s3_class(result, "igraph") }) test_that("realize_bipartite_degree_sequence_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - realize_bipartite_degree_sequence_impl(-1, c(2, 2)) + realize_bipartite_degree_sequence_impl( + degrees1 = -1, + degrees2 = c(2, 2) + ) ) }) @@ -448,91 +868,173 @@ test_that("realize_bipartite_degree_sequence_impl errors", { test_that("circulant_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(circulant_impl(5, c(1, 2))) - expect_snapshot(circulant_impl(5, c(1, 2), directed = TRUE)) + expect_snapshot(circulant_impl( + n = 5, + shifts = c(1, 2) + )) + expect_snapshot(circulant_impl( + n = 5, + shifts = c(1, 2), + directed = TRUE + )) + + # Structured tests + result <- circulant_impl( + n = 5, + shifts = c(1, 2) + ) + expect_s3_class(result, "igraph") }) test_that("circulant_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(circulant_impl(-1, c(1, 2))) + expect_snapshot_igraph_error(circulant_impl( + n = -1, + shifts = c(1, 2) + )) }) # 31. generalized_petersen_impl test_that("generalized_petersen_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(generalized_petersen_impl(5, 2)) + expect_snapshot(generalized_petersen_impl( + n = 5, + k = 2 + )) + + # Structured tests + result <- generalized_petersen_impl( + n = 5, + k = 2 + ) + expect_s3_class(result, "igraph") }) test_that("generalized_petersen_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(generalized_petersen_impl(-1, 2)) + expect_snapshot_igraph_error(generalized_petersen_impl( + n = -1, + k = 2 + )) }) # 32. turan_impl test_that("turan_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(turan_impl(5, 2)) + expect_snapshot(turan_impl( + n = 5, + r = 2 + )) + + # Structured tests + result <- turan_impl( + n = 5, + r = 2 + ) + expect_type(result, "list") }) test_that("turan_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(turan_impl(-1, 2)) + expect_snapshot_igraph_error(turan_impl( + n = -1, + r = 2 + )) }) # 33. erdos_renyi_game_gnp_impl test_that("erdos_renyi_game_gnp_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(erdos_renyi_game_gnp_impl(5, 0.5)) expect_snapshot(erdos_renyi_game_gnp_impl( - 5, - 0.5, + n = 5, + p = 0.5 + )) + expect_snapshot(erdos_renyi_game_gnp_impl( + n = 5, + p = 0.5, directed = TRUE, loops = TRUE )) + + # Structured tests + result <- erdos_renyi_game_gnp_impl( + n = 5, + p = 0.5 + ) + expect_s3_class(result, "igraph") }) test_that("erdos_renyi_game_gnp_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(erdos_renyi_game_gnp_impl(-1, 0.5)) + expect_snapshot_igraph_error(erdos_renyi_game_gnp_impl( + n = -1, + p = 0.5 + )) }) # 34. erdos_renyi_game_gnm_impl test_that("erdos_renyi_game_gnm_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(erdos_renyi_game_gnm_impl(5, 3)) expect_snapshot(erdos_renyi_game_gnm_impl( - 5, - 3, + n = 5, + m = 3 + )) + expect_snapshot(erdos_renyi_game_gnm_impl( + n = 5, + m = 3, directed = TRUE, loops = TRUE )) + + # Structured tests + result <- erdos_renyi_game_gnm_impl( + n = 5, + m = 3 + ) + expect_s3_class(result, "igraph") }) test_that("erdos_renyi_game_gnm_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(erdos_renyi_game_gnm_impl(-1, 3)) + expect_snapshot_igraph_error(erdos_renyi_game_gnm_impl( + n = -1, + m = 3 + )) }) # 35. growing_random_game_impl test_that("growing_random_game_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(growing_random_game_impl(5, 2)) expect_snapshot(growing_random_game_impl( - 5, - 2, + n = 5, + m = 2 + )) + expect_snapshot(growing_random_game_impl( + n = 5, + m = 2, directed = FALSE, citation = TRUE )) + + # Structured tests + result <- growing_random_game_impl( + n = 5, + m = 2 + ) + expect_s3_class(result, "igraph") }) test_that("growing_random_game_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(growing_random_game_impl(-1, 2)) + expect_snapshot_igraph_error(growing_random_game_impl( + n = -1, + m = 2 + )) }) # 36. preference_game_impl @@ -540,23 +1042,33 @@ test_that("preference_game_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot(preference_game_impl( - 5, - 2, - c(0.5, 0.5), - FALSE, - matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2) + nodes = 5, + types = 2, + type.dist = c(0.5, 0.5), + fixed.sizes = FALSE, + pref.matrix = matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2) )) + + # Structured tests + result <- preference_game_impl( + nodes = 5, + types = 2, + type.dist = c(0.5, 0.5), + fixed.sizes = FALSE, + pref.matrix = matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2) + ) + expect_type(result, "list") }) test_that("preference_game_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( preference_game_impl( - -1, - 2, - c(0.5, 0.5), - FALSE, - matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2) + nodes = -1, + types = 2, + type.dist = c(0.5, 0.5), + fixed.sizes = FALSE, + pref.matrix = matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2) ) ) }) @@ -566,23 +1078,33 @@ test_that("asymmetric_preference_game_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot(asymmetric_preference_game_impl( - 5, - 2, - 2, - matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2), - matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2) + nodes = 5, + out.types = 2, + in.types = 2, + type.dist.matrix = matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2), + pref.matrix = matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2) )) + + # Structured tests + result <- asymmetric_preference_game_impl( + nodes = 5, + out.types = 2, + in.types = 2, + type.dist.matrix = matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2), + pref.matrix = matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2) + ) + expect_type(result, "list") }) test_that("asymmetric_preference_game_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( asymmetric_preference_game_impl( - -1, - 2, - 2, - matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2), - matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2) + nodes = -1, + out.types = 2, + in.types = 2, + type.dist.matrix = matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2), + pref.matrix = matrix(c(0.5, 0.5, 0.5, 0.5), 2, 2) ) ) }) @@ -591,58 +1113,123 @@ test_that("asymmetric_preference_game_impl errors", { test_that("rewire_edges_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(5) - expect_snapshot(rewire_edges_impl(g, 0.5)) + g <- path_graph_impl( + n = 5 + ) + + expect_snapshot(rewire_edges_impl( + graph = g, + prob = 0.5 + )) + + # Structured tests + result <- rewire_edges_impl( + graph = g, + prob = 0.5 + ) + expect_s3_class(result, "igraph") }) test_that("rewire_edges_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(rewire_edges_impl(NULL, 0.5)) + expect_snapshot_igraph_error(rewire_edges_impl( + graph = NULL, + prob = 0.5 + )) }) # 39. rewire_directed_edges_impl test_that("rewire_directed_edges_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(5, directed = TRUE) - expect_snapshot(rewire_directed_edges_impl(g, 0.5)) + g <- path_graph_impl( + n = 5, + directed = TRUE + ) + + expect_snapshot(rewire_directed_edges_impl( + graph = g, + prob = 0.5 + )) + + # Structured tests + result <- rewire_directed_edges_impl( + graph = g, + prob = 0.5 + ) + expect_s3_class(result, "igraph") }) test_that("rewire_directed_edges_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(rewire_directed_edges_impl(NULL, 0.5)) + expect_snapshot_igraph_error(rewire_directed_edges_impl( + graph = NULL, + prob = 0.5 + )) }) # 40. forest_fire_game_impl test_that("forest_fire_game_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(forest_fire_game_impl(5, 0.5)) expect_snapshot(forest_fire_game_impl( - 5, - 0.5, + nodes = 5, + fw.prob = 0.5 + )) + expect_snapshot(forest_fire_game_impl( + nodes = 5, + fw.prob = 0.5, bw.factor = 0.2, ambs = 2, directed = FALSE )) + + # Structured tests + result <- forest_fire_game_impl( + nodes = 5, + fw.prob = 0.5 + ) + expect_s3_class(result, "igraph") }) test_that("forest_fire_game_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(forest_fire_game_impl(-1, 0.5)) + expect_snapshot_igraph_error(forest_fire_game_impl( + nodes = -1, + fw.prob = 0.5 + )) }) # 41. simple_interconnected_islands_game_impl test_that("simple_interconnected_islands_game_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(simple_interconnected_islands_game_impl(2, 3, 0.5, 1)) + expect_snapshot(simple_interconnected_islands_game_impl( + islands.n = 2, + islands.size = 3, + islands.pin = 0.5, + n.inter = 1 + )) + + # Structured tests + result <- simple_interconnected_islands_game_impl( + islands.n = 2, + islands.size = 3, + islands.pin = 0.5, + n.inter = 1 + ) + expect_s3_class(result, "igraph") }) test_that("simple_interconnected_islands_game_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - simple_interconnected_islands_game_impl(-1, 3, 0.5, 1) + simple_interconnected_islands_game_impl( + islands.n = -1, + islands.size = 3, + islands.pin = 0.5, + n.inter = 1 + ) ) }) @@ -650,58 +1237,97 @@ test_that("simple_interconnected_islands_game_impl errors", { test_that("chung_lu_game_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(chung_lu_game_impl(c(2, 2, 2))) expect_snapshot(chung_lu_game_impl( - c(1, 2, 3), - c(1, 2, 3), + out.weights = c(2, 2, 2) + )) + expect_snapshot(chung_lu_game_impl( + out.weights = c(1, 2, 3), + in.weights = c(1, 2, 3), loops = FALSE, variant = "maxent" )) + + # Structured tests + result <- chung_lu_game_impl( + out.weights = c(2, 2, 2) + ) + expect_s3_class(result, "igraph") }) test_that("chung_lu_game_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(chung_lu_game_impl(-1)) + expect_snapshot_igraph_error(chung_lu_game_impl( + out.weights = -1 + )) }) # 43. static_fitness_game_impl test_that("static_fitness_game_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(static_fitness_game_impl(3, c(1, 2, 3))) expect_snapshot(static_fitness_game_impl( - 3, - c(1, 2, 3), - c(1, 2, 3), + no.of.edges = 3, + fitness.out = c(1, 2, 3) + )) + expect_snapshot(static_fitness_game_impl( + no.of.edges = 3, + fitness.out = c(1, 2, 3), + fitness.in = c(1, 2, 3), loops = TRUE, multiple = TRUE )) + + # Structured tests + result <- static_fitness_game_impl( + no.of.edges = 3, + fitness.out = c(1, 2, 3) + ) + expect_s3_class(result, "igraph") }) test_that("static_fitness_game_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(static_fitness_game_impl(-1, c(1, 2, 3))) + expect_snapshot_igraph_error(static_fitness_game_impl( + no.of.edges = -1, + fitness.out = c(1, 2, 3) + )) }) # 44. static_power_law_game_impl test_that("static_power_law_game_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(static_power_law_game_impl(5, 4, 2.5)) expect_snapshot(static_power_law_game_impl( - 5, - 4, - 2.5, + no.of.nodes = 5, + no.of.edges = 4, + exponent.out = 2.5 + )) + expect_snapshot(static_power_law_game_impl( + no.of.nodes = 5, + no.of.edges = 4, + exponent.out = 2.5, exponent.in = 2, loops = TRUE, multiple = TRUE, finite.size.correction = FALSE )) + + # Structured tests + result <- static_power_law_game_impl( + no.of.nodes = 5, + no.of.edges = 4, + exponent.out = 2.5 + ) + expect_s3_class(result, "igraph") }) test_that("static_power_law_game_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(static_power_law_game_impl(-1, 4, 2.5)) + expect_snapshot_igraph_error(static_power_law_game_impl( + no.of.nodes = -1, + no.of.edges = 4, + exponent.out = 2.5 + )) }) # 45. k_regular_game_impl @@ -709,14 +1335,32 @@ test_that("static_power_law_game_impl errors", { test_that("k_regular_game_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(k_regular_game_impl(5, 2)) - expect_snapshot(k_regular_game_impl(5, 2, directed = TRUE, multiple = TRUE)) + expect_snapshot(k_regular_game_impl( + no.of.nodes = 5, + k = 2 + )) + expect_snapshot(k_regular_game_impl( + no.of.nodes = 5, + k = 2, + directed = TRUE, + multiple = TRUE + )) + + # Structured tests + result <- k_regular_game_impl( + no.of.nodes = 5, + k = 2 + ) + expect_s3_class(result, "igraph") }) test_that("k_regular_game_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(k_regular_game_impl(-1, 2)) + expect_snapshot_igraph_error(k_regular_game_impl( + no.of.nodes = -1, + k = 2 + )) }) # 46. sbm_game_impl @@ -724,20 +1368,36 @@ test_that("k_regular_game_impl errors", { test_that("sbm_game_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(sbm_game_impl(5, matrix(0.5, 2, 2), c(2, 3))) expect_snapshot(sbm_game_impl( - 5, - matrix(0.5, 2, 2), - c(2, 3), + n = 5, + pref.matrix = matrix(0.5, 2, 2), + block.sizes = c(2, 3) + )) + expect_snapshot(sbm_game_impl( + n = 5, + pref.matrix = matrix(0.5, 2, 2), + block.sizes = c(2, 3), directed = TRUE, loops = TRUE )) + + # Structured tests + result <- sbm_game_impl( + n = 5, + pref.matrix = matrix(0.5, 2, 2), + block.sizes = c(2, 3) + ) + expect_s3_class(result, "igraph") }) test_that("sbm_game_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(sbm_game_impl(-1, matrix(0.5, 2, 2), c(2, 3))) + expect_snapshot_igraph_error(sbm_game_impl( + n = -1, + pref.matrix = matrix(0.5, 2, 2), + block.sizes = c(2, 3) + )) }) # 47. hsbm_game_impl @@ -745,14 +1405,36 @@ test_that("sbm_game_impl errors", { test_that("hsbm_game_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(hsbm_game_impl(6, 2, c(0.5, 0.5), matrix(1, 2, 2), 0.5)) + expect_snapshot(hsbm_game_impl( + n = 6, + m = 2, + rho = c(0.5, 0.5), + C = matrix(1, 2, 2), + p = 0.5 + )) + + # Structured tests + result <- hsbm_game_impl( + n = 6, + m = 2, + rho = c(0.5, 0.5), + C = matrix(1, 2, 2), + p = 0.5 + ) + expect_s3_class(result, "igraph") }) test_that("hsbm_game_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - hsbm_game_impl(-1, 2, 0.5, matrix(1, 2, 2), 0.5) + hsbm_game_impl( + n = -1, + m = 2, + rho = 0.5, + C = matrix(1, 2, 2), + p = 0.5 + ) ) }) @@ -776,12 +1458,28 @@ test_that("hsbm_list_game_impl basic", { nrow = 3 ) expect_snapshot(hsbm_list_game_impl( - 100, - list(50, 50), - rho = list(c(3, 3, 4) / 10), - C = list(C), + n = 100, + mlist = list(50, 50), + rholist = list( + c(3, 3, 4) / + 10 + ), + Clist = list(C), p = 1 / 20 )) + + # Structured tests + result <- hsbm_list_game_impl( + n = 100, + mlist = list(50, 50), + rholist = list( + c(3, 3, 4) / + 10 + ), + Clist = list(C), + p = 1 / 20 + ) + expect_s3_class(result, "igraph") }) test_that("hsbm_list_game_impl errors", { @@ -789,11 +1487,14 @@ test_that("hsbm_list_game_impl errors", { local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( hsbm_list_game_impl( - -1, - c(2, 3), - list(0.5, 0.5), - list(matrix(1, 2, 2), matrix(1, 2, 2)), - 0.5 + n = -1, + mlist = c(2, 3), + rholist = list(0.5, 0.5), + Clist = list( + matrix(1, 2, 2), + matrix(1, 2, 2) + ), + p = 0.5 ) ) }) @@ -803,14 +1504,30 @@ test_that("hsbm_list_game_impl errors", { test_that("correlated_game_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(5) - expect_snapshot(correlated_game_impl(g, 0.5)) -}) + g <- path_graph_impl( + n = 5 + ) -test_that("correlated_game_impl errors", { + expect_snapshot(correlated_game_impl( + old.graph = g, + corr = 0.5 + )) + + # Structured tests + result <- correlated_game_impl( + old.graph = g, + corr = 0.5 + ) + expect_s3_class(result, "igraph") +}) + +test_that("correlated_game_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(correlated_game_impl(NULL, 0.5)) + expect_snapshot_igraph_error(correlated_game_impl( + old.graph = NULL, + corr = 0.5 + )) }) # 50. correlated_pair_game_impl @@ -818,14 +1535,35 @@ test_that("correlated_game_impl errors", { test_that("correlated_pair_game_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(correlated_pair_game_impl(5, 0.5, 0.5)) - expect_snapshot(correlated_pair_game_impl(5, 0.5, 0.5, directed = TRUE)) + expect_snapshot(correlated_pair_game_impl( + n = 5, + corr = 0.5, + p = 0.5 + )) + expect_snapshot(correlated_pair_game_impl( + n = 5, + corr = 0.5, + p = 0.5, + directed = TRUE + )) + + # Structured tests + result <- correlated_pair_game_impl( + n = 5, + corr = 0.5, + p = 0.5 + ) + expect_type(result, "list") }) test_that("correlated_pair_game_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(correlated_pair_game_impl(-1, 0.5, 0.5)) + expect_snapshot_igraph_error(correlated_pair_game_impl( + n = -1, + corr = 0.5, + p = 0.5 + )) }) # 51. dot_product_game_impl @@ -833,14 +1571,27 @@ test_that("correlated_pair_game_impl errors", { test_that("dot_product_game_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(dot_product_game_impl(matrix(0.5, 5, 2))) - expect_snapshot(dot_product_game_impl(matrix(0.5, 5, 2), directed = TRUE)) + expect_snapshot(dot_product_game_impl( + vecs = matrix(0.5, 5, 2) + )) + expect_snapshot(dot_product_game_impl( + vecs = matrix(0.5, 5, 2), + directed = TRUE + )) + + # Structured tests + result <- dot_product_game_impl( + vecs = matrix(0.5, 5, 2) + ) + expect_s3_class(result, "igraph") }) test_that("dot_product_game_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(dot_product_game_impl(NULL)) + expect_snapshot_igraph_error(dot_product_game_impl( + vecs = NULL + )) }) # 52. sample_sphere_surface_impl @@ -848,19 +1599,32 @@ test_that("dot_product_game_impl errors", { test_that("sample_sphere_surface_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(sample_sphere_surface_impl(3, 5)) expect_snapshot(sample_sphere_surface_impl( - 3, - 5, + dim = 3, + n = 5 + )) + expect_snapshot(sample_sphere_surface_impl( + dim = 3, + n = 5, radius = 2, positive = FALSE )) + + # Structured tests + result <- sample_sphere_surface_impl( + dim = 3, + n = 5 + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("sample_sphere_surface_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(sample_sphere_surface_impl(-1, 5)) + expect_snapshot_igraph_error(sample_sphere_surface_impl( + dim = -1, + n = 5 + )) }) # 53. sample_sphere_volume_impl @@ -868,14 +1632,32 @@ test_that("sample_sphere_surface_impl errors", { test_that("sample_sphere_volume_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(sample_sphere_volume_impl(3, 5)) - expect_snapshot(sample_sphere_volume_impl(3, 5, radius = 2, positive = FALSE)) + expect_snapshot(sample_sphere_volume_impl( + dim = 3, + n = 5 + )) + expect_snapshot(sample_sphere_volume_impl( + dim = 3, + n = 5, + radius = 2, + positive = FALSE + )) + + # Structured tests + result <- sample_sphere_volume_impl( + dim = 3, + n = 5 + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("sample_sphere_volume_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(sample_sphere_volume_impl(-1, 5)) + expect_snapshot_igraph_error(sample_sphere_volume_impl( + dim = -1, + n = 5 + )) }) # 54. sample_dirichlet_impl @@ -883,13 +1665,26 @@ test_that("sample_sphere_volume_impl errors", { test_that("sample_dirichlet_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(sample_dirichlet_impl(5, c(1, 1, 1))) + expect_snapshot(sample_dirichlet_impl( + n = 5, + alpha = c(1, 1, 1) + )) + + # Structured tests + result <- sample_dirichlet_impl( + n = 5, + alpha = c(1, 1, 1) + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("sample_dirichlet_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(sample_dirichlet_impl(-1, c(1, 1, 1))) + expect_snapshot_igraph_error(sample_dirichlet_impl( + n = -1, + alpha = c(1, 1, 1) + )) }) # 55. are_adjacent_impl @@ -897,14 +1692,33 @@ test_that("sample_dirichlet_impl errors", { test_that("are_adjacent_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(are_adjacent_impl(g, 1, 2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(are_adjacent_impl( + graph = g, + v1 = 1, + v2 = 2 + )) + + # Structured tests + result <- are_adjacent_impl( + graph = g, + v1 = 1, + v2 = 2 + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("are_adjacent_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(are_adjacent_impl(NULL, 1, 2)) + expect_snapshot_igraph_error(are_adjacent_impl( + graph = NULL, + v1 = 1, + v2 = 2 + )) }) # 56. closeness_impl @@ -912,15 +1726,32 @@ test_that("are_adjacent_impl errors", { test_that("closeness_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(closeness_impl(g)) - expect_snapshot(closeness_impl(g, mode = "in", normalized = TRUE)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(closeness_impl( + graph = g + )) + expect_snapshot(closeness_impl( + graph = g, + mode = "in", + normalized = TRUE + )) + + # Structured tests + result <- closeness_impl( + graph = g + ) + expect_type(result, "list") }) test_that("closeness_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(closeness_impl(NULL)) + expect_snapshot_igraph_error(closeness_impl( + graph = NULL + )) }) # 57. closeness_cutoff_impl @@ -928,20 +1759,35 @@ test_that("closeness_impl errors", { test_that("closeness_cutoff_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(closeness_cutoff_impl(g, cutoff = 2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(closeness_cutoff_impl( + graph = g, + cutoff = 2 + )) expect_snapshot(closeness_cutoff_impl( - g, + graph = g, mode = "in", normalized = TRUE, cutoff = 1 )) + + # Structured tests + result <- closeness_cutoff_impl( + graph = g, + cutoff = 2 + ) + expect_type(result, "list") }) test_that("closeness_cutoff_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(closeness_cutoff_impl(NULL)) + expect_snapshot_igraph_error(closeness_cutoff_impl( + graph = NULL + )) }) # 58. get_shortest_path_impl @@ -949,14 +1795,33 @@ test_that("closeness_cutoff_impl errors", { test_that("get_shortest_path_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(get_shortest_path_impl(g, 1, 3)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(get_shortest_path_impl( + graph = g, + from = 1, + to = 3 + )) + + # Structured tests + result <- get_shortest_path_impl( + graph = g, + from = 1, + to = 3 + ) + expect_type(result, "list") }) test_that("get_shortest_path_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(get_shortest_path_impl(NULL, 1, 3)) + expect_snapshot_igraph_error(get_shortest_path_impl( + graph = NULL, + from = 1, + to = 3 + )) }) # 59. get_shortest_path_bellman_ford_impl @@ -964,14 +1829,33 @@ test_that("get_shortest_path_impl errors", { test_that("get_shortest_path_bellman_ford_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(get_shortest_path_bellman_ford_impl(g, 1, 3)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(get_shortest_path_bellman_ford_impl( + graph = g, + from = 1, + to = 3 + )) + + # Structured tests + result <- get_shortest_path_bellman_ford_impl( + graph = g, + from = 1, + to = 3 + ) + expect_type(result, "list") }) test_that("get_shortest_path_bellman_ford_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(get_shortest_path_bellman_ford_impl(NULL, 1, 3)) + expect_snapshot_igraph_error(get_shortest_path_bellman_ford_impl( + graph = NULL, + from = 1, + to = 3 + )) }) # 60. get_shortest_path_dijkstra_impl @@ -979,14 +1863,33 @@ test_that("get_shortest_path_bellman_ford_impl errors", { test_that("get_shortest_path_dijkstra_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(get_shortest_path_dijkstra_impl(g, 1, 3)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(get_shortest_path_dijkstra_impl( + graph = g, + from = 1, + to = 3 + )) + + # Structured tests + result <- get_shortest_path_dijkstra_impl( + graph = g, + from = 1, + to = 3 + ) + expect_type(result, "list") }) test_that("get_shortest_path_dijkstra_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(get_shortest_path_dijkstra_impl(NULL, 1, 3)) + expect_snapshot_igraph_error(get_shortest_path_dijkstra_impl( + graph = NULL, + from = 1, + to = 3 + )) }) # 61. get_all_shortest_paths_impl @@ -994,14 +1897,33 @@ test_that("get_shortest_path_dijkstra_impl errors", { test_that("get_all_shortest_paths_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(get_all_shortest_paths_impl(g, 1, 3)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(get_all_shortest_paths_impl( + graph = g, + from = 1, + to = 3 + )) + + # Structured tests + result <- get_all_shortest_paths_impl( + graph = g, + from = 1, + to = 3 + ) + expect_type(result, "list") }) test_that("get_all_shortest_paths_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(get_all_shortest_paths_impl(NULL, 1, 3)) + expect_snapshot_igraph_error(get_all_shortest_paths_impl( + graph = NULL, + from = 1, + to = 3 + )) }) # 62. get_all_shortest_paths_dijkstra_impl @@ -1009,15 +1931,34 @@ test_that("get_all_shortest_paths_impl errors", { test_that("get_all_shortest_paths_dijkstra_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(get_all_shortest_paths_dijkstra_impl(g, 1, 3)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(get_all_shortest_paths_dijkstra_impl( + graph = g, + from = 1, + to = 3 + )) + + # Structured tests + result <- get_all_shortest_paths_dijkstra_impl( + graph = g, + from = 1, + to = 3 + ) + expect_type(result, "list") }) test_that("get_all_shortest_paths_dijkstra_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - get_all_shortest_paths_dijkstra_impl(NULL, 1, 3) + get_all_shortest_paths_dijkstra_impl( + graph = NULL, + from = 1, + to = 3 + ) ) }) @@ -1026,15 +1967,36 @@ test_that("get_all_shortest_paths_dijkstra_impl errors", { test_that("voronoi_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(voronoi_impl(g, 1)) - expect_snapshot(voronoi_impl(g, 1, mode = "in", tiebreaker = "first")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(voronoi_impl( + graph = g, + generators = 1 + )) + expect_snapshot(voronoi_impl( + graph = g, + generators = 1, + mode = "in", + tiebreaker = "first" + )) + + # Structured tests + result <- voronoi_impl( + graph = g, + generators = 1 + ) + expect_type(result, "list") }) test_that("voronoi_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(voronoi_impl(NULL, 1)) + expect_snapshot_igraph_error(voronoi_impl( + graph = NULL, + generators = 1 + )) }) # 64. get_all_simple_paths_impl @@ -1042,14 +2004,33 @@ test_that("voronoi_impl errors", { test_that("get_all_simple_paths_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(get_all_simple_paths_impl(g, 1, 3)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(get_all_simple_paths_impl( + graph = g, + from = 1, + to = 3 + )) + + # Structured tests + result <- get_all_simple_paths_impl( + graph = g, + from = 1, + to = 3 + ) + expect_s3_class(result, "igraph.vs") }) test_that("get_all_simple_paths_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(get_all_simple_paths_impl(NULL, 1, 3)) + expect_snapshot_igraph_error(get_all_simple_paths_impl( + graph = NULL, + from = 1, + to = 3 + )) }) # 65. get_k_shortest_paths_impl @@ -1057,14 +2038,36 @@ test_that("get_all_simple_paths_impl errors", { test_that("get_k_shortest_paths_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(get_k_shortest_paths_impl(g, 1, 3, k = 2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(get_k_shortest_paths_impl( + graph = g, + from = 1, + to = 3, + k = 2 + )) + + # Structured tests + result <- get_k_shortest_paths_impl( + graph = g, + from = 1, + to = 3, + k = 2 + ) + expect_type(result, "list") }) test_that("get_k_shortest_paths_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(get_k_shortest_paths_impl(NULL, 1, 3, k = 2)) + expect_snapshot_igraph_error(get_k_shortest_paths_impl( + graph = NULL, + from = 1, + to = 3, + k = 2 + )) }) # 66. get_widest_path_impl @@ -1072,14 +2075,35 @@ test_that("get_k_shortest_paths_impl errors", { test_that("get_widest_path_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(get_widest_path_impl(g, 1, 3, weights = c(1, 2))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(get_widest_path_impl( + graph = g, + from = 1, + to = 3, + weights = c(1, 2) + )) + + # Structured tests + result <- get_widest_path_impl( + graph = g, + from = 1, + to = 3, + weights = c(1, 2) + ) + expect_type(result, "list") }) test_that("get_widest_path_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(get_widest_path_impl(NULL, 1, 3)) + expect_snapshot_igraph_error(get_widest_path_impl( + graph = NULL, + from = 1, + to = 3 + )) }) # 67. get_widest_paths_impl @@ -1087,14 +2111,35 @@ test_that("get_widest_path_impl errors", { test_that("get_widest_paths_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(get_widest_paths_impl(g, 1, 3, weights = c(1, 2))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(get_widest_paths_impl( + graph = g, + from = 1, + to = 3, + weights = c(1, 2) + )) + + # Structured tests + result <- get_widest_paths_impl( + graph = g, + from = 1, + to = 3, + weights = c(1, 2) + ) + expect_type(result, "list") }) test_that("get_widest_paths_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(get_widest_paths_impl(NULL, 1, 3)) + expect_snapshot_igraph_error(get_widest_paths_impl( + graph = NULL, + from = 1, + to = 3 + )) }) # 70. spanner_impl @@ -1102,14 +2147,30 @@ test_that("get_widest_paths_impl errors", { test_that("spanner_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(spanner_impl(g, 2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(spanner_impl( + graph = g, + stretch = 2 + )) + + # Structured tests + result <- spanner_impl( + graph = g, + stretch = 2 + ) + expect_s3_class(result, "igraph.es") }) test_that("spanner_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(spanner_impl(NULL, 2)) + expect_snapshot_igraph_error(spanner_impl( + graph = NULL, + stretch = 2 + )) }) # 71. betweenness_cutoff_impl @@ -1117,14 +2178,30 @@ test_that("spanner_impl errors", { test_that("betweenness_cutoff_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(betweenness_cutoff_impl(g, cutoff = 2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(betweenness_cutoff_impl( + graph = g, + cutoff = 2 + )) + + # Structured tests + result <- betweenness_cutoff_impl( + graph = g, + cutoff = 2 + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("betweenness_cutoff_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(betweenness_cutoff_impl(NULL, cutoff = 2)) + expect_snapshot_igraph_error(betweenness_cutoff_impl( + graph = NULL, + cutoff = 2 + )) }) # 72. betweenness_subset_impl @@ -1132,14 +2209,27 @@ test_that("betweenness_cutoff_impl errors", { test_that("betweenness_subset_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(betweenness_subset_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(betweenness_subset_impl( + graph = g + )) + + # Structured tests + result <- betweenness_subset_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("betweenness_subset_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(betweenness_subset_impl(NULL)) + expect_snapshot_igraph_error(betweenness_subset_impl( + graph = NULL + )) }) # 73. edge_betweenness_impl @@ -1147,14 +2237,27 @@ test_that("betweenness_subset_impl errors", { test_that("edge_betweenness_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(edge_betweenness_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(edge_betweenness_impl( + graph = g + )) + + # Structured tests + result <- edge_betweenness_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("edge_betweenness_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(edge_betweenness_impl(NULL)) + expect_snapshot_igraph_error(edge_betweenness_impl( + graph = NULL + )) }) # 74. edge_betweenness_cutoff_impl @@ -1162,14 +2265,30 @@ test_that("edge_betweenness_impl errors", { test_that("edge_betweenness_cutoff_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(edge_betweenness_cutoff_impl(g, cutoff = 2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(edge_betweenness_cutoff_impl( + graph = g, + cutoff = 2 + )) + + # Structured tests + result <- edge_betweenness_cutoff_impl( + graph = g, + cutoff = 2 + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("edge_betweenness_cutoff_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(edge_betweenness_cutoff_impl(NULL, cutoff = 2)) + expect_snapshot_igraph_error(edge_betweenness_cutoff_impl( + graph = NULL, + cutoff = 2 + )) }) # 75. edge_betweenness_subset_impl @@ -1177,14 +2296,27 @@ test_that("edge_betweenness_cutoff_impl errors", { test_that("edge_betweenness_subset_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(edge_betweenness_subset_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(edge_betweenness_subset_impl( + graph = g + )) + + # Structured tests + result <- edge_betweenness_subset_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("edge_betweenness_subset_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(edge_betweenness_subset_impl(NULL)) + expect_snapshot_igraph_error(edge_betweenness_subset_impl( + graph = NULL + )) }) # 76. harmonic_centrality_cutoff_impl @@ -1192,15 +2324,31 @@ test_that("edge_betweenness_subset_impl errors", { test_that("harmonic_centrality_cutoff_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(harmonic_centrality_cutoff_impl(g, cutoff = 2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(harmonic_centrality_cutoff_impl( + graph = g, + cutoff = 2 + )) + + # Structured tests + result <- harmonic_centrality_cutoff_impl( + graph = g, + cutoff = 2 + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("harmonic_centrality_cutoff_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - harmonic_centrality_cutoff_impl(NULL, cutoff = 2) + harmonic_centrality_cutoff_impl( + graph = NULL, + cutoff = 2 + ) ) }) @@ -1209,15 +2357,32 @@ test_that("harmonic_centrality_cutoff_impl errors", { test_that("personalized_pagerank_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(personalized_pagerank_impl(g)) - expect_snapshot(personalized_pagerank_impl(g, algo = "arpack", damping = 0.9)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(personalized_pagerank_impl( + graph = g + )) + expect_snapshot(personalized_pagerank_impl( + graph = g, + algo = "arpack", + damping = 0.9 + )) + + # Structured tests + result <- personalized_pagerank_impl( + graph = g + ) + expect_type(result, "list") }) test_that("personalized_pagerank_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(personalized_pagerank_impl(NULL)) + expect_snapshot_igraph_error(personalized_pagerank_impl( + graph = NULL + )) }) # 78. personalized_pagerank_vs_impl @@ -1225,21 +2390,37 @@ test_that("personalized_pagerank_impl errors", { test_that("personalized_pagerank_vs_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(personalized_pagerank_vs_impl(g, reset.vids = 1)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(personalized_pagerank_vs_impl( + graph = g, + reset.vids = 1 + )) expect_snapshot(personalized_pagerank_vs_impl( - g, + graph = g, algo = "arpack", reset.vids = 1, details = TRUE )) + + # Structured tests + result <- personalized_pagerank_vs_impl( + graph = g, + reset.vids = 1 + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("personalized_pagerank_vs_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - personalized_pagerank_vs_impl(NULL, reset.vids = 1) + personalized_pagerank_vs_impl( + graph = NULL, + reset.vids = 1 + ) ) }) @@ -1248,14 +2429,30 @@ test_that("personalized_pagerank_vs_impl errors", { test_that("induced_subgraph_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(induced_subgraph_impl(g, 1:2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(induced_subgraph_impl( + graph = g, + vids = 1:2 + )) + + # Structured tests + result <- induced_subgraph_impl( + graph = g, + vids = 1:2 + ) + expect_s3_class(result, "igraph") }) test_that("induced_subgraph_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(induced_subgraph_impl(NULL, 1:2)) + expect_snapshot_igraph_error(induced_subgraph_impl( + graph = NULL, + vids = 1:2 + )) }) # 80. subgraph_from_edges_impl @@ -1263,14 +2460,30 @@ test_that("induced_subgraph_impl errors", { test_that("subgraph_from_edges_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(subgraph_from_edges_impl(g, 1)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(subgraph_from_edges_impl( + graph = g, + eids = 1 + )) + + # Structured tests + result <- subgraph_from_edges_impl( + graph = g, + eids = 1 + ) + expect_s3_class(result, "igraph") }) test_that("subgraph_from_edges_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(subgraph_from_edges_impl(NULL, 1)) + expect_snapshot_igraph_error(subgraph_from_edges_impl( + graph = NULL, + eids = 1 + )) }) # 81. reverse_edges_impl @@ -1278,14 +2491,27 @@ test_that("subgraph_from_edges_impl errors", { test_that("reverse_edges_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(reverse_edges_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(reverse_edges_impl( + graph = g + )) + + # Structured tests + result <- reverse_edges_impl( + graph = g + ) + expect_s3_class(result, "igraph") }) test_that("reverse_edges_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(reverse_edges_impl(NULL)) + expect_snapshot_igraph_error(reverse_edges_impl( + graph = NULL + )) }) # and much more halucination before... @@ -1297,15 +2523,31 @@ test_that("reverse_edges_impl errors", { test_that("path_length_hist_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(path_length_hist_impl(g)) - expect_snapshot(path_length_hist_impl(g, directed = FALSE)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(path_length_hist_impl( + graph = g + )) + expect_snapshot(path_length_hist_impl( + graph = g, + directed = FALSE + )) + + # Structured tests + result <- path_length_hist_impl( + graph = g + ) + expect_type(result, "list") }) test_that("path_length_hist_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(path_length_hist_impl(NULL)) + expect_snapshot_igraph_error(path_length_hist_impl( + graph = NULL + )) }) # 102. simplify_impl @@ -1313,19 +2555,32 @@ test_that("path_length_hist_impl errors", { test_that("simplify_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(simplify_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(simplify_impl( + graph = g + )) expect_snapshot(simplify_impl( - g, + graph = g, remove.multiple = FALSE, remove.loops = FALSE )) + + # Structured tests + result <- simplify_impl( + graph = g + ) + expect_s3_class(result, "igraph") }) test_that("simplify_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(simplify_impl(NULL)) + expect_snapshot_igraph_error(simplify_impl( + graph = NULL + )) }) # 103. transitivity_undirected_impl @@ -1333,15 +2588,31 @@ test_that("simplify_impl errors", { test_that("transitivity_undirected_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(transitivity_undirected_impl(g)) - expect_snapshot(transitivity_undirected_impl(g, mode = "zero")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(transitivity_undirected_impl( + graph = g + )) + expect_snapshot(transitivity_undirected_impl( + graph = g, + mode = "zero" + )) + + # Structured tests + result <- transitivity_undirected_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("transitivity_undirected_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(transitivity_undirected_impl(NULL)) + expect_snapshot_igraph_error(transitivity_undirected_impl( + graph = NULL + )) }) # 104. transitivity_local_undirected_impl @@ -1349,15 +2620,31 @@ test_that("transitivity_undirected_impl errors", { test_that("transitivity_local_undirected_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(transitivity_local_undirected_impl(g)) - expect_snapshot(transitivity_local_undirected_impl(g, mode = "zero")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(transitivity_local_undirected_impl( + graph = g + )) + expect_snapshot(transitivity_local_undirected_impl( + graph = g, + mode = "zero" + )) + + # Structured tests + result <- transitivity_local_undirected_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("transitivity_local_undirected_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(transitivity_local_undirected_impl(NULL)) + expect_snapshot_igraph_error(transitivity_local_undirected_impl( + graph = NULL + )) }) # 105. transitivity_avglocal_undirected_impl @@ -1365,15 +2652,31 @@ test_that("transitivity_local_undirected_impl errors", { test_that("transitivity_avglocal_undirected_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(transitivity_avglocal_undirected_impl(g)) - expect_snapshot(transitivity_avglocal_undirected_impl(g, mode = "zero")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(transitivity_avglocal_undirected_impl( + graph = g + )) + expect_snapshot(transitivity_avglocal_undirected_impl( + graph = g, + mode = "zero" + )) + + # Structured tests + result <- transitivity_avglocal_undirected_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("transitivity_avglocal_undirected_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(transitivity_avglocal_undirected_impl(NULL)) + expect_snapshot_igraph_error(transitivity_avglocal_undirected_impl( + graph = NULL + )) }) # 106. transitivity_barrat_impl @@ -1381,15 +2684,31 @@ test_that("transitivity_avglocal_undirected_impl errors", { test_that("transitivity_barrat_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(transitivity_barrat_impl(g)) - expect_snapshot(transitivity_barrat_impl(g, mode = "zero")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(transitivity_barrat_impl( + graph = g + )) + expect_snapshot(transitivity_barrat_impl( + graph = g, + mode = "zero" + )) + + # Structured tests + result <- transitivity_barrat_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("transitivity_barrat_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(transitivity_barrat_impl(NULL)) + expect_snapshot_igraph_error(transitivity_barrat_impl( + graph = NULL + )) }) # 107. ecc_impl @@ -1397,15 +2716,33 @@ test_that("transitivity_barrat_impl errors", { test_that("ecc_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(4) - expect_snapshot(ecc_impl(g)) - expect_snapshot(ecc_impl(g, k = 3, offset = TRUE, normalize = FALSE)) + g <- path_graph_impl( + n = 4 + ) + + expect_snapshot(ecc_impl( + graph = g + )) + expect_snapshot(ecc_impl( + graph = g, + k = 3, + offset = TRUE, + normalize = FALSE + )) + + # Structured tests + result <- ecc_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("ecc_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(ecc_impl(NULL)) + expect_snapshot_igraph_error(ecc_impl( + graph = NULL + )) }) # 108. reciprocity_impl @@ -1413,15 +2750,32 @@ test_that("ecc_impl errors", { test_that("reciprocity_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(reciprocity_impl(g)) - expect_snapshot(reciprocity_impl(g, ignore.loops = FALSE, mode = "ratio")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(reciprocity_impl( + graph = g + )) + expect_snapshot(reciprocity_impl( + graph = g, + ignore.loops = FALSE, + mode = "ratio" + )) + + # Structured tests + result <- reciprocity_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("reciprocity_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(reciprocity_impl(NULL)) + expect_snapshot_igraph_error(reciprocity_impl( + graph = NULL + )) }) # 109. maxdegree_impl @@ -1429,15 +2783,32 @@ test_that("reciprocity_impl errors", { test_that("maxdegree_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(maxdegree_impl(g)) - expect_snapshot(maxdegree_impl(g, mode = "in", loops = FALSE)) -}) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(maxdegree_impl( + graph = g + )) + expect_snapshot(maxdegree_impl( + graph = g, + mode = "in", + loops = FALSE + )) + + # Structured tests + result <- maxdegree_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) +}) test_that("maxdegree_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(maxdegree_impl(NULL)) + expect_snapshot_igraph_error(maxdegree_impl( + graph = NULL + )) }) # 110. density_impl @@ -1445,15 +2816,31 @@ test_that("maxdegree_impl errors", { test_that("density_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(density_impl(g)) - expect_snapshot(density_impl(g, loops = TRUE)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(density_impl( + graph = g + )) + expect_snapshot(density_impl( + graph = g, + loops = TRUE + )) + + # Structured tests + result <- density_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("density_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(density_impl(NULL)) + expect_snapshot_igraph_error(density_impl( + graph = NULL + )) }) # 111. mean_degree_impl @@ -1461,15 +2848,31 @@ test_that("density_impl errors", { test_that("mean_degree_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(mean_degree_impl(g)) - expect_snapshot(mean_degree_impl(g, loops = FALSE)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(mean_degree_impl( + graph = g + )) + expect_snapshot(mean_degree_impl( + graph = g, + loops = FALSE + )) + + # Structured tests + result <- mean_degree_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("mean_degree_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(mean_degree_impl(NULL)) + expect_snapshot_igraph_error(mean_degree_impl( + graph = NULL + )) }) # 112. feedback_arc_set_impl @@ -1477,15 +2880,31 @@ test_that("mean_degree_impl errors", { test_that("feedback_arc_set_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(feedback_arc_set_impl(g)) - expect_snapshot(feedback_arc_set_impl(g, algo = "exact_ip")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(feedback_arc_set_impl( + graph = g + )) + expect_snapshot(feedback_arc_set_impl( + graph = g, + algo = "exact_ip" + )) + + # Structured tests + result <- feedback_arc_set_impl( + graph = g + ) + expect_s3_class(result, "igraph.es") }) test_that("feedback_arc_set_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(feedback_arc_set_impl(NULL)) + expect_snapshot_igraph_error(feedback_arc_set_impl( + graph = NULL + )) }) # 113. feedback_vertex_set_impl @@ -1493,14 +2912,27 @@ test_that("feedback_arc_set_impl errors", { test_that("feedback_vertex_set_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(feedback_vertex_set_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(feedback_vertex_set_impl( + graph = g + )) + + # Structured tests + result <- feedback_vertex_set_impl( + graph = g + ) + expect_s3_class(result, "igraph.vs") }) test_that("feedback_vertex_set_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(feedback_vertex_set_impl(NULL)) + expect_snapshot_igraph_error(feedback_vertex_set_impl( + graph = NULL + )) }) # 114. is_loop_impl @@ -1508,14 +2940,27 @@ test_that("feedback_vertex_set_impl errors", { test_that("is_loop_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_loop_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_loop_impl( + graph = g + )) + + # Structured tests + result <- is_loop_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("is_loop_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_loop_impl(NULL)) + expect_snapshot_igraph_error(is_loop_impl( + graph = NULL + )) }) # 115. is_dag_impl @@ -1523,14 +2968,27 @@ test_that("is_loop_impl errors", { test_that("is_dag_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_dag_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_dag_impl( + graph = g + )) + + # Structured tests + result <- is_dag_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("is_dag_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_dag_impl(NULL)) + expect_snapshot_igraph_error(is_dag_impl( + graph = NULL + )) }) # 116. is_acyclic_impl @@ -1538,14 +2996,27 @@ test_that("is_dag_impl errors", { test_that("is_acyclic_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_acyclic_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_acyclic_impl( + graph = g + )) + + # Structured tests + result <- is_acyclic_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("is_acyclic_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_acyclic_impl(NULL)) + expect_snapshot_igraph_error(is_acyclic_impl( + graph = NULL + )) }) # 117. is_simple_impl @@ -1553,14 +3024,27 @@ test_that("is_acyclic_impl errors", { test_that("is_simple_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_simple_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_simple_impl( + graph = g + )) + + # Structured tests + result <- is_simple_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("is_simple_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_simple_impl(NULL)) + expect_snapshot_igraph_error(is_simple_impl( + graph = NULL + )) }) # 118. is_multiple_impl @@ -1568,14 +3052,27 @@ test_that("is_simple_impl errors", { test_that("is_multiple_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_multiple_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_multiple_impl( + graph = g + )) + + # Structured tests + result <- is_multiple_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("is_multiple_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_multiple_impl(NULL)) + expect_snapshot_igraph_error(is_multiple_impl( + graph = NULL + )) }) # 119. has_loop_impl @@ -1583,14 +3080,27 @@ test_that("is_multiple_impl errors", { test_that("has_loop_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(has_loop_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(has_loop_impl( + graph = g + )) + + # Structured tests + result <- has_loop_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("has_loop_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(has_loop_impl(NULL)) + expect_snapshot_igraph_error(has_loop_impl( + graph = NULL + )) }) # 120. has_multiple_impl @@ -1598,14 +3108,27 @@ test_that("has_loop_impl errors", { test_that("has_multiple_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(has_multiple_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(has_multiple_impl( + graph = g + )) + + # Structured tests + result <- has_multiple_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("has_multiple_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(has_multiple_impl(NULL)) + expect_snapshot_igraph_error(has_multiple_impl( + graph = NULL + )) }) # 121. count_loops_impl @@ -1613,14 +3136,27 @@ test_that("has_multiple_impl errors", { test_that("count_loops_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(count_loops_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(count_loops_impl( + graph = g + )) + + # Structured tests + result <- count_loops_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("count_loops_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(count_loops_impl(NULL)) + expect_snapshot_igraph_error(count_loops_impl( + graph = NULL + )) }) # 122. count_multiple_impl @@ -1628,14 +3164,27 @@ test_that("count_loops_impl errors", { test_that("count_multiple_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(count_multiple_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(count_multiple_impl( + graph = g + )) + + # Structured tests + result <- count_multiple_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("count_multiple_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(count_multiple_impl(NULL)) + expect_snapshot_igraph_error(count_multiple_impl( + graph = NULL + )) }) # 123. is_perfect_impl @@ -1643,14 +3192,27 @@ test_that("count_multiple_impl errors", { test_that("is_perfect_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_perfect_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_perfect_impl( + graph = g + )) + + # Structured tests + result <- is_perfect_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("is_perfect_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_perfect_impl(NULL)) + expect_snapshot_igraph_error(is_perfect_impl( + graph = NULL + )) }) # 124. eigenvector_centrality_impl @@ -1658,19 +3220,32 @@ test_that("is_perfect_impl errors", { test_that("eigenvector_centrality_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(eigenvector_centrality_impl(g)) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(eigenvector_centrality_impl( - g, + graph = g + )) + expect_snapshot(eigenvector_centrality_impl( + graph = g, directed = TRUE, scale = FALSE )) + + # Structured tests + result <- eigenvector_centrality_impl( + graph = g + ) + expect_type(result, "list") }) test_that("eigenvector_centrality_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(eigenvector_centrality_impl(NULL)) + expect_snapshot_igraph_error(eigenvector_centrality_impl( + graph = NULL + )) }) # 125. hub_and_authority_scores_impl @@ -1679,14 +3254,27 @@ test_that("hub_and_authority_scores_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) g <- make_full_graph(5) - expect_snapshot(hub_and_authority_scores_impl(g)) - expect_snapshot(hub_and_authority_scores_impl(g, scale = FALSE)) + expect_snapshot(hub_and_authority_scores_impl( + graph = g + )) + expect_snapshot(hub_and_authority_scores_impl( + graph = g, + scale = FALSE + )) + + # Structured tests + result <- hub_and_authority_scores_impl( + graph = g + ) + expect_type(result, "list") }) test_that("hub_and_authority_scores_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(hub_and_authority_scores_impl(NULL)) + expect_snapshot_igraph_error(hub_and_authority_scores_impl( + graph = NULL + )) }) # 126. unfold_tree_impl @@ -1694,15 +3282,35 @@ test_that("hub_and_authority_scores_impl errors", { test_that("unfold_tree_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(unfold_tree_impl(g, roots = 1)) - expect_snapshot(unfold_tree_impl(g, mode = "in", roots = 1)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(unfold_tree_impl( + graph = g, + roots = 1 + )) + expect_snapshot(unfold_tree_impl( + graph = g, + mode = "in", + roots = 1 + )) + + # Structured tests + result <- unfold_tree_impl( + graph = g, + roots = 1 + ) + expect_type(result, "list") }) test_that("unfold_tree_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(unfold_tree_impl(NULL, roots = 1)) + expect_snapshot_igraph_error(unfold_tree_impl( + graph = NULL, + roots = 1 + )) }) # 127. is_mutual_impl @@ -1710,15 +3318,31 @@ test_that("unfold_tree_impl errors", { test_that("is_mutual_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_mutual_impl(g)) - expect_snapshot(is_mutual_impl(g, loops = FALSE)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_mutual_impl( + graph = g + )) + expect_snapshot(is_mutual_impl( + graph = g, + loops = FALSE + )) + + # Structured tests + result <- is_mutual_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("is_mutual_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_mutual_impl(NULL)) + expect_snapshot_igraph_error(is_mutual_impl( + graph = NULL + )) }) # 128. has_mutual_impl @@ -1726,15 +3350,31 @@ test_that("is_mutual_impl errors", { test_that("has_mutual_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(has_mutual_impl(g)) - expect_snapshot(has_mutual_impl(g, loops = FALSE)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(has_mutual_impl( + graph = g + )) + expect_snapshot(has_mutual_impl( + graph = g, + loops = FALSE + )) + + # Structured tests + result <- has_mutual_impl( + graph = g + ) + expect_type(result, "logical") }) test_that("has_mutual_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(has_mutual_impl(NULL)) + expect_snapshot_igraph_error(has_mutual_impl( + graph = NULL + )) }) # 129. maximum_cardinality_search_impl @@ -1742,14 +3382,27 @@ test_that("has_mutual_impl errors", { test_that("maximum_cardinality_search_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(maximum_cardinality_search_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(maximum_cardinality_search_impl( + graph = g + )) + + # Structured tests + result <- maximum_cardinality_search_impl( + graph = g + ) + expect_type(result, "list") }) test_that("maximum_cardinality_search_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(maximum_cardinality_search_impl(NULL)) + expect_snapshot_igraph_error(maximum_cardinality_search_impl( + graph = NULL + )) }) # 130. avg_nearest_neighbor_degree_impl @@ -1757,19 +3410,32 @@ test_that("maximum_cardinality_search_impl errors", { test_that("avg_nearest_neighbor_degree_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(avg_nearest_neighbor_degree_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(avg_nearest_neighbor_degree_impl( + graph = g + )) expect_snapshot(avg_nearest_neighbor_degree_impl( - g, + graph = g, mode = "in", neighbor.degree.mode = "out" )) + + # Structured tests + result <- avg_nearest_neighbor_degree_impl( + graph = g + ) + expect_type(result, "list") }) test_that("avg_nearest_neighbor_degree_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(avg_nearest_neighbor_degree_impl(NULL)) + expect_snapshot_igraph_error(avg_nearest_neighbor_degree_impl( + graph = NULL + )) }) # 131. degree_correlation_vector_impl @@ -1777,20 +3443,33 @@ test_that("avg_nearest_neighbor_degree_impl errors", { test_that("degree_correlation_vector_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(degree_correlation_vector_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(degree_correlation_vector_impl( + graph = g + )) expect_snapshot(degree_correlation_vector_impl( - g, + graph = g, from.mode = "in", to.mode = "out", directed.neighbors = FALSE )) + + # Structured tests + result <- degree_correlation_vector_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("degree_correlation_vector_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(degree_correlation_vector_impl(NULL)) + expect_snapshot_igraph_error(degree_correlation_vector_impl( + graph = NULL + )) }) # 132. rich_club_sequence_impl @@ -1798,22 +3477,38 @@ test_that("degree_correlation_vector_impl errors", { test_that("rich_club_sequence_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(rich_club_sequence_impl(g, vertex.order = 1:3)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(rich_club_sequence_impl( + graph = g, + vertex.order = 1:3 + )) expect_snapshot(rich_club_sequence_impl( - g, + graph = g, vertex.order = 1:3, normalized = FALSE, loops = TRUE, directed = FALSE )) + + # Structured tests + result <- rich_club_sequence_impl( + graph = g, + vertex.order = 1:3 + ) + expect_true(is.numeric(result)) }) test_that("rich_club_sequence_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - rich_club_sequence_impl(NULL, vertex.order = 1:3) + rich_club_sequence_impl( + graph = NULL, + vertex.order = 1:3 + ) ) }) @@ -1822,15 +3517,32 @@ test_that("rich_club_sequence_impl errors", { test_that("strength_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(strength_impl(g)) - expect_snapshot(strength_impl(g, mode = "in", loops = FALSE)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(strength_impl( + graph = g + )) + expect_snapshot(strength_impl( + graph = g, + mode = "in", + loops = FALSE + )) + + # Structured tests + result <- strength_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("strength_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(strength_impl(NULL)) + expect_snapshot_igraph_error(strength_impl( + graph = NULL + )) }) # 134. centralization_impl @@ -1838,18 +3550,28 @@ test_that("strength_impl errors", { test_that("centralization_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(centralization_impl(c(1, 2, 3))) expect_snapshot(centralization_impl( - c(1, 2, 3), + scores = c(1, 2, 3) + )) + expect_snapshot(centralization_impl( + scores = c(1, 2, 3), theoretical.max = 2, normalized = FALSE )) + + # Structured tests + result <- centralization_impl( + scores = c(1, 2, 3) + ) + expect_true(is.numeric(result)) }) test_that("centralization_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(centralization_impl(package_version("1.2.3"))) + expect_snapshot_igraph_error(centralization_impl( + scores = package_version("1.2.3") + )) }) # 135. centralization_degree_impl @@ -1857,20 +3579,33 @@ test_that("centralization_impl errors", { test_that("centralization_degree_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(centralization_degree_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(centralization_degree_impl( + graph = g + )) expect_snapshot(centralization_degree_impl( - g, + graph = g, mode = "in", loops = FALSE, normalized = FALSE )) + + # Structured tests + result <- centralization_degree_impl( + graph = g + ) + expect_type(result, "list") }) test_that("centralization_degree_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(centralization_degree_impl(NULL)) + expect_snapshot_igraph_error(centralization_degree_impl( + graph = NULL + )) }) # 136. centralization_degree_tmax_impl @@ -1878,19 +3613,32 @@ test_that("centralization_degree_impl errors", { test_that("centralization_degree_tmax_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(centralization_degree_tmax_impl(nodes = 3, loops = TRUE)) + expect_snapshot(centralization_degree_tmax_impl( + nodes = 3, + loops = TRUE + )) expect_snapshot(centralization_degree_tmax_impl( nodes = 3, mode = "in", loops = FALSE )) + + # Structured tests + result <- centralization_degree_tmax_impl( + nodes = 3, + loops = TRUE + ) + expect_true(is.numeric(result)) }) test_that("centralization_degree_tmax_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - centralization_degree_tmax_impl(nodes = -1, loops = TRUE) + centralization_degree_tmax_impl( + nodes = -1, + loops = TRUE + ) ) }) @@ -1899,19 +3647,32 @@ test_that("centralization_degree_tmax_impl errors", { test_that("centralization_betweenness_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(centralization_betweenness_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(centralization_betweenness_impl( + graph = g + )) expect_snapshot(centralization_betweenness_impl( - g, + graph = g, directed = FALSE, normalized = FALSE )) + + # Structured tests + result <- centralization_betweenness_impl( + graph = g + ) + expect_type(result, "list") }) test_that("centralization_betweenness_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(centralization_betweenness_impl(NULL)) + expect_snapshot_igraph_error(centralization_betweenness_impl( + graph = NULL + )) }) # 138. centralization_betweenness_tmax_impl @@ -1927,13 +3688,23 @@ test_that("centralization_betweenness_tmax_impl basic", { nodes = 3, directed = FALSE )) + + # Structured tests + result <- centralization_betweenness_tmax_impl( + nodes = 3, + directed = TRUE + ) + expect_true(is.numeric(result)) }) test_that("centralization_betweenness_tmax_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - centralization_betweenness_tmax_impl(nodes = -1, directed = TRUE) + centralization_betweenness_tmax_impl( + nodes = -1, + directed = TRUE + ) ) }) @@ -1942,19 +3713,32 @@ test_that("centralization_betweenness_tmax_impl errors", { test_that("centralization_closeness_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(centralization_closeness_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(centralization_closeness_impl( + graph = g + )) expect_snapshot(centralization_closeness_impl( - g, + graph = g, mode = "in", normalized = FALSE )) + + # Structured tests + result <- centralization_closeness_impl( + graph = g + ) + expect_type(result, "list") }) test_that("centralization_closeness_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(centralization_closeness_impl(NULL)) + expect_snapshot_igraph_error(centralization_closeness_impl( + graph = NULL + )) }) # 140. centralization_closeness_tmax_impl @@ -1962,14 +3746,27 @@ test_that("centralization_closeness_impl errors", { test_that("centralization_closeness_tmax_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(centralization_closeness_tmax_impl(nodes = 3)) - expect_snapshot(centralization_closeness_tmax_impl(nodes = 3, mode = "in")) + expect_snapshot(centralization_closeness_tmax_impl( + nodes = 3 + )) + expect_snapshot(centralization_closeness_tmax_impl( + nodes = 3, + mode = "in" + )) + + # Structured tests + result <- centralization_closeness_tmax_impl( + nodes = 3 + ) + expect_true(is.numeric(result)) }) test_that("centralization_closeness_tmax_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(centralization_closeness_tmax_impl(nodes = -1)) + expect_snapshot_igraph_error(centralization_closeness_tmax_impl( + nodes = -1 + )) }) # 141. centralization_eigenvector_centrality_impl @@ -1977,20 +3774,33 @@ test_that("centralization_closeness_tmax_impl errors", { test_that("centralization_eigenvector_centrality_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(centralization_eigenvector_centrality_impl(g)) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(centralization_eigenvector_centrality_impl( - g, + graph = g + )) + expect_snapshot(centralization_eigenvector_centrality_impl( + graph = g, directed = TRUE, normalized = FALSE )) + + # Structured tests + result <- centralization_eigenvector_centrality_impl( + graph = g + ) + expect_type(result, "list") }) test_that("centralization_eigenvector_centrality_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - centralization_eigenvector_centrality_impl(NULL) + centralization_eigenvector_centrality_impl( + graph = NULL + ) ) }) @@ -1999,18 +3809,28 @@ test_that("centralization_eigenvector_centrality_impl errors", { test_that("centralization_eigenvector_centrality_tmax_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(centralization_eigenvector_centrality_tmax_impl(nodes = 3)) + expect_snapshot(centralization_eigenvector_centrality_tmax_impl( + nodes = 3 + )) expect_snapshot(centralization_eigenvector_centrality_tmax_impl( nodes = 3, directed = TRUE )) + + # Structured tests + result <- centralization_eigenvector_centrality_tmax_impl( + nodes = 3 + ) + expect_true(is.numeric(result)) }) test_that("centralization_eigenvector_centrality_tmax_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - centralization_eigenvector_centrality_tmax_impl(nodes = -1) + centralization_eigenvector_centrality_tmax_impl( + nodes = -1 + ) ) }) @@ -2019,20 +3839,36 @@ test_that("centralization_eigenvector_centrality_tmax_impl errors", { test_that("assortativity_nominal_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(assortativity_nominal_impl(g, c(1, 2, 1))) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(assortativity_nominal_impl( - g, - c(1, 2, 1), + graph = g, + types = c(1, 2, 1) + )) + expect_snapshot(assortativity_nominal_impl( + graph = g, + types = c(1, 2, 1), directed = FALSE, normalized = FALSE )) + + # Structured tests + result <- assortativity_nominal_impl( + graph = g, + types = c(1, 2, 1) + ) + expect_true(is.numeric(result)) }) test_that("assortativity_nominal_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(assortativity_nominal_impl(NULL, c(1, 2, 1))) + expect_snapshot_igraph_error(assortativity_nominal_impl( + graph = NULL, + types = c(1, 2, 1) + )) }) # 144. assortativity_impl @@ -2040,20 +3876,36 @@ test_that("assortativity_nominal_impl errors", { test_that("assortativity_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(assortativity_impl(g, c(1, 2, 1))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(assortativity_impl( + graph = g, + values = c(1, 2, 1) + )) expect_snapshot(assortativity_impl( - g, - c(1, 2, 1), + graph = g, + values = c(1, 2, 1), directed = FALSE, normalized = FALSE )) + + # Structured tests + result <- assortativity_impl( + graph = g, + values = c(1, 2, 1) + ) + expect_true(is.numeric(result)) }) test_that("assortativity_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(assortativity_impl(NULL, c(1, 2, 1))) + expect_snapshot_igraph_error(assortativity_impl( + graph = NULL, + values = c(1, 2, 1) + )) }) # 145. assortativity_degree_impl @@ -2061,15 +3913,31 @@ test_that("assortativity_impl errors", { test_that("assortativity_degree_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(assortativity_degree_impl(g)) - expect_snapshot(assortativity_degree_impl(g, directed = FALSE)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(assortativity_degree_impl( + graph = g + )) + expect_snapshot(assortativity_degree_impl( + graph = g, + directed = FALSE + )) + + # Structured tests + result <- assortativity_degree_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("assortativity_degree_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(assortativity_degree_impl(NULL)) + expect_snapshot_igraph_error(assortativity_degree_impl( + graph = NULL + )) }) # 146. joint_degree_matrix_impl @@ -2077,19 +3945,32 @@ test_that("assortativity_degree_impl errors", { test_that("joint_degree_matrix_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(joint_degree_matrix_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(joint_degree_matrix_impl( + graph = g + )) expect_snapshot(joint_degree_matrix_impl( - g, + graph = g, max.out.degree = 2, max.in.degree = 2 )) + + # Structured tests + result <- joint_degree_matrix_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("joint_degree_matrix_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(joint_degree_matrix_impl(NULL)) + expect_snapshot_igraph_error(joint_degree_matrix_impl( + graph = NULL + )) }) # 147. joint_degree_distribution_impl @@ -2097,10 +3978,15 @@ test_that("joint_degree_matrix_impl errors", { test_that("joint_degree_distribution_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(joint_degree_distribution_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(joint_degree_distribution_impl( + graph = g + )) expect_snapshot(joint_degree_distribution_impl( - g, + graph = g, from.mode = "in", to.mode = "out", directed.neighbors = FALSE, @@ -2108,12 +3994,20 @@ test_that("joint_degree_distribution_impl basic", { max.from.degree = 2, max.to.degree = 2 )) + + # Structured tests + result <- joint_degree_distribution_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("joint_degree_distribution_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(joint_degree_distribution_impl(NULL)) + expect_snapshot_igraph_error(joint_degree_distribution_impl( + graph = NULL + )) }) # 148. joint_type_distribution_impl @@ -2121,22 +4015,38 @@ test_that("joint_degree_distribution_impl errors", { test_that("joint_type_distribution_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(joint_type_distribution_impl(g, from.types = c(1, 2, 1))) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(joint_type_distribution_impl( - g, + graph = g, + from.types = c(1, 2, 1) + )) + expect_snapshot(joint_type_distribution_impl( + graph = g, from.types = c(1, 2, 1), to.types = c(1, 2, 1), directed = FALSE, normalized = FALSE )) + + # Structured tests + result <- joint_type_distribution_impl( + graph = g, + from.types = c(1, 2, 1) + ) + expect_true(is.numeric(result)) }) test_that("joint_type_distribution_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - joint_type_distribution_impl(NULL, from.types = c(1, 2, 1)) + joint_type_distribution_impl( + graph = NULL, + from.types = c(1, 2, 1) + ) ) }) @@ -2145,14 +4055,30 @@ test_that("joint_type_distribution_impl errors", { test_that("contract_vertices_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(contract_vertices_impl(g, c(1, 1, 2))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(contract_vertices_impl( + graph = g, + mapping = c(1, 1, 2) + )) + + # Structured tests + result <- contract_vertices_impl( + graph = g, + mapping = c(1, 1, 2) + ) + expect_s3_class(result, "igraph") }) test_that("contract_vertices_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(contract_vertices_impl(NULL, c(1, 1, 2))) + expect_snapshot_igraph_error(contract_vertices_impl( + graph = NULL, + mapping = c(1, 1, 2) + )) }) # 150. eccentricity_dijkstra_impl @@ -2160,15 +4086,31 @@ test_that("contract_vertices_impl errors", { test_that("eccentricity_dijkstra_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(eccentricity_dijkstra_impl(g)) - expect_snapshot(eccentricity_dijkstra_impl(g, mode = "in")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(eccentricity_dijkstra_impl( + graph = g + )) + expect_snapshot(eccentricity_dijkstra_impl( + graph = g, + mode = "in" + )) + + # Structured tests + result <- eccentricity_dijkstra_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("eccentricity_dijkstra_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(eccentricity_dijkstra_impl(NULL)) + expect_snapshot_igraph_error(eccentricity_dijkstra_impl( + graph = NULL + )) }) # 151. graph_center_dijkstra_impl @@ -2176,15 +4118,31 @@ test_that("eccentricity_dijkstra_impl errors", { test_that("graph_center_dijkstra_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(graph_center_dijkstra_impl(g)) - expect_snapshot(graph_center_dijkstra_impl(g, mode = "in")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(graph_center_dijkstra_impl( + graph = g + )) + expect_snapshot(graph_center_dijkstra_impl( + graph = g, + mode = "in" + )) + + # Structured tests + result <- graph_center_dijkstra_impl( + graph = g + ) + expect_s3_class(result, "igraph.vs") }) test_that("graph_center_dijkstra_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(graph_center_dijkstra_impl(NULL)) + expect_snapshot_igraph_error(graph_center_dijkstra_impl( + graph = NULL + )) }) # 152. radius_dijkstra_impl @@ -2192,15 +4150,31 @@ test_that("graph_center_dijkstra_impl errors", { test_that("radius_dijkstra_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(radius_dijkstra_impl(g)) - expect_snapshot(radius_dijkstra_impl(g, mode = "in")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(radius_dijkstra_impl( + graph = g + )) + expect_snapshot(radius_dijkstra_impl( + graph = g, + mode = "in" + )) + + # Structured tests + result <- radius_dijkstra_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("radius_dijkstra_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(radius_dijkstra_impl(NULL)) + expect_snapshot_igraph_error(radius_dijkstra_impl( + graph = NULL + )) }) # 153. pseudo_diameter_impl @@ -2208,20 +4182,36 @@ test_that("radius_dijkstra_impl errors", { test_that("pseudo_diameter_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(pseudo_diameter_impl(g, 1)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(pseudo_diameter_impl( + graph = g, + start.vid = 1 + )) expect_snapshot(pseudo_diameter_impl( - g, - 1, + graph = g, + start.vid = 1, directed = FALSE, unconnected = FALSE )) + + # Structured tests + result <- pseudo_diameter_impl( + graph = g, + start.vid = 1 + ) + expect_type(result, "list") }) test_that("pseudo_diameter_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(pseudo_diameter_impl(NULL, 1)) + expect_snapshot_igraph_error(pseudo_diameter_impl( + graph = NULL, + start.vid = 1 + )) }) # 154. pseudo_diameter_dijkstra_impl @@ -2229,21 +4219,37 @@ test_that("pseudo_diameter_impl errors", { test_that("pseudo_diameter_dijkstra_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(pseudo_diameter_dijkstra_impl(g, start.vid = 1)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(pseudo_diameter_dijkstra_impl( + graph = g, + start.vid = 1 + )) expect_snapshot(pseudo_diameter_dijkstra_impl( - g, + graph = g, start.vid = 1, directed = FALSE, unconnected = FALSE )) + + # Structured tests + result <- pseudo_diameter_dijkstra_impl( + graph = g, + start.vid = 1 + ) + expect_type(result, "list") }) test_that("pseudo_diameter_dijkstra_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - pseudo_diameter_dijkstra_impl(NULL, start.vid = 1) + pseudo_diameter_dijkstra_impl( + graph = NULL, + start.vid = 1 + ) ) }) @@ -2252,15 +4258,28 @@ test_that("pseudo_diameter_dijkstra_impl errors", { test_that("diversity_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) + g <- path_graph_impl( + n = 3 + ) + E(g)$weight <- c(1, 2) - expect_snapshot(diversity_impl(g)) + expect_snapshot(diversity_impl( + graph = g + )) + + # Structured tests + result <- diversity_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("diversity_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(diversity_impl(NULL)) + expect_snapshot_igraph_error(diversity_impl( + graph = NULL + )) }) # 156. random_walk_impl @@ -2268,15 +4287,40 @@ test_that("diversity_impl errors", { test_that("random_walk_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(random_walk_impl(g, 1, 2)) - expect_snapshot(random_walk_impl(g, 1, 2, mode = "in", stuck = "error")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(random_walk_impl( + graph = g, + start = 1, + steps = 2 + )) + expect_snapshot(random_walk_impl( + graph = g, + start = 1, + steps = 2, + mode = "in", + stuck = "error" + )) + + # Structured tests + result <- random_walk_impl( + graph = g, + start = 1, + steps = 2 + ) + expect_type(result, "list") }) test_that("random_walk_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(random_walk_impl(NULL, 1, 2)) + expect_snapshot_igraph_error(random_walk_impl( + graph = NULL, + start = 1, + steps = 2 + )) }) # 157. global_efficiency_impl @@ -2284,15 +4328,31 @@ test_that("random_walk_impl errors", { test_that("global_efficiency_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(global_efficiency_impl(g)) - expect_snapshot(global_efficiency_impl(g, directed = FALSE)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(global_efficiency_impl( + graph = g + )) + expect_snapshot(global_efficiency_impl( + graph = g, + directed = FALSE + )) + + # Structured tests + result <- global_efficiency_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("global_efficiency_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(global_efficiency_impl(NULL)) + expect_snapshot_igraph_error(global_efficiency_impl( + graph = NULL + )) }) # 158. local_efficiency_impl @@ -2300,15 +4360,32 @@ test_that("global_efficiency_impl errors", { test_that("local_efficiency_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(local_efficiency_impl(g)) - expect_snapshot(local_efficiency_impl(g, directed = FALSE, mode = "in")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(local_efficiency_impl( + graph = g + )) + expect_snapshot(local_efficiency_impl( + graph = g, + directed = FALSE, + mode = "in" + )) + + # Structured tests + result <- local_efficiency_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("local_efficiency_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(local_efficiency_impl(NULL)) + expect_snapshot_igraph_error(local_efficiency_impl( + graph = NULL + )) }) # 159. average_local_efficiency_impl @@ -2316,19 +4393,32 @@ test_that("local_efficiency_impl errors", { test_that("average_local_efficiency_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(average_local_efficiency_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(average_local_efficiency_impl( + graph = g + )) expect_snapshot(average_local_efficiency_impl( - g, + graph = g, directed = FALSE, mode = "in" )) + + # Structured tests + result <- average_local_efficiency_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("average_local_efficiency_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(average_local_efficiency_impl(NULL)) + expect_snapshot_igraph_error(average_local_efficiency_impl( + graph = NULL + )) }) # 160. transitive_closure_dag_impl @@ -2336,14 +4426,28 @@ test_that("average_local_efficiency_impl errors", { test_that("transitive_closure_dag_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3, directed = TRUE) - expect_snapshot(transitive_closure_dag_impl(g)) + g <- path_graph_impl( + n = 3, + directed = TRUE + ) + + expect_snapshot(transitive_closure_dag_impl( + graph = g + )) + + # Structured tests + result <- transitive_closure_dag_impl( + graph = g + ) + expect_s3_class(result, "igraph") }) test_that("transitive_closure_dag_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(transitive_closure_dag_impl(NULL)) + expect_snapshot_igraph_error(transitive_closure_dag_impl( + graph = NULL + )) }) # 161. transitive_closure_impl @@ -2351,14 +4455,27 @@ test_that("transitive_closure_dag_impl errors", { test_that("transitive_closure_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(transitive_closure_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(transitive_closure_impl( + graph = g + )) + + # Structured tests + result <- transitive_closure_impl( + graph = g + ) + expect_s3_class(result, "igraph") }) test_that("transitive_closure_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(transitive_closure_impl(NULL)) + expect_snapshot_igraph_error(transitive_closure_impl( + graph = NULL + )) }) # 162. trussness_impl @@ -2366,14 +4483,27 @@ test_that("transitive_closure_impl errors", { test_that("trussness_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(trussness_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(trussness_impl( + graph = g + )) + + # Structured tests + result <- trussness_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("trussness_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(trussness_impl(NULL)) + expect_snapshot_igraph_error(trussness_impl( + graph = NULL + )) }) # 163. is_graphical_impl @@ -2381,18 +4511,28 @@ test_that("trussness_impl errors", { test_that("is_graphical_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(is_graphical_impl(c(2, 2, 2))) expect_snapshot(is_graphical_impl( - c(2, 2, 2), - c(1, 1, 1), + out.deg = c(2, 2, 2) + )) + expect_snapshot(is_graphical_impl( + out.deg = c(2, 2, 2), + in.deg = c(1, 1, 1), allowed.edge.types = "all" )) + + # Structured tests + result <- is_graphical_impl( + out.deg = c(2, 2, 2) + ) + expect_type(result, "logical") }) test_that("is_graphical_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_graphical_impl("a")) + expect_snapshot_igraph_error(is_graphical_impl( + out.deg = "a" + )) }) # 164. bfs_simple_impl @@ -2400,15 +4540,35 @@ test_that("is_graphical_impl errors", { test_that("bfs_simple_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(bfs_simple_impl(g, 1)) - expect_snapshot(bfs_simple_impl(g, 1, mode = "in")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(bfs_simple_impl( + graph = g, + root = 1 + )) + expect_snapshot(bfs_simple_impl( + graph = g, + root = 1, + mode = "in" + )) + + # Structured tests + result <- bfs_simple_impl( + graph = g, + root = 1 + ) + expect_type(result, "list") }) test_that("bfs_simple_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(bfs_simple_impl(NULL, 1)) + expect_snapshot_igraph_error(bfs_simple_impl( + graph = NULL, + root = 1 + )) }) # 165. bipartite_projection_size_impl @@ -2416,15 +4576,28 @@ test_that("bfs_simple_impl errors", { test_that("bipartite_projection_size_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(4) + g <- path_graph_impl( + n = 4 + ) + V(g)$type <- c(TRUE, FALSE, TRUE, FALSE) - expect_snapshot(bipartite_projection_size_impl(g)) + expect_snapshot(bipartite_projection_size_impl( + graph = g + )) + + # Structured tests + result <- bipartite_projection_size_impl( + graph = g + ) + expect_type(result, "list") }) test_that("bipartite_projection_size_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(bipartite_projection_size_impl(NULL)) + expect_snapshot_igraph_error(bipartite_projection_size_impl( + graph = NULL + )) }) # 166. biadjacency_impl @@ -2433,19 +4606,29 @@ test_that("biadjacency_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) m <- matrix(c(1, 0, 1, 0, 1, 1), nrow = 2) - expect_snapshot(biadjacency_impl(m)) expect_snapshot(biadjacency_impl( - m, + incidence = m + )) + expect_snapshot(biadjacency_impl( + incidence = m, directed = TRUE, mode = "in", multiple = TRUE )) + + # Structured tests + result <- biadjacency_impl( + incidence = m + ) + expect_type(result, "list") }) test_that("biadjacency_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(biadjacency_impl("a")) + expect_snapshot_igraph_error(biadjacency_impl( + incidence = "a" + )) }) # 167. get_biadjacency_impl @@ -2453,15 +4636,31 @@ test_that("biadjacency_impl errors", { test_that("get_biadjacency_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(get_biadjacency_impl(g, c(TRUE, FALSE, TRUE))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(get_biadjacency_impl( + graph = g, + types = c(TRUE, FALSE, TRUE) + )) + + # Structured tests + result <- get_biadjacency_impl( + graph = g, + types = c(TRUE, FALSE, TRUE) + ) + expect_type(result, "list") }) test_that("get_biadjacency_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - get_biadjacency_impl(NULL, c(TRUE, FALSE, TRUE)) + get_biadjacency_impl( + graph = NULL, + types = c(TRUE, FALSE, TRUE) + ) ) }) @@ -2470,14 +4669,27 @@ test_that("get_biadjacency_impl errors", { test_that("is_bipartite_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_bipartite_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_bipartite_impl( + graph = g + )) + + # Structured tests + result <- is_bipartite_impl( + graph = g + ) + expect_type(result, "list") }) test_that("is_bipartite_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_bipartite_impl(NULL)) + expect_snapshot_igraph_error(is_bipartite_impl( + graph = NULL + )) }) # 169. bipartite_game_gnp_impl @@ -2485,20 +4697,36 @@ test_that("is_bipartite_impl errors", { test_that("bipartite_game_gnp_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(bipartite_game_gnp_impl(2, 2, 0.5)) expect_snapshot(bipartite_game_gnp_impl( - 2, - 2, - 0.5, + n1 = 2, + n2 = 2, + p = 0.5 + )) + expect_snapshot(bipartite_game_gnp_impl( + n1 = 2, + n2 = 2, + p = 0.5, directed = TRUE, mode = "in" )) + + # Structured tests + result <- bipartite_game_gnp_impl( + n1 = 2, + n2 = 2, + p = 0.5 + ) + expect_type(result, "list") }) test_that("bipartite_game_gnp_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(bipartite_game_gnp_impl(-1, 2, 0.5)) + expect_snapshot_igraph_error(bipartite_game_gnp_impl( + n1 = -1, + n2 = 2, + p = 0.5 + )) }) # 170. bipartite_game_gnm_impl @@ -2506,20 +4734,36 @@ test_that("bipartite_game_gnp_impl errors", { test_that("bipartite_game_gnm_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(bipartite_game_gnm_impl(2, 2, 1)) expect_snapshot(bipartite_game_gnm_impl( - 2, - 2, - 1, + n1 = 2, + n2 = 2, + m = 1 + )) + expect_snapshot(bipartite_game_gnm_impl( + n1 = 2, + n2 = 2, + m = 1, directed = TRUE, mode = "in" )) + + # Structured tests + result <- bipartite_game_gnm_impl( + n1 = 2, + n2 = 2, + m = 1 + ) + expect_type(result, "list") }) test_that("bipartite_game_gnm_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(bipartite_game_gnm_impl(-1, 2, 1)) + expect_snapshot_igraph_error(bipartite_game_gnm_impl( + n1 = -1, + n2 = 2, + m = 1 + )) }) # 171. get_laplacian_impl @@ -2527,20 +4771,33 @@ test_that("bipartite_game_gnm_impl errors", { test_that("get_laplacian_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(get_laplacian_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(get_laplacian_impl( + graph = g + )) expect_snapshot(get_laplacian_impl( - g, + graph = g, mode = "in", normalization = "symmetric", weights = c(1, 2) )) + + # Structured tests + result <- get_laplacian_impl( + graph = g + ) + expect_true(is.numeric(result) || is.matrix(result)) }) test_that("get_laplacian_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(get_laplacian_impl(NULL)) + expect_snapshot_igraph_error(get_laplacian_impl( + graph = NULL + )) }) # 172. get_laplacian_sparse_impl @@ -2548,20 +4805,33 @@ test_that("get_laplacian_impl errors", { test_that("get_laplacian_sparse_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(get_laplacian_sparse_impl(g)) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(get_laplacian_sparse_impl( - g, + graph = g + )) + expect_snapshot(get_laplacian_sparse_impl( + graph = g, mode = "in", normalization = "symmetric", weights = c(1, 2) )) + + # Structured tests + result <- get_laplacian_sparse_impl( + graph = g + ) + expect_s3_class(result, "igraph.tmp.sparse") }) test_that("get_laplacian_sparse_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(get_laplacian_sparse_impl(NULL)) + expect_snapshot_igraph_error(get_laplacian_sparse_impl( + graph = NULL + )) }) # 173. connected_components_impl @@ -2569,15 +4839,32 @@ test_that("get_laplacian_sparse_impl errors", { test_that("connected_components_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(connected_components_impl(g)) - expect_snapshot(connected_components_impl(g, mode = "strong", details = TRUE)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(connected_components_impl( + graph = g + )) + expect_snapshot(connected_components_impl( + graph = g, + mode = "strong", + details = TRUE + )) + + # Structured tests + result <- connected_components_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("connected_components_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(connected_components_impl(NULL)) + expect_snapshot_igraph_error(connected_components_impl( + graph = NULL + )) }) # 174. is_connected_impl @@ -2585,15 +4872,31 @@ test_that("connected_components_impl errors", { test_that("is_connected_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_connected_impl(g)) - expect_snapshot(is_connected_impl(g, mode = "strong")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_connected_impl( + graph = g + )) + expect_snapshot(is_connected_impl( + graph = g, + mode = "strong" + )) + + # Structured tests + result <- is_connected_impl( + graph = g + ) + expect_type(result, "logical") }) test_that("is_connected_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_connected_impl(NULL)) + expect_snapshot_igraph_error(is_connected_impl( + graph = NULL + )) }) # 175. articulation_points_impl @@ -2601,14 +4904,27 @@ test_that("is_connected_impl errors", { test_that("articulation_points_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(articulation_points_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(articulation_points_impl( + graph = g + )) + + # Structured tests + result <- articulation_points_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("articulation_points_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(articulation_points_impl(NULL)) + expect_snapshot_igraph_error(articulation_points_impl( + graph = NULL + )) }) # 176. biconnected_components_impl @@ -2616,14 +4932,27 @@ test_that("articulation_points_impl errors", { test_that("biconnected_components_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(biconnected_components_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(biconnected_components_impl( + graph = g + )) + + # Structured tests + result <- biconnected_components_impl( + graph = g + ) + expect_type(result, "list") }) test_that("biconnected_components_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(biconnected_components_impl(NULL)) + expect_snapshot_igraph_error(biconnected_components_impl( + graph = NULL + )) }) # 177. bridges_impl @@ -2631,14 +4960,27 @@ test_that("biconnected_components_impl errors", { test_that("bridges_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(bridges_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(bridges_impl( + graph = g + )) + + # Structured tests + result <- bridges_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("bridges_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(bridges_impl(NULL)) + expect_snapshot_igraph_error(bridges_impl( + graph = NULL + )) }) # 178. is_biconnected_impl @@ -2646,14 +4988,27 @@ test_that("bridges_impl errors", { test_that("is_biconnected_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_biconnected_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_biconnected_impl( + graph = g + )) + + # Structured tests + result <- is_biconnected_impl( + graph = g + ) + expect_type(result, "logical") }) test_that("is_biconnected_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_biconnected_impl(NULL)) + expect_snapshot_igraph_error(is_biconnected_impl( + graph = NULL + )) }) # 179. count_reachable_impl @@ -2661,15 +5016,34 @@ test_that("is_biconnected_impl errors", { test_that("count_reachable_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(5) - expect_snapshot(count_reachable_impl(g, mode = "out")) - expect_snapshot(count_reachable_impl(g, mode = "in")) + g <- path_graph_impl( + n = 5 + ) + + expect_snapshot(count_reachable_impl( + graph = g, + mode = "out" + )) + expect_snapshot(count_reachable_impl( + graph = g, + mode = "in" + )) + + # Structured tests + result <- count_reachable_impl( + graph = g, + mode = "out" + ) + expect_true(is.numeric(result)) }) test_that("count_reachable_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(count_reachable_impl(NULL, mode = "out")) + expect_snapshot_igraph_error(count_reachable_impl( + graph = NULL, + mode = "out" + )) }) # 180. bond_percolation_impl @@ -2677,14 +5051,27 @@ test_that("count_reachable_impl errors", { test_that("bond_percolation_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(bond_percolation_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(bond_percolation_impl( + graph = g + )) + + # Structured tests + result <- bond_percolation_impl( + graph = g + ) + expect_type(result, "list") }) test_that("bond_percolation_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(bond_percolation_impl(NULL)) + expect_snapshot_igraph_error(bond_percolation_impl( + graph = NULL + )) }) # 181. site_percolation_impl @@ -2692,14 +5079,27 @@ test_that("bond_percolation_impl errors", { test_that("site_percolation_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(site_percolation_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(site_percolation_impl( + graph = g + )) + + # Structured tests + result <- site_percolation_impl( + graph = g + ) + expect_type(result, "list") }) test_that("site_percolation_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(site_percolation_impl(NULL)) + expect_snapshot_igraph_error(site_percolation_impl( + graph = NULL + )) }) # 182. edgelist_percolation_impl @@ -2707,13 +5107,23 @@ test_that("site_percolation_impl errors", { test_that("edgelist_percolation_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(edgelist_percolation_impl(matrix(c(1, 2, 2, 3), ncol = 2))) + expect_snapshot(edgelist_percolation_impl( + edges = matrix(c(1, 2, 2, 3), ncol = 2) + )) + + # Structured tests + result <- edgelist_percolation_impl( + edges = matrix(c(1, 2, 2, 3), ncol = 2) + ) + expect_type(result, "list") }) test_that("edgelist_percolation_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(edgelist_percolation_impl("a")) + expect_snapshot_igraph_error(edgelist_percolation_impl( + edges = "a" + )) }) # 183. is_clique_impl @@ -2721,15 +5131,35 @@ test_that("edgelist_percolation_impl errors", { test_that("is_clique_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_clique_impl(g, 1:2)) - expect_snapshot(is_clique_impl(g, 1:2, directed = TRUE)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_clique_impl( + graph = g, + candidate = 1:2 + )) + expect_snapshot(is_clique_impl( + graph = g, + candidate = 1:2, + directed = TRUE + )) + + # Structured tests + result <- is_clique_impl( + graph = g, + candidate = 1:2 + ) + expect_type(result, "logical") }) test_that("is_clique_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_clique_impl(NULL, 1:2)) + expect_snapshot_igraph_error(is_clique_impl( + graph = NULL, + candidate = 1:2 + )) }) # 184. cliques_impl @@ -2737,15 +5167,32 @@ test_that("is_clique_impl errors", { test_that("cliques_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(cliques_impl(g)) - expect_snapshot(cliques_impl(g, min = 2, max = 2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(cliques_impl( + graph = g + )) + expect_snapshot(cliques_impl( + graph = g, + min = 2, + max = 2 + )) + + # Structured tests + result <- cliques_impl( + graph = g + ) + expect_type(result, "list") }) test_that("cliques_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(cliques_impl(NULL)) + expect_snapshot_igraph_error(cliques_impl( + graph = NULL + )) }) # 185. clique_size_hist_impl @@ -2753,15 +5200,32 @@ test_that("cliques_impl errors", { test_that("clique_size_hist_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(clique_size_hist_impl(g)) - expect_snapshot(clique_size_hist_impl(g, min.size = 2, max.size = 2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(clique_size_hist_impl( + graph = g + )) + expect_snapshot(clique_size_hist_impl( + graph = g, + min.size = 2, + max.size = 2 + )) + + # Structured tests + result <- clique_size_hist_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("clique_size_hist_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(clique_size_hist_impl(NULL)) + expect_snapshot_igraph_error(clique_size_hist_impl( + graph = NULL + )) }) # 186. largest_cliques_impl @@ -2769,14 +5233,27 @@ test_that("clique_size_hist_impl errors", { test_that("largest_cliques_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(largest_cliques_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(largest_cliques_impl( + graph = g + )) + + # Structured tests + result <- largest_cliques_impl( + graph = g + ) + expect_type(result, "list") }) test_that("largest_cliques_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(largest_cliques_impl(NULL)) + expect_snapshot_igraph_error(largest_cliques_impl( + graph = NULL + )) }) # 187. maximal_cliques_hist_impl @@ -2784,15 +5261,32 @@ test_that("largest_cliques_impl errors", { test_that("maximal_cliques_hist_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(maximal_cliques_hist_impl(g)) - expect_snapshot(maximal_cliques_hist_impl(g, min.size = 2, max.size = 2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(maximal_cliques_hist_impl( + graph = g + )) + expect_snapshot(maximal_cliques_hist_impl( + graph = g, + min.size = 2, + max.size = 2 + )) + + # Structured tests + result <- maximal_cliques_hist_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("maximal_cliques_hist_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(maximal_cliques_hist_impl(NULL)) + expect_snapshot_igraph_error(maximal_cliques_hist_impl( + graph = NULL + )) }) # 188. clique_number_impl @@ -2800,14 +5294,27 @@ test_that("maximal_cliques_hist_impl errors", { test_that("clique_number_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(clique_number_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(clique_number_impl( + graph = g + )) + + # Structured tests + result <- clique_number_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("clique_number_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(clique_number_impl(NULL)) + expect_snapshot_igraph_error(clique_number_impl( + graph = NULL + )) }) # 189. weighted_cliques_impl @@ -2815,21 +5322,34 @@ test_that("clique_number_impl errors", { test_that("weighted_cliques_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(weighted_cliques_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(weighted_cliques_impl( + graph = g + )) expect_snapshot(weighted_cliques_impl( - g, + graph = g, vertex.weights = c(1, 2, 3), min.weight = 1, max.weight = 3, maximal = TRUE )) + + # Structured tests + result <- weighted_cliques_impl( + graph = g + ) + expect_type(result, "list") }) test_that("weighted_cliques_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(weighted_cliques_impl(NULL)) + expect_snapshot_igraph_error(weighted_cliques_impl( + graph = NULL + )) }) # 190. largest_weighted_cliques_impl @@ -2837,15 +5357,31 @@ test_that("weighted_cliques_impl errors", { test_that("largest_weighted_cliques_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(largest_weighted_cliques_impl(g)) - expect_snapshot(largest_weighted_cliques_impl(g, vertex.weights = c(1, 2, 3))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(largest_weighted_cliques_impl( + graph = g + )) + expect_snapshot(largest_weighted_cliques_impl( + graph = g, + vertex.weights = c(1, 2, 3) + )) + + # Structured tests + result <- largest_weighted_cliques_impl( + graph = g + ) + expect_type(result, "list") }) test_that("largest_weighted_cliques_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(largest_weighted_cliques_impl(NULL)) + expect_snapshot_igraph_error(largest_weighted_cliques_impl( + graph = NULL + )) }) # 191. weighted_clique_number_impl @@ -2853,15 +5389,31 @@ test_that("largest_weighted_cliques_impl errors", { test_that("weighted_clique_number_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(weighted_clique_number_impl(g)) - expect_snapshot(weighted_clique_number_impl(g, vertex.weights = c(1, 2, 3))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(weighted_clique_number_impl( + graph = g + )) + expect_snapshot(weighted_clique_number_impl( + graph = g, + vertex.weights = c(1, 2, 3) + )) + + # Structured tests + result <- weighted_clique_number_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("weighted_clique_number_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(weighted_clique_number_impl(NULL)) + expect_snapshot_igraph_error(weighted_clique_number_impl( + graph = NULL + )) }) # 192. is_independent_vertex_set_impl @@ -2869,14 +5421,30 @@ test_that("weighted_clique_number_impl errors", { test_that("is_independent_vertex_set_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_independent_vertex_set_impl(g, 1:2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_independent_vertex_set_impl( + graph = g, + candidate = 1:2 + )) + + # Structured tests + result <- is_independent_vertex_set_impl( + graph = g, + candidate = 1:2 + ) + expect_type(result, "logical") }) test_that("is_independent_vertex_set_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_independent_vertex_set_impl(NULL, 1:2)) + expect_snapshot_igraph_error(is_independent_vertex_set_impl( + graph = NULL, + candidate = 1:2 + )) }) # 193. layout_random_impl @@ -2884,14 +5452,27 @@ test_that("is_independent_vertex_set_impl errors", { test_that("layout_random_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(layout_random_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(layout_random_impl( + graph = g + )) + + # Structured tests + result <- layout_random_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("layout_random_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(layout_random_impl(NULL)) + expect_snapshot_igraph_error(layout_random_impl( + graph = NULL + )) }) # 194. layout_circle_impl @@ -2899,15 +5480,31 @@ test_that("layout_random_impl errors", { test_that("layout_circle_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(layout_circle_impl(g)) - expect_snapshot(layout_circle_impl(g, order = 1:3)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(layout_circle_impl( + graph = g + )) + expect_snapshot(layout_circle_impl( + graph = g, + order = 1:3 + )) + + # Structured tests + result <- layout_circle_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("layout_circle_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(layout_circle_impl(NULL)) + expect_snapshot_igraph_error(layout_circle_impl( + graph = NULL + )) }) # 195. layout_star_impl @@ -2915,15 +5512,41 @@ test_that("layout_circle_impl errors", { test_that("layout_star_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(round(layout_star_impl(g), 4)) - expect_snapshot(round(layout_star_impl(g, center = 1, order = 3:1), 4)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(round( + layout_star_impl( + graph = g + ), + 4 + )) + expect_snapshot(round( + layout_star_impl( + graph = g, + center = 1, + order = 3:1 + ), + 4 + )) + + # Structured tests + result <- round( + layout_star_impl( + graph = g + ), + 4 + ) + expect_true(is.numeric(result)) }) test_that("layout_star_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(layout_star_impl(NULL)) + expect_snapshot_igraph_error(layout_star_impl( + graph = NULL + )) }) # 196. layout_grid_impl @@ -2931,15 +5554,31 @@ test_that("layout_star_impl errors", { test_that("layout_grid_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(layout_grid_impl(g)) - expect_snapshot(layout_grid_impl(g, width = 2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(layout_grid_impl( + graph = g + )) + expect_snapshot(layout_grid_impl( + graph = g, + width = 2 + )) + + # Structured tests + result <- layout_grid_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("layout_grid_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(layout_grid_impl(NULL)) + expect_snapshot_igraph_error(layout_grid_impl( + graph = NULL + )) }) # 197. layout_grid_3d_impl @@ -2947,15 +5586,32 @@ test_that("layout_grid_impl errors", { test_that("layout_grid_3d_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(layout_grid_3d_impl(g)) - expect_snapshot(layout_grid_3d_impl(g, width = 2, height = 2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(layout_grid_3d_impl( + graph = g + )) + expect_snapshot(layout_grid_3d_impl( + graph = g, + width = 2, + height = 2 + )) + + # Structured tests + result <- layout_grid_3d_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("layout_grid_3d_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(layout_grid_3d_impl(NULL)) + expect_snapshot_igraph_error(layout_grid_3d_impl( + graph = NULL + )) }) # 198. roots_for_tree_layout_impl @@ -2963,15 +5619,34 @@ test_that("layout_grid_3d_impl errors", { test_that("roots_for_tree_layout_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(roots_for_tree_layout_impl(g, mode = "out", heuristic = 1)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(roots_for_tree_layout_impl( + graph = g, + mode = "out", + heuristic = 1 + )) + + # Structured tests + result <- roots_for_tree_layout_impl( + graph = g, + mode = "out", + heuristic = 1 + ) + expect_s3_class(result, "igraph.vs") }) test_that("roots_for_tree_layout_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - roots_for_tree_layout_impl(NULL, mode = "out", heuristic = 1) + roots_for_tree_layout_impl( + graph = NULL, + mode = "out", + heuristic = 1 + ) ) }) @@ -2980,14 +5655,27 @@ test_that("roots_for_tree_layout_impl errors", { test_that("layout_random_3d_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(layout_random_3d_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(layout_random_3d_impl( + graph = g + )) + + # Structured tests + result <- layout_random_3d_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("layout_random_3d_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(layout_random_3d_impl(NULL)) + expect_snapshot_igraph_error(layout_random_3d_impl( + graph = NULL + )) }) # 200. layout_sphere_impl @@ -2995,14 +5683,27 @@ test_that("layout_random_3d_impl errors", { test_that("layout_sphere_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(layout_sphere_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(layout_sphere_impl( + graph = g + )) + + # Structured tests + result <- layout_sphere_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("layout_sphere_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(layout_sphere_impl(NULL)) + expect_snapshot_igraph_error(layout_sphere_impl( + graph = NULL + )) }) # 201. layout_sugiyama_impl @@ -3010,22 +5711,35 @@ test_that("layout_sphere_impl errors", { test_that("layout_sugiyama_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(layout_sugiyama_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(layout_sugiyama_impl( + graph = g + )) expect_snapshot(layout_sugiyama_impl( - g, + graph = g, layers = 1:3, hgap = 2, vgap = 2, maxiter = 10, weights = c(1, 2) )) + + # Structured tests + result <- layout_sugiyama_impl( + graph = g + ) + expect_type(result, "list") }) test_that("layout_sugiyama_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(layout_sugiyama_impl(NULL)) + expect_snapshot_igraph_error(layout_sugiyama_impl( + graph = NULL + )) }) # 202. layout_mds_impl @@ -3033,15 +5747,32 @@ test_that("layout_sugiyama_impl errors", { test_that("layout_mds_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(layout_mds_impl(g)) - expect_snapshot(layout_mds_impl(g, dist = matrix(1:9, nrow = 3), dim = 3)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(layout_mds_impl( + graph = g + )) + expect_snapshot(layout_mds_impl( + graph = g, + dist = matrix(1:9, nrow = 3), + dim = 3 + )) + + # Structured tests + result <- layout_mds_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("layout_mds_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(layout_mds_impl(NULL)) + expect_snapshot_igraph_error(layout_mds_impl( + graph = NULL + )) }) # 203. layout_bipartite_impl @@ -3049,22 +5780,38 @@ test_that("layout_mds_impl errors", { test_that("layout_bipartite_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(layout_bipartite_impl(g, types = c(TRUE, FALSE, TRUE))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(layout_bipartite_impl( + graph = g, + types = c(TRUE, FALSE, TRUE) + )) expect_snapshot(layout_bipartite_impl( - g, + graph = g, types = c(TRUE, FALSE, TRUE), hgap = 2, vgap = 2, maxiter = 10 )) + + # Structured tests + result <- layout_bipartite_impl( + graph = g, + types = c(TRUE, FALSE, TRUE) + ) + expect_true(is.numeric(result)) }) test_that("layout_bipartite_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - layout_bipartite_impl(NULL, types = c(TRUE, FALSE, TRUE)) + layout_bipartite_impl( + graph = NULL, + types = c(TRUE, FALSE, TRUE) + ) ) }) @@ -3073,10 +5820,16 @@ test_that("layout_bipartite_impl errors", { test_that("layout_gem_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(layout_gem_impl(g, res = matrix(0, nrow = 3, ncol = 2))) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(layout_gem_impl( - g, + graph = g, + res = matrix(0, nrow = 3, ncol = 2) + )) + expect_snapshot(layout_gem_impl( + graph = g, res = matrix(0, nrow = 3, ncol = 2), use.seed = TRUE, maxiter = 10, @@ -3084,13 +5837,23 @@ test_that("layout_gem_impl basic", { temp.min = 0.1, temp.init = 1 )) + + # Structured tests + result <- layout_gem_impl( + graph = g, + res = matrix(0, nrow = 3, ncol = 2) + ) + expect_true(is.numeric(result)) }) test_that("layout_gem_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - layout_gem_impl(NULL, res = matrix(0, nrow = 3, ncol = 2)) + layout_gem_impl( + graph = NULL, + res = matrix(0, nrow = 3, ncol = 2) + ) ) }) @@ -3099,13 +5862,16 @@ test_that("layout_gem_impl errors", { test_that("layout_davidson_harel_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(layout_davidson_harel_impl( - g, + graph = g, res = matrix(0, nrow = 3, ncol = 2) )) expect_snapshot(layout_davidson_harel_impl( - g, + graph = g, res = matrix(0, nrow = 3, ncol = 2), use.seed = TRUE, maxiter = 10, @@ -3117,13 +5883,23 @@ test_that("layout_davidson_harel_impl basic", { weight.edge.crossings = 0.2, weight.node.edge.dist = 0.3 )) + + # Structured tests + result <- layout_davidson_harel_impl( + graph = g, + res = matrix(0, nrow = 3, ncol = 2) + ) + expect_true(is.numeric(result)) }) test_that("layout_davidson_harel_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - layout_davidson_harel_impl(NULL, res = matrix(0, nrow = 3, ncol = 2)) + layout_davidson_harel_impl( + graph = NULL, + res = matrix(0, nrow = 3, ncol = 2) + ) ) }) @@ -3132,14 +5908,17 @@ test_that("layout_davidson_harel_impl errors", { test_that("layout_umap_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(layout_umap_impl( - g, + graph = g, res = matrix(0, nrow = 3, ncol = 2), use.seed = TRUE )) expect_snapshot(layout_umap_impl( - g, + graph = g, res = matrix(0, nrow = 3, ncol = 2), use.seed = TRUE, distances = 1:3, @@ -3147,13 +5926,24 @@ test_that("layout_umap_impl basic", { epochs = 10, distances.are.weights = TRUE )) + + # Structured tests + result <- layout_umap_impl( + graph = g, + res = matrix(0, nrow = 3, ncol = 2), + use.seed = TRUE + ) + expect_true(is.numeric(result)) }) test_that("layout_umap_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - layout_umap_impl(NULL, res = matrix(0, nrow = 3, ncol = 2)) + layout_umap_impl( + graph = NULL, + res = matrix(0, nrow = 3, ncol = 2) + ) ) }) @@ -3162,14 +5952,17 @@ test_that("layout_umap_impl errors", { test_that("layout_umap_3d_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(layout_umap_3d_impl( - g, + graph = g, res = matrix(0, nrow = 3, ncol = 3), - use.see = TRUE + use.seed = TRUE )) expect_snapshot(layout_umap_3d_impl( - g, + graph = g, res = matrix(0, nrow = 3, ncol = 3), use.seed = TRUE, distances = 1:3, @@ -3177,13 +5970,24 @@ test_that("layout_umap_3d_impl basic", { epochs = 10, distances.are.weights = TRUE )) + + # Structured tests + result <- layout_umap_3d_impl( + graph = g, + res = matrix(0, nrow = 3, ncol = 3), + use.seed = TRUE + ) + expect_true(is.numeric(result)) }) test_that("layout_umap_3d_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - layout_umap_3d_impl(NULL, res = matrix(0, nrow = 3, ncol = 3)) + layout_umap_3d_impl( + graph = NULL, + res = matrix(0, nrow = 3, ncol = 3) + ) ) }) @@ -3192,19 +5996,34 @@ test_that("layout_umap_3d_impl errors", { test_that("layout_umap_compute_weights_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(layout_umap_compute_weights_impl( - g, + graph = g, distances = 1:2, weights = 1:3 )) + + # Structured tests + result <- layout_umap_compute_weights_impl( + graph = g, + distances = 1:2, + weights = 1:3 + ) + expect_true(is.numeric(result)) }) test_that("layout_umap_compute_weights_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - layout_umap_compute_weights_impl(NULL, distances = 1:3, weights = 1:3) + layout_umap_compute_weights_impl( + graph = NULL, + distances = 1:3, + weights = 1:3 + ) ) }) @@ -3213,15 +6032,31 @@ test_that("layout_umap_compute_weights_impl errors", { test_that("layout_align_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(layout_align_impl(g, layout = matrix(0, nrow = 3, ncol = 2))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(layout_align_impl( + graph = g, + layout = matrix(0, nrow = 3, ncol = 2) + )) + + # Structured tests + result <- layout_align_impl( + graph = g, + layout = matrix(0, nrow = 3, ncol = 2) + ) + expect_true(is.numeric(result)) }) test_that("layout_align_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - layout_align_impl(NULL, layout = matrix(0, nrow = 3, ncol = 2)) + layout_align_impl( + graph = NULL, + layout = matrix(0, nrow = 3, ncol = 2) + ) ) }) @@ -3230,20 +6065,33 @@ test_that("layout_align_impl errors", { test_that("similarity_dice_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(similarity_dice_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(similarity_dice_impl( + graph = g + )) expect_snapshot(similarity_dice_impl( - g, + graph = g, vids = 1:2, mode = "in", loops = TRUE )) + + # Structured tests + result <- similarity_dice_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("similarity_dice_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(similarity_dice_impl(NULL)) + expect_snapshot_igraph_error(similarity_dice_impl( + graph = NULL + )) }) # 211. similarity_dice_es_impl @@ -3251,20 +6099,33 @@ test_that("similarity_dice_impl errors", { test_that("similarity_dice_es_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(similarity_dice_es_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(similarity_dice_es_impl( + graph = g + )) expect_snapshot(similarity_dice_es_impl( - g, + graph = g, es = 1:2, mode = "in", loops = TRUE )) + + # Structured tests + result <- similarity_dice_es_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("similarity_dice_es_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(similarity_dice_es_impl(NULL)) + expect_snapshot_igraph_error(similarity_dice_es_impl( + graph = NULL + )) }) # 212. similarity_dice_pairs_impl @@ -3272,24 +6133,37 @@ test_that("similarity_dice_es_impl errors", { test_that("similarity_dice_pairs_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(4) + g <- path_graph_impl( + n = 4 + ) + expect_snapshot(similarity_dice_pairs_impl( - g, + graph = g, pairs = matrix(c(1, 2, 2, 3), ncol = 2) )) expect_snapshot(similarity_dice_pairs_impl( - g, + graph = g, pairs = matrix(c(1, 2, 2, 3), ncol = 2), mode = "in", loops = TRUE )) + + # Structured tests + result <- similarity_dice_pairs_impl( + graph = g, + pairs = matrix(c(1, 2, 2, 3), ncol = 2) + ) + expect_true(is.numeric(result)) }) test_that("similarity_dice_pairs_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - similarity_dice_pairs_impl(NULL, pairs = matrix(c(1, 2, 2, 3), ncol = 2)) + similarity_dice_pairs_impl( + graph = NULL, + pairs = matrix(c(1, 2, 2, 3), ncol = 2) + ) ) }) @@ -3298,19 +6172,32 @@ test_that("similarity_dice_pairs_impl errors", { test_that("similarity_inverse_log_weighted_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(similarity_inverse_log_weighted_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(similarity_inverse_log_weighted_impl( + graph = g + )) expect_snapshot(similarity_inverse_log_weighted_impl( - g, + graph = g, vids = 1:2, mode = "in" )) + + # Structured tests + result <- similarity_inverse_log_weighted_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("similarity_inverse_log_weighted_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(similarity_inverse_log_weighted_impl(NULL)) + expect_snapshot_igraph_error(similarity_inverse_log_weighted_impl( + graph = NULL + )) }) # 214. similarity_jaccard_impl @@ -3318,20 +6205,33 @@ test_that("similarity_inverse_log_weighted_impl errors", { test_that("similarity_jaccard_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(similarity_jaccard_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(similarity_jaccard_impl( + graph = g + )) expect_snapshot(similarity_jaccard_impl( - g, + graph = g, vids = 1:2, mode = "in", loops = TRUE )) + + # Structured tests + result <- similarity_jaccard_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("similarity_jaccard_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(similarity_jaccard_impl(NULL)) + expect_snapshot_igraph_error(similarity_jaccard_impl( + graph = NULL + )) }) # 215. similarity_jaccard_es_impl @@ -3339,20 +6239,33 @@ test_that("similarity_jaccard_impl errors", { test_that("similarity_jaccard_es_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(similarity_jaccard_es_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(similarity_jaccard_es_impl( + graph = g + )) expect_snapshot(similarity_jaccard_es_impl( - g, + graph = g, es = 1:2, mode = "in", loops = TRUE )) + + # Structured tests + result <- similarity_jaccard_es_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("similarity_jaccard_es_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(similarity_jaccard_es_impl(NULL)) + expect_snapshot_igraph_error(similarity_jaccard_es_impl( + graph = NULL + )) }) # 216. similarity_jaccard_pairs_impl @@ -3360,24 +6273,37 @@ test_that("similarity_jaccard_es_impl errors", { test_that("similarity_jaccard_pairs_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(4) + g <- path_graph_impl( + n = 4 + ) + expect_snapshot(similarity_jaccard_pairs_impl( - g, + graph = g, pairs = matrix(c(1, 2, 2, 3), ncol = 2) )) expect_snapshot(similarity_jaccard_pairs_impl( - g, + graph = g, pairs = matrix(c(1, 2, 2, 3), ncol = 2), mode = "in", loops = TRUE )) + + # Structured tests + result <- similarity_jaccard_pairs_impl( + graph = g, + pairs = matrix(c(1, 2, 2, 3), ncol = 2) + ) + expect_true(is.numeric(result)) }) test_that("similarity_jaccard_pairs_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - similarity_jaccard_pairs_impl(NULL, pairs = matrix(c(1, 2, 2, 3), ncol = 2)) + similarity_jaccard_pairs_impl( + graph = NULL, + pairs = matrix(c(1, 2, 2, 3), ncol = 2) + ) ) }) @@ -3386,18 +6312,31 @@ test_that("similarity_jaccard_pairs_impl errors", { test_that("compare_communities_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(compare_communities_impl(c(1, 2, 1), c(2, 1, 2))) expect_snapshot(compare_communities_impl( - c(1, 2, 1), - c(2, 1, 2), + comm1 = c(1, 2, 1), + comm2 = c(2, 1, 2) + )) + expect_snapshot(compare_communities_impl( + comm1 = c(1, 2, 1), + comm2 = c(2, 1, 2), method = "nmi" )) + + # Structured tests + result <- compare_communities_impl( + comm1 = c(1, 2, 1), + comm2 = c(2, 1, 2) + ) + expect_true(is.numeric(result)) }) test_that("compare_communities_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(compare_communities_impl("a", c(2, 1, 2))) + expect_snapshot_igraph_error(compare_communities_impl( + comm1 = "a", + comm2 = c(2, 1, 2) + )) }) # 218. modularity_impl @@ -3405,21 +6344,37 @@ test_that("compare_communities_impl errors", { test_that("modularity_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(modularity_impl(g, membership = c(1, 2, 1))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(modularity_impl( + graph = g, + membership = c(1, 2, 1) + )) expect_snapshot(modularity_impl( - g, + graph = g, membership = c(1, 2, 1), weights = c(1, 2), resolution = 0.5, directed = FALSE )) + + # Structured tests + result <- modularity_impl( + graph = g, + membership = c(1, 2, 1) + ) + expect_true(is.numeric(result)) }) test_that("modularity_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(modularity_impl(NULL, membership = c(1, 2, 1))) + expect_snapshot_igraph_error(modularity_impl( + graph = NULL, + membership = c(1, 2, 1) + )) }) # 219. modularity_matrix_impl @@ -3427,20 +6382,33 @@ test_that("modularity_impl errors", { test_that("modularity_matrix_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(modularity_matrix_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(modularity_matrix_impl( + graph = g + )) expect_snapshot(modularity_matrix_impl( - g, + graph = g, weights = c(1, 2), resolution = 0.5, directed = FALSE )) + + # Structured tests + result <- modularity_matrix_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("modularity_matrix_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(modularity_matrix_impl(NULL)) + expect_snapshot_igraph_error(modularity_matrix_impl( + graph = NULL + )) }) # 220. community_fluid_communities_impl @@ -3448,15 +6416,31 @@ test_that("modularity_matrix_impl errors", { test_that("community_fluid_communities_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(community_fluid_communities_impl(g, no.of.communities = 2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(community_fluid_communities_impl( + graph = g, + no.of.communities = 2 + )) + + # Structured tests + result <- community_fluid_communities_impl( + graph = g, + no.of.communities = 2 + ) + expect_true(is.numeric(result)) }) test_that("community_fluid_communities_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - community_fluid_communities_impl(NULL, no.of.communities = 2) + community_fluid_communities_impl( + graph = NULL, + no.of.communities = 2 + ) ) }) @@ -3465,21 +6449,34 @@ test_that("community_fluid_communities_impl errors", { test_that("community_label_propagation_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(community_label_propagation_impl(g)) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(community_label_propagation_impl( - g, - mode = "in", + graph = g + )) + expect_snapshot(community_label_propagation_impl( + graph = g, + mode = "in", weights = c(1, 2), initial = 1:3, fixed = c(TRUE, FALSE, TRUE) )) + + # Structured tests + result <- community_label_propagation_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("community_label_propagation_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(community_label_propagation_impl(NULL)) + expect_snapshot_igraph_error(community_label_propagation_impl( + graph = NULL + )) }) # 222. community_multilevel_impl @@ -3487,19 +6484,32 @@ test_that("community_label_propagation_impl errors", { test_that("community_multilevel_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(community_multilevel_impl(g)) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(community_multilevel_impl( - g, + graph = g + )) + expect_snapshot(community_multilevel_impl( + graph = g, weights = c(1, 2), resolution = 0.5 )) + + # Structured tests + result <- community_multilevel_impl( + graph = g + ) + expect_type(result, "list") }) test_that("community_multilevel_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(community_multilevel_impl(NULL)) + expect_snapshot_igraph_error(community_multilevel_impl( + graph = NULL + )) }) # 223. community_optimal_modularity_impl @@ -3507,15 +6517,31 @@ test_that("community_multilevel_impl errors", { test_that("community_optimal_modularity_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(community_optimal_modularity_impl(g)) - expect_snapshot(community_optimal_modularity_impl(g, weights = c(1, 2))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(community_optimal_modularity_impl( + graph = g + )) + expect_snapshot(community_optimal_modularity_impl( + graph = g, + weights = c(1, 2) + )) + + # Structured tests + result <- community_optimal_modularity_impl( + graph = g + ) + expect_type(result, "list") }) test_that("community_optimal_modularity_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(community_optimal_modularity_impl(NULL)) + expect_snapshot_igraph_error(community_optimal_modularity_impl( + graph = NULL + )) }) # 224. community_leiden_impl @@ -3523,9 +6549,12 @@ test_that("community_optimal_modularity_impl errors", { test_that("community_leiden_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(community_leiden_impl( - g, + graph = g, weights = c(1, 2), vertex.weights = c(1, 2, 3), resolution = 0.5, @@ -3534,12 +6563,28 @@ test_that("community_leiden_impl basic", { n.iterations = 1, membership = 1:3 )) + + # Structured tests + result <- community_leiden_impl( + graph = g, + weights = c(1, 2), + vertex.weights = c(1, 2, 3), + resolution = 0.5, + beta = 0.1, + start = TRUE, + n.iterations = 1, + membership = 1:3 + ) + expect_type(result, "list") }) test_that("community_leiden_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(community_leiden_impl(NULL, resolution = 1)) + expect_snapshot_igraph_error(community_leiden_impl( + graph = NULL, + resolution = 1 + )) }) # 225. split_join_distance_impl @@ -3547,13 +6592,26 @@ test_that("community_leiden_impl errors", { test_that("split_join_distance_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(split_join_distance_impl(c(1, 2, 1), c(2, 1, 2))) + expect_snapshot(split_join_distance_impl( + comm1 = c(1, 2, 1), + comm2 = c(2, 1, 2) + )) + + # Structured tests + result <- split_join_distance_impl( + comm1 = c(1, 2, 1), + comm2 = c(2, 1, 2) + ) + expect_type(result, "list") }) test_that("split_join_distance_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(split_join_distance_impl("a", c(2, 1, 2))) + expect_snapshot_igraph_error(split_join_distance_impl( + comm1 = "a", + comm2 = c(2, 1, 2) + )) }) # 226. community_infomap_impl @@ -3561,20 +6619,33 @@ test_that("split_join_distance_impl errors", { test_that("community_infomap_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(community_infomap_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(community_infomap_impl( + graph = g + )) expect_snapshot(community_infomap_impl( - g, + graph = g, e.weights = c(1, 2), v.weights = c(1, 2, 3), nb.trials = 2 )) + + # Structured tests + result <- community_infomap_impl( + graph = g + ) + expect_type(result, "list") }) test_that("community_infomap_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(community_infomap_impl(NULL)) + expect_snapshot_igraph_error(community_infomap_impl( + graph = NULL + )) }) # 227. graphlets_impl @@ -3582,16 +6653,33 @@ test_that("community_infomap_impl errors", { test_that("graphlets_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) + g <- path_graph_impl( + n = 3 + ) + E(g)$weight <- 1:2 - expect_snapshot(graphlets_impl(g)) - expect_snapshot(graphlets_impl(g, weights = c(3, 4), niter = 10)) + expect_snapshot(graphlets_impl( + graph = g + )) + expect_snapshot(graphlets_impl( + graph = g, + weights = c(3, 4), + niter = 10 + )) + + # Structured tests + result <- graphlets_impl( + graph = g + ) + expect_type(result, "list") }) test_that("graphlets_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(graphlets_impl(NULL)) + expect_snapshot_igraph_error(graphlets_impl( + graph = NULL + )) }) # 228. hrg_fit_impl @@ -3599,14 +6687,27 @@ test_that("graphlets_impl errors", { test_that("hrg_fit_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g1 <- path_graph_impl(3) - expect_snapshot(hrg_fit_impl(g1)) + g1 <- path_graph_impl( + n = 3 + ) + + expect_snapshot(hrg_fit_impl( + graph = g1 + )) + + # Structured tests + result <- hrg_fit_impl( + graph = g1 + ) + expect_type(result, "list") }) test_that("hrg_fit_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(hrg_fit_impl(NULL)) + expect_snapshot_igraph_error(hrg_fit_impl( + graph = NULL + )) }) # 229. hrg_sample_impl @@ -3617,14 +6718,24 @@ test_that("hrg_sample_impl basic", { local_igraph_options(print.id = FALSE) g <- make_full_graph(10) hrg_model <- fit_hrg(g, hrg = NULL, start = FALSE, steps = 0) - expect_snapshot(hrg_sample_impl(hrg_model)) + expect_snapshot(hrg_sample_impl( + hrg = hrg_model + )) + + # Structured tests + result <- hrg_sample_impl( + hrg = hrg_model + ) + expect_type(result, "list") }) test_that("hrg_sample_impl errors", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(hrg_sample_impl(NULL)) + expect_snapshot_igraph_error(hrg_sample_impl( + hrg = NULL + )) }) # 230. hrg_sample_many_impl @@ -3635,14 +6746,27 @@ test_that("hrg_sample_many_impl basic", { local_igraph_options(print.id = FALSE) g <- make_full_graph(10) hrg_model <- fit_hrg(g, hrg = NULL, start = FALSE, steps = 0) - expect_snapshot(hrg_sample_many_impl(hrg_model, num.samples = 2)) + expect_snapshot(hrg_sample_many_impl( + hrg = hrg_model, + num.samples = 2 + )) + + # Structured tests + result <- hrg_sample_many_impl( + hrg = hrg_model, + num.samples = 2 + ) + expect_type(result, "list") }) test_that("hrg_sample_many_impl errors", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(hrg_sample_many_impl(NULL, num.samples = 2)) + expect_snapshot_igraph_error(hrg_sample_many_impl( + hrg = NULL, + num.samples = 2 + )) }) # 231. hrg_game_impl @@ -3653,14 +6777,24 @@ test_that("hrg_game_impl basic", { local_igraph_options(print.id = FALSE) g <- make_full_graph(10) hrg_model <- fit_hrg(g, hrg = NULL, start = FALSE, steps = 0) - expect_snapshot(hrg_game_impl(hrg_model)) + expect_snapshot(hrg_game_impl( + hrg = hrg_model + )) + + # Structured tests + result <- hrg_game_impl( + hrg = hrg_model + ) + expect_s3_class(result, "igraph") }) test_that("hrg_game_impl errors", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(hrg_game_impl(NULL)) + expect_snapshot_igraph_error(hrg_game_impl( + hrg = NULL + )) }) # 232. hrg_consensus_impl @@ -3677,7 +6811,9 @@ test_that("hrg_game_impl errors", { test_that("hrg_consensus_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(hrg_consensus_impl(NULL)) + expect_snapshot_igraph_error(hrg_consensus_impl( + graph = NULL + )) }) # 233. hrg_predict_impl @@ -3694,7 +6830,9 @@ test_that("hrg_consensus_impl errors", { test_that("hrg_predict_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(hrg_predict_impl(NULL)) + expect_snapshot_igraph_error(hrg_predict_impl( + graph = NULL + )) }) # 234. hrg_create_impl @@ -3703,14 +6841,27 @@ test_that("hrg_create_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) g <- make_tree(5) - expect_snapshot(hrg_create_impl(g, prob = rep(0.5, 2))) + expect_snapshot(hrg_create_impl( + graph = g, + prob = rep(0.5, 2) + )) + + # Structured tests + result <- hrg_create_impl( + graph = g, + prob = rep(0.5, 2) + ) + expect_type(result, "list") }) test_that("hrg_create_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) g <- make_full_graph(4, directed = TRUE) - expect_snapshot_igraph_error(hrg_create_impl(g, prob = 0.5)) + expect_snapshot_igraph_error(hrg_create_impl( + graph = g, + prob = 0.5 + )) }) # 235. hrg_resize_impl @@ -3721,14 +6872,27 @@ test_that("hrg_resize_impl basic", { local_igraph_options(print.id = FALSE) g <- make_full_graph(10) hrg_model <- fit_hrg(g, hrg = NULL, start = FALSE, steps = 0) - expect_snapshot(hrg_resize_impl(hrg_model, newsize = 5)) + expect_snapshot(hrg_resize_impl( + hrg = hrg_model, + newsize = 5 + )) + + # Structured tests + result <- hrg_resize_impl( + hrg = hrg_model, + newsize = 5 + ) + expect_type(result, "list") }) test_that("hrg_resize_impl errors", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(hrg_resize_impl(-1, newsize = 2)) + expect_snapshot_igraph_error(hrg_resize_impl( + hrg = -1, + newsize = 2 + )) }) # 236. hrg_size_impl @@ -3739,14 +6903,24 @@ test_that("hrg_size_impl basic", { local_igraph_options(print.id = FALSE) g <- make_full_graph(10) hrg_model <- fit_hrg(g, hrg = NULL, start = FALSE, steps = 0) - expect_snapshot(hrg_size_impl(hrg_model)) + expect_snapshot(hrg_size_impl( + hrg = hrg_model + )) + + # Structured tests + result <- hrg_size_impl( + hrg = hrg_model + ) + expect_true(is.numeric(result)) }) test_that("hrg_size_impl errors", { skip_if(Sys.getenv("R_SANITIZER") == "true") withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(hrg_size_impl(-1)) + expect_snapshot_igraph_error(hrg_size_impl( + hrg = -1 + )) }) # 237. from_hrg_dendrogram_impl @@ -3756,13 +6930,23 @@ test_that("from_hrg_dendrogram_impl basic", { local_igraph_options(print.id = FALSE) g <- make_full_graph(10) hrg_model <- fit_hrg(g, hrg = NULL, start = FALSE, steps = 0) - expect_snapshot(from_hrg_dendrogram_impl(hrg_model)) + expect_snapshot(from_hrg_dendrogram_impl( + hrg = hrg_model + )) + + # Structured tests + result <- from_hrg_dendrogram_impl( + hrg = hrg_model + ) + expect_type(result, "list") }) test_that("from_hrg_dendrogram_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(from_hrg_dendrogram_impl(-1)) + expect_snapshot_igraph_error(from_hrg_dendrogram_impl( + hrg = -1 + )) }) # 238. get_adjacency_sparse_impl @@ -3770,20 +6954,33 @@ test_that("from_hrg_dendrogram_impl errors", { test_that("get_adjacency_sparse_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(get_adjacency_sparse_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(get_adjacency_sparse_impl( + graph = g + )) expect_snapshot(get_adjacency_sparse_impl( - g, + graph = g, type = "upper", weights = c(1, 2), loops = "none" )) + + # Structured tests + result <- get_adjacency_sparse_impl( + graph = g + ) + expect_s3_class(result, "igraph.tmp.sparse") }) test_that("get_adjacency_sparse_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(get_adjacency_sparse_impl(NULL)) + expect_snapshot_igraph_error(get_adjacency_sparse_impl( + graph = NULL + )) }) # 239. get_stochastic_impl @@ -3791,15 +6988,32 @@ test_that("get_adjacency_sparse_impl errors", { test_that("get_stochastic_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(get_stochastic_impl(g)) - expect_snapshot(get_stochastic_impl(g, column.wise = TRUE, weights = c(1, 2))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(get_stochastic_impl( + graph = g + )) + expect_snapshot(get_stochastic_impl( + graph = g, + column.wise = TRUE, + weights = c(1, 2) + )) + + # Structured tests + result <- get_stochastic_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("get_stochastic_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(get_stochastic_impl(NULL)) + expect_snapshot_igraph_error(get_stochastic_impl( + graph = NULL + )) }) # 240. get_stochastic_sparse_impl @@ -3807,19 +7021,32 @@ test_that("get_stochastic_impl errors", { test_that("get_stochastic_sparse_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(get_stochastic_sparse_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(get_stochastic_sparse_impl( + graph = g + )) expect_snapshot(get_stochastic_sparse_impl( - g, + graph = g, column.wise = TRUE, weights = c(1, 2) )) + + # Structured tests + result <- get_stochastic_sparse_impl( + graph = g + ) + expect_s3_class(result, "igraph.tmp.sparse") }) test_that("get_stochastic_sparse_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(get_stochastic_sparse_impl(NULL)) + expect_snapshot_igraph_error(get_stochastic_sparse_impl( + graph = NULL + )) }) # 241. to_directed_impl @@ -3827,15 +7054,31 @@ test_that("get_stochastic_sparse_impl errors", { test_that("to_directed_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(to_directed_impl(g)) - expect_snapshot(to_directed_impl(g, mode = "acyclic")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(to_directed_impl( + graph = g + )) + expect_snapshot(to_directed_impl( + graph = g, + mode = "acyclic" + )) + + # Structured tests + result <- to_directed_impl( + graph = g + ) + expect_s3_class(result, "igraph") }) test_that("to_directed_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(to_directed_impl(NULL)) + expect_snapshot_igraph_error(to_directed_impl( + graph = NULL + )) }) # 242. to_undirected_impl @@ -3843,19 +7086,32 @@ test_that("to_directed_impl errors", { test_that("to_undirected_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(to_undirected_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(to_undirected_impl( + graph = g + )) expect_snapshot(to_undirected_impl( - g, + graph = g, mode = "mutual", edge.attr.comb = "sum" )) + + # Structured tests + result <- to_undirected_impl( + graph = g + ) + expect_s3_class(result, "igraph") }) test_that("to_undirected_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(to_undirected_impl(NULL)) + expect_snapshot_igraph_error(to_undirected_impl( + graph = NULL + )) }) # 243. motifs_randesu_impl @@ -3863,15 +7119,32 @@ test_that("to_undirected_impl errors", { test_that("motifs_randesu_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(motifs_randesu_impl(g)) - expect_snapshot(motifs_randesu_impl(g, size = 4, cut.prob = rep(0.1, 4))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(motifs_randesu_impl( + graph = g + )) + expect_snapshot(motifs_randesu_impl( + graph = g, + size = 4, + cut.prob = rep(0.1, 4) + )) + + # Structured tests + result <- motifs_randesu_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("motifs_randesu_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(motifs_randesu_impl(NULL)) + expect_snapshot_igraph_error(motifs_randesu_impl( + graph = NULL + )) }) # 244. motifs_randesu_estimate_impl @@ -3879,22 +7152,41 @@ test_that("motifs_randesu_impl errors", { test_that("motifs_randesu_estimate_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(6) - expect_snapshot(motifs_randesu_estimate_impl(g, size = 3, sample.size = 2)) + g <- path_graph_impl( + n = 6 + ) + + expect_snapshot(motifs_randesu_estimate_impl( + graph = g, + size = 3, + sample.size = 2 + )) expect_snapshot(motifs_randesu_estimate_impl( - g, + graph = g, size = 4, cut.prob = rep(0.1, 4), sample.size = 2, sample = 1:2 )) + + # Structured tests + result <- motifs_randesu_estimate_impl( + graph = g, + size = 3, + sample.size = 2 + ) + expect_true(is.numeric(result)) }) test_that("motifs_randesu_estimate_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - motifs_randesu_estimate_impl(NULL, size = 3, sample.size = 2) + motifs_randesu_estimate_impl( + graph = NULL, + size = 3, + sample.size = 2 + ) ) }) @@ -3903,21 +7195,39 @@ test_that("motifs_randesu_estimate_impl errors", { test_that("motifs_randesu_no_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(motifs_randesu_no_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(motifs_randesu_no_impl( + graph = g + )) expect_snapshot(motifs_randesu_no_impl( - g, + graph = g, size = 4, cut.prob = c(0.1, 0.1, 0.1, 0.1) )) + + # Structured tests + result <- motifs_randesu_no_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("motifs_randesu_no_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot_igraph_error( - motifs_randesu_no_impl(g, size = 3, cut.prob = c(0.1)) + motifs_randesu_no_impl( + graph = g, + size = 3, + cut.prob = c(0.1) + ) ) }) @@ -3926,14 +7236,27 @@ test_that("motifs_randesu_no_impl errors", { test_that("dyad_census_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(dyad_census_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(dyad_census_impl( + graph = g + )) + + # Structured tests + result <- dyad_census_impl( + graph = g + ) + expect_type(result, "list") }) test_that("dyad_census_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(dyad_census_impl(NULL)) + expect_snapshot_igraph_error(dyad_census_impl( + graph = NULL + )) }) # 247. triad_census_impl @@ -3941,14 +7264,27 @@ test_that("dyad_census_impl errors", { test_that("triad_census_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(triad_census_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(triad_census_impl( + graph = g + )) + + # Structured tests + result <- triad_census_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("triad_census_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(triad_census_impl(NULL)) + expect_snapshot_igraph_error(triad_census_impl( + graph = NULL + )) }) # 248. count_adjacent_triangles_impl @@ -3956,15 +7292,31 @@ test_that("triad_census_impl errors", { test_that("count_adjacent_triangles_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(count_adjacent_triangles_impl(g)) - expect_snapshot(count_adjacent_triangles_impl(g, vids = 1:2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(count_adjacent_triangles_impl( + graph = g + )) + expect_snapshot(count_adjacent_triangles_impl( + graph = g, + vids = 1:2 + )) + + # Structured tests + result <- count_adjacent_triangles_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("count_adjacent_triangles_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(count_adjacent_triangles_impl(NULL)) + expect_snapshot_igraph_error(count_adjacent_triangles_impl( + graph = NULL + )) }) # 249. count_triangles_impl @@ -3972,14 +7324,27 @@ test_that("count_adjacent_triangles_impl errors", { test_that("count_triangles_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(count_triangles_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(count_triangles_impl( + graph = g + )) + + # Structured tests + result <- count_triangles_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("count_triangles_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(count_triangles_impl(NULL)) + expect_snapshot_igraph_error(count_triangles_impl( + graph = NULL + )) }) # 250. local_scan_0_impl @@ -3987,15 +7352,32 @@ test_that("count_triangles_impl errors", { test_that("local_scan_0_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(local_scan_0_impl(g)) - expect_snapshot(local_scan_0_impl(g, weights = c(1, 2), mode = "in")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(local_scan_0_impl( + graph = g + )) + expect_snapshot(local_scan_0_impl( + graph = g, + weights = c(1, 2), + mode = "in" + )) + + # Structured tests + result <- local_scan_0_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("local_scan_0_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(local_scan_0_impl(NULL)) + expect_snapshot_igraph_error(local_scan_0_impl( + graph = NULL + )) }) # 251. local_scan_0_them_impl @@ -4003,22 +7385,41 @@ test_that("local_scan_0_impl errors", { test_that("local_scan_0_them_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g1 <- path_graph_impl(3) - g2 <- path_graph_impl(3) - expect_snapshot(local_scan_0_them_impl(g1, g2)) + g1 <- path_graph_impl( + n = 3 + ) + + g2 <- path_graph_impl( + n = 3 + ) + + expect_snapshot(local_scan_0_them_impl( + us = g1, + them = g2 + )) expect_snapshot(local_scan_0_them_impl( - g1, - g2, + us = g1, + them = g2, weights.them = c(1, 2), mode = "in" )) + + # Structured tests + result <- local_scan_0_them_impl( + us = g1, + them = g2 + ) + expect_true(is.numeric(result)) }) test_that("local_scan_0_them_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - local_scan_0_them_impl(NULL, path_graph_impl(3)) + local_scan_0_them_impl( + us = NULL, + them = path_graph_impl(3) + ) ) }) @@ -4027,15 +7428,32 @@ test_that("local_scan_0_them_impl errors", { test_that("local_scan_1_ecount_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(local_scan_1_ecount_impl(g)) - expect_snapshot(local_scan_1_ecount_impl(g, weights = c(1, 2), mode = "in")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(local_scan_1_ecount_impl( + graph = g + )) + expect_snapshot(local_scan_1_ecount_impl( + graph = g, + weights = c(1, 2), + mode = "in" + )) + + # Structured tests + result <- local_scan_1_ecount_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("local_scan_1_ecount_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(local_scan_1_ecount_impl(NULL)) + expect_snapshot_igraph_error(local_scan_1_ecount_impl( + graph = NULL + )) }) # 253. local_scan_1_ecount_them_impl @@ -4043,22 +7461,41 @@ test_that("local_scan_1_ecount_impl errors", { test_that("local_scan_1_ecount_them_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g1 <- path_graph_impl(3) - g2 <- path_graph_impl(3) - expect_snapshot(local_scan_1_ecount_them_impl(g1, g2)) + g1 <- path_graph_impl( + n = 3 + ) + + g2 <- path_graph_impl( + n = 3 + ) + expect_snapshot(local_scan_1_ecount_them_impl( - g1, - g2, + us = g1, + them = g2 + )) + expect_snapshot(local_scan_1_ecount_them_impl( + us = g1, + them = g2, weights.them = c(1, 2), mode = "in" )) + + # Structured tests + result <- local_scan_1_ecount_them_impl( + us = g1, + them = g2 + ) + expect_true(is.numeric(result)) }) test_that("local_scan_1_ecount_them_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - local_scan_1_ecount_them_impl(NULL, path_graph_impl(3)) + local_scan_1_ecount_them_impl( + us = NULL, + them = path_graph_impl(3) + ) ) }) @@ -4067,20 +7504,36 @@ test_that("local_scan_1_ecount_them_impl errors", { test_that("local_scan_k_ecount_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(local_scan_k_ecount_impl(g, k = 1)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(local_scan_k_ecount_impl( + graph = g, + k = 1 + )) expect_snapshot(local_scan_k_ecount_impl( - g, + graph = g, k = 1, weights = c(1, 2), mode = "in" )) + + # Structured tests + result <- local_scan_k_ecount_impl( + graph = g, + k = 1 + ) + expect_true(is.numeric(result)) }) test_that("local_scan_k_ecount_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(local_scan_k_ecount_impl(NULL, k = 1)) + expect_snapshot_igraph_error(local_scan_k_ecount_impl( + graph = NULL, + k = 1 + )) }) # 255. local_scan_k_ecount_them_impl @@ -4088,23 +7541,45 @@ test_that("local_scan_k_ecount_impl errors", { test_that("local_scan_k_ecount_them_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g1 <- path_graph_impl(3) - g2 <- path_graph_impl(3) - expect_snapshot(local_scan_k_ecount_them_impl(g1, g2, k = 1)) + g1 <- path_graph_impl( + n = 3 + ) + + g2 <- path_graph_impl( + n = 3 + ) + expect_snapshot(local_scan_k_ecount_them_impl( - g1, - g2, + us = g1, + them = g2, + k = 1 + )) + expect_snapshot(local_scan_k_ecount_them_impl( + us = g1, + them = g2, k = 1, weights.them = c(1, 2), mode = "in" )) + + # Structured tests + result <- local_scan_k_ecount_them_impl( + us = g1, + them = g2, + k = 1 + ) + expect_true(is.numeric(result)) }) test_that("local_scan_k_ecount_them_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - local_scan_k_ecount_them_impl(NULL, path_graph_impl(3), k = 1) + local_scan_k_ecount_them_impl( + us = NULL, + them = path_graph_impl(3), + k = 1 + ) ) }) @@ -4113,23 +7588,36 @@ test_that("local_scan_k_ecount_them_impl errors", { test_that("local_scan_neighborhood_ecount_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(4) + g <- path_graph_impl( + n = 4 + ) + expect_snapshot(local_scan_neighborhood_ecount_impl( - g, + graph = g, neighborhoods = list(1:2, 2:3, 2:4, 2) )) expect_snapshot(local_scan_neighborhood_ecount_impl( - g, + graph = g, weights = c(1, 2, 3), neighborhoods = list(1:2, 1:3, 2:4, 1) )) + + # Structured tests + result <- local_scan_neighborhood_ecount_impl( + graph = g, + neighborhoods = list(1:2, 2:3, 2:4, 2) + ) + expect_true(is.numeric(result)) }) test_that("local_scan_neighborhood_ecount_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - local_scan_neighborhood_ecount_impl(NULL, neighborhoods = list(1:2, 2:3)) + local_scan_neighborhood_ecount_impl( + graph = NULL, + neighborhoods = list(1:2, 2:3) + ) ) }) @@ -4138,24 +7626,49 @@ test_that("local_scan_neighborhood_ecount_impl errors", { test_that("local_scan_subset_ecount_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(4) + g <- path_graph_impl( + n = 4 + ) + expect_snapshot(local_scan_subset_ecount_impl( - g, - subsets = list(c(1.0, 2.0), c(2.0, 3.0)) + graph = g, + subsets = list( + c(1, 2), + c(2, 3) + ) )) expect_snapshot(local_scan_subset_ecount_impl( - g, - weights = c(1.0, 2.0, 3.0), - subsets = list(c(1.0, 2.0), c(2.0, 3.0)) + graph = g, + weights = c(1, 2, 3), + subsets = list( + c(1, 2), + c(2, 3) + ) )) + + # Structured tests + result <- local_scan_subset_ecount_impl( + graph = g, + subsets = list( + c(1, 2), + c(2, 3) + ) + ) + expect_true(is.numeric(result)) }) test_that("local_scan_subset_ecount_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(4) + g <- path_graph_impl( + n = 4 + ) + expect_snapshot_igraph_error( - local_scan_subset_ecount_impl(g, subsets = list(1:2, letters[2:3])) + local_scan_subset_ecount_impl( + graph = g, + subsets = list(1:2, letters[2:3]) + ) ) }) @@ -4164,14 +7677,27 @@ test_that("local_scan_subset_ecount_impl errors", { test_that("list_triangles_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(list_triangles_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(list_triangles_impl( + graph = g + )) + + # Structured tests + result <- list_triangles_impl( + graph = g + ) + expect_s3_class(result, "igraph.vs") }) test_that("list_triangles_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(list_triangles_impl(NULL)) + expect_snapshot_igraph_error(list_triangles_impl( + graph = NULL + )) }) # 259. join_impl @@ -4179,15 +7705,34 @@ test_that("list_triangles_impl errors", { test_that("join_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g1 <- path_graph_impl(3) - g2 <- path_graph_impl(3) - expect_snapshot(join_impl(g1, g2)) + g1 <- path_graph_impl( + n = 3 + ) + + g2 <- path_graph_impl( + n = 3 + ) + + expect_snapshot(join_impl( + left = g1, + right = g2 + )) + + # Structured tests + result <- join_impl( + left = g1, + right = g2 + ) + expect_s3_class(result, "igraph") }) test_that("join_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(join_impl(NULL, path_graph_impl(3))) + expect_snapshot_igraph_error(join_impl( + left = NULL, + right = path_graph_impl(3) + )) }) # 260. induced_subgraph_map_impl @@ -4195,16 +7740,39 @@ test_that("join_impl errors", { test_that("induced_subgraph_map_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(induced_subgraph_map_impl(g, 1:2, impl = "auto")) - expect_snapshot(induced_subgraph_map_impl(g, 1:2, impl = "copy_and_delete")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(induced_subgraph_map_impl( + graph = g, + vids = 1:2, + impl = "auto" + )) + expect_snapshot(induced_subgraph_map_impl( + graph = g, + vids = 1:2, + impl = "copy_and_delete" + )) + + # Structured tests + result <- induced_subgraph_map_impl( + graph = g, + vids = 1:2, + impl = "auto" + ) + expect_type(result, "list") }) test_that("induced_subgraph_map_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - induced_subgraph_map_impl(NULL, 1:2, impl = "auto") + induced_subgraph_map_impl( + graph = NULL, + vids = 1:2, + impl = "auto" + ) ) }) @@ -4213,15 +7781,31 @@ test_that("induced_subgraph_map_impl errors", { test_that("mycielskian_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(mycielskian_impl(g)) - expect_snapshot(mycielskian_impl(g, k = 2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(mycielskian_impl( + graph = g + )) + expect_snapshot(mycielskian_impl( + graph = g, + k = 2 + )) + + # Structured tests + result <- mycielskian_impl( + graph = g + ) + expect_s3_class(result, "igraph") }) test_that("mycielskian_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(mycielskian_impl(NULL)) + expect_snapshot_igraph_error(mycielskian_impl( + graph = NULL + )) }) # 262. product_impl @@ -4229,16 +7813,39 @@ test_that("mycielskian_impl errors", { test_that("product_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g1 <- path_graph_impl(3) - g2 <- path_graph_impl(3) - expect_snapshot(product_impl(g1, g2)) - expect_snapshot(product_impl(g1, g2, type = "tensor")) + g1 <- path_graph_impl( + n = 3 + ) + + g2 <- path_graph_impl( + n = 3 + ) + + expect_snapshot(product_impl( + g1 = g1, + g2 = g2 + )) + expect_snapshot(product_impl( + g1 = g1, + g2 = g2, + type = "tensor" + )) + + # Structured tests + result <- product_impl( + g1 = g1, + g2 = g2 + ) + expect_s3_class(result, "igraph") }) test_that("product_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(product_impl(NULL, path_graph_impl(3))) + expect_snapshot_igraph_error(product_impl( + g1 = NULL, + g2 = path_graph_impl(3) + )) }) # 263. rooted_product_impl @@ -4246,16 +7853,38 @@ test_that("product_impl errors", { test_that("rooted_product_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g1 <- path_graph_impl(3) - g2 <- path_graph_impl(3) - expect_snapshot(rooted_product_impl(g1, g2, root = 1)) + g1 <- path_graph_impl( + n = 3 + ) + + g2 <- path_graph_impl( + n = 3 + ) + + expect_snapshot(rooted_product_impl( + g1 = g1, + g2 = g2, + root = 1 + )) + + # Structured tests + result <- rooted_product_impl( + g1 = g1, + g2 = g2, + root = 1 + ) + expect_s3_class(result, "igraph") }) test_that("rooted_product_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - rooted_product_impl(NULL, path_graph_impl(3), root = 1) + rooted_product_impl( + g1 = NULL, + g2 = path_graph_impl(3), + root = 1 + ) ) }) @@ -4264,15 +7893,31 @@ test_that("rooted_product_impl errors", { test_that("gomory_hu_tree_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(gomory_hu_tree_impl(g)) - expect_snapshot(gomory_hu_tree_impl(g, capacity = c(1, 2))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(gomory_hu_tree_impl( + graph = g + )) + expect_snapshot(gomory_hu_tree_impl( + graph = g, + capacity = c(1, 2) + )) + + # Structured tests + result <- gomory_hu_tree_impl( + graph = g + ) + expect_type(result, "list") }) test_that("gomory_hu_tree_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(gomory_hu_tree_impl(NULL)) + expect_snapshot_igraph_error(gomory_hu_tree_impl( + graph = NULL + )) }) # 265. maxflow_impl @@ -4280,15 +7925,39 @@ test_that("gomory_hu_tree_impl errors", { test_that("maxflow_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(maxflow_impl(g, source = 1, target = 3)) - expect_snapshot(maxflow_impl(g, source = 1, target = 3, capacity = c(1, 2))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(maxflow_impl( + graph = g, + source = 1, + target = 3 + )) + expect_snapshot(maxflow_impl( + graph = g, + source = 1, + target = 3, + capacity = c(1, 2) + )) + + # Structured tests + result <- maxflow_impl( + graph = g, + source = 1, + target = 3 + ) + expect_type(result, "list") }) test_that("maxflow_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(maxflow_impl(NULL, source = 1, target = 3)) + expect_snapshot_igraph_error(maxflow_impl( + graph = NULL, + source = 1, + target = 3 + )) }) # 266. residual_graph_impl @@ -4296,15 +7965,34 @@ test_that("maxflow_impl errors", { test_that("residual_graph_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(residual_graph_impl(g, capacity = c(1, 2), flow = c(1, 2))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(residual_graph_impl( + graph = g, + capacity = c(1, 2), + flow = c(1, 2) + )) + + # Structured tests + result <- residual_graph_impl( + graph = g, + capacity = c(1, 2), + flow = c(1, 2) + ) + expect_type(result, "list") }) test_that("residual_graph_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - residual_graph_impl(NULL, capacity = c(1, 2), flow = c(1, 2)) + residual_graph_impl( + graph = NULL, + capacity = c(1, 2), + flow = c(1, 2) + ) ) }) @@ -4313,19 +8001,34 @@ test_that("residual_graph_impl errors", { test_that("reverse_residual_graph_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(reverse_residual_graph_impl( - g, + graph = g, capacity = c(1, 2), flow = c(1, 2) )) + + # Structured tests + result <- reverse_residual_graph_impl( + graph = g, + capacity = c(1, 2), + flow = c(1, 2) + ) + expect_s3_class(result, "igraph") }) test_that("reverse_residual_graph_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - reverse_residual_graph_impl(NULL, capacity = c(1, 2), flow = c(1, 2)) + reverse_residual_graph_impl( + graph = NULL, + capacity = c(1, 2), + flow = c(1, 2) + ) ) }) @@ -4334,15 +8037,39 @@ test_that("reverse_residual_graph_impl errors", { test_that("st_mincut_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(st_mincut_impl(g, source = 1, target = 3)) - expect_snapshot(st_mincut_impl(g, source = 1, target = 3, capacity = c(1, 2))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(st_mincut_impl( + graph = g, + source = 1, + target = 3 + )) + expect_snapshot(st_mincut_impl( + graph = g, + source = 1, + target = 3, + capacity = c(1, 2) + )) + + # Structured tests + result <- st_mincut_impl( + graph = g, + source = 1, + target = 3 + ) + expect_type(result, "list") }) test_that("st_mincut_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(st_mincut_impl(NULL, source = 1, target = 3)) + expect_snapshot_igraph_error(st_mincut_impl( + graph = NULL, + source = 1, + target = 3 + )) }) # 269. dominator_tree_impl @@ -4350,15 +8077,36 @@ test_that("st_mincut_impl errors", { test_that("dominator_tree_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3, directed = TRUE) - expect_snapshot(dominator_tree_impl(g, root = 1)) - expect_snapshot(dominator_tree_impl(g, root = 1, mode = "in")) + g <- path_graph_impl( + n = 3, + directed = TRUE + ) + + expect_snapshot(dominator_tree_impl( + graph = g, + root = 1 + )) + expect_snapshot(dominator_tree_impl( + graph = g, + root = 1, + mode = "in" + )) + + # Structured tests + result <- dominator_tree_impl( + graph = g, + root = 1 + ) + expect_type(result, "list") }) test_that("dominator_tree_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(dominator_tree_impl(NULL, root = 1)) + expect_snapshot_igraph_error(dominator_tree_impl( + graph = NULL, + root = 1 + )) }) # 270. all_st_cuts_impl @@ -4366,14 +8114,34 @@ test_that("dominator_tree_impl errors", { test_that("all_st_cuts_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3, directed = TRUE) - expect_snapshot(all_st_cuts_impl(g, source = 1, target = 3)) + g <- path_graph_impl( + n = 3, + directed = TRUE + ) + + expect_snapshot(all_st_cuts_impl( + graph = g, + source = 1, + target = 3 + )) + + # Structured tests + result <- all_st_cuts_impl( + graph = g, + source = 1, + target = 3 + ) + expect_type(result, "list") }) test_that("all_st_cuts_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(all_st_cuts_impl(NULL, source = 1, target = 3)) + expect_snapshot_igraph_error(all_st_cuts_impl( + graph = NULL, + source = 1, + target = 3 + )) }) # 271. all_st_mincuts_impl @@ -4381,21 +8149,41 @@ test_that("all_st_cuts_impl errors", { test_that("all_st_mincuts_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3, directed = TRUE) - expect_snapshot(all_st_mincuts_impl(g, source = 1, target = 3)) + g <- path_graph_impl( + n = 3, + directed = TRUE + ) + + expect_snapshot(all_st_mincuts_impl( + graph = g, + source = 1, + target = 3 + )) expect_snapshot(all_st_mincuts_impl( - g, + graph = g, source = 1, target = 3, capacity = c(1, 2) )) + + # Structured tests + result <- all_st_mincuts_impl( + graph = g, + source = 1, + target = 3 + ) + expect_type(result, "list") }) test_that("all_st_mincuts_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - all_st_mincuts_impl(NULL, source = 1, target = 3) + all_st_mincuts_impl( + graph = NULL, + source = 1, + target = 3 + ) ) }) @@ -4404,14 +8192,27 @@ test_that("all_st_mincuts_impl errors", { test_that("even_tarjan_reduction_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(even_tarjan_reduction_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(even_tarjan_reduction_impl( + graph = g + )) + + # Structured tests + result <- even_tarjan_reduction_impl( + graph = g + ) + expect_type(result, "list") }) test_that("even_tarjan_reduction_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(even_tarjan_reduction_impl(NULL)) + expect_snapshot_igraph_error(even_tarjan_reduction_impl( + graph = NULL + )) }) # 273. is_separator_impl @@ -4419,14 +8220,30 @@ test_that("even_tarjan_reduction_impl errors", { test_that("is_separator_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_separator_impl(g, 1:2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_separator_impl( + graph = g, + candidate = 1:2 + )) + + # Structured tests + result <- is_separator_impl( + graph = g, + candidate = 1:2 + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("is_separator_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_separator_impl(NULL, 1:2)) + expect_snapshot_igraph_error(is_separator_impl( + graph = NULL, + candidate = 1:2 + )) }) # 274. is_minimal_separator_impl @@ -4434,14 +8251,30 @@ test_that("is_separator_impl errors", { test_that("is_minimal_separator_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_minimal_separator_impl(g, 1:2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_minimal_separator_impl( + graph = g, + candidate = 1:2 + )) + + # Structured tests + result <- is_minimal_separator_impl( + graph = g, + candidate = 1:2 + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("is_minimal_separator_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_minimal_separator_impl(NULL, 1:2)) + expect_snapshot_igraph_error(is_minimal_separator_impl( + graph = NULL, + candidate = 1:2 + )) }) # 275. all_minimal_st_separators_impl @@ -4449,14 +8282,27 @@ test_that("is_minimal_separator_impl errors", { test_that("all_minimal_st_separators_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(all_minimal_st_separators_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(all_minimal_st_separators_impl( + graph = g + )) + + # Structured tests + result <- all_minimal_st_separators_impl( + graph = g + ) + expect_type(result, "list") }) test_that("all_minimal_st_separators_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(all_minimal_st_separators_impl(NULL)) + expect_snapshot_igraph_error(all_minimal_st_separators_impl( + graph = NULL + )) }) # 276. minimum_size_separators_impl @@ -4464,14 +8310,27 @@ test_that("all_minimal_st_separators_impl errors", { test_that("minimum_size_separators_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(minimum_size_separators_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(minimum_size_separators_impl( + graph = g + )) + + # Structured tests + result <- minimum_size_separators_impl( + graph = g + ) + expect_type(result, "list") }) test_that("minimum_size_separators_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(minimum_size_separators_impl(NULL)) + expect_snapshot_igraph_error(minimum_size_separators_impl( + graph = NULL + )) }) # 277. isoclass_impl @@ -4479,14 +8338,27 @@ test_that("minimum_size_separators_impl errors", { test_that("isoclass_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(isoclass_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(isoclass_impl( + graph = g + )) + + # Structured tests + result <- isoclass_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("isoclass_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(isoclass_impl(NULL)) + expect_snapshot_igraph_error(isoclass_impl( + graph = NULL + )) }) # 278. isomorphic_impl @@ -4494,15 +8366,34 @@ test_that("isoclass_impl errors", { test_that("isomorphic_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g1 <- path_graph_impl(3) - g2 <- path_graph_impl(3) - expect_snapshot(isomorphic_impl(g1, g2)) + g1 <- path_graph_impl( + n = 3 + ) + + g2 <- path_graph_impl( + n = 3 + ) + + expect_snapshot(isomorphic_impl( + graph1 = g1, + graph2 = g2 + )) + + # Structured tests + result <- isomorphic_impl( + graph1 = g1, + graph2 = g2 + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("isomorphic_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(isomorphic_impl(NULL, path_graph_impl(3))) + expect_snapshot_igraph_error(isomorphic_impl( + graph1 = NULL, + graph2 = path_graph_impl(3) + )) }) # 279. isoclass_subgraph_impl @@ -4510,14 +8401,30 @@ test_that("isomorphic_impl errors", { test_that("isoclass_subgraph_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(5) - expect_snapshot(isoclass_subgraph_impl(g, c(1, 2, 3))) + g <- path_graph_impl( + n = 5 + ) + + expect_snapshot(isoclass_subgraph_impl( + graph = g, + vids = c(1, 2, 3) + )) + + # Structured tests + result <- isoclass_subgraph_impl( + graph = g, + vids = c(1, 2, 3) + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("isoclass_subgraph_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(isoclass_subgraph_impl(NULL, 1:2)) + expect_snapshot_igraph_error(isoclass_subgraph_impl( + graph = NULL, + vids = 1:2 + )) }) # 280. isoclass_create_impl @@ -4525,14 +8432,31 @@ test_that("isoclass_subgraph_impl errors", { test_that("isoclass_create_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(isoclass_create_impl(size = 3, number = 1)) - expect_snapshot(isoclass_create_impl(size = 3, number = 1, directed = FALSE)) + expect_snapshot(isoclass_create_impl( + size = 3, + number = 1 + )) + expect_snapshot(isoclass_create_impl( + size = 3, + number = 1, + directed = FALSE + )) + + # Structured tests + result <- isoclass_create_impl( + size = 3, + number = 1 + ) + expect_s3_class(result, "igraph") }) test_that("isoclass_create_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(isoclass_create_impl("a", 1)) + expect_snapshot_igraph_error(isoclass_create_impl( + size = "a", + number = 1 + )) }) # 281. isomorphic_vf2_impl @@ -4540,23 +8464,42 @@ test_that("isoclass_create_impl errors", { test_that("isomorphic_vf2_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g1 <- path_graph_impl(3) - g2 <- path_graph_impl(3) - expect_snapshot(isomorphic_vf2_impl(g1, g2)) + g1 <- path_graph_impl( + n = 3 + ) + + g2 <- path_graph_impl( + n = 3 + ) + + expect_snapshot(isomorphic_vf2_impl( + graph1 = g1, + graph2 = g2 + )) expect_snapshot(isomorphic_vf2_impl( - g1, - g2, + graph1 = g1, + graph2 = g2, vertex.color1 = c(1, 2, 3), vertex.color2 = c(1, 2, 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2) )) + + # Structured tests + result <- isomorphic_vf2_impl( + graph1 = g1, + graph2 = g2 + ) + expect_type(result, "list") }) test_that("isomorphic_vf2_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(isomorphic_vf2_impl(NULL, path_graph_impl(3))) + expect_snapshot_igraph_error(isomorphic_vf2_impl( + graph1 = NULL, + graph2 = path_graph_impl(3) + )) }) # 282. get_isomorphisms_vf2_callback_impl @@ -4567,24 +8510,43 @@ test_that("isomorphic_vf2_impl errors", { test_that("count_isomorphisms_vf2_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g1 <- path_graph_impl(3) - g2 <- path_graph_impl(3) - expect_snapshot(count_isomorphisms_vf2_impl(g1, g2)) + g1 <- path_graph_impl( + n = 3 + ) + + g2 <- path_graph_impl( + n = 3 + ) + + expect_snapshot(count_isomorphisms_vf2_impl( + graph1 = g1, + graph2 = g2 + )) expect_snapshot(count_isomorphisms_vf2_impl( - g1, - g2, + graph1 = g1, + graph2 = g2, vertex.color1 = c(1, 2, 3), vertex.color2 = c(1, 2, 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2) )) + + # Structured tests + result <- count_isomorphisms_vf2_impl( + graph1 = g1, + graph2 = g2 + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("count_isomorphisms_vf2_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - count_isomorphisms_vf2_impl(NULL, path_graph_impl(3)) + count_isomorphisms_vf2_impl( + graph1 = NULL, + graph2 = path_graph_impl(3) + ) ) }) @@ -4593,24 +8555,43 @@ test_that("count_isomorphisms_vf2_impl errors", { test_that("get_isomorphisms_vf2_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g1 <- path_graph_impl(3) - g2 <- path_graph_impl(3) - expect_snapshot(get_isomorphisms_vf2_impl(g1, g2)) + g1 <- path_graph_impl( + n = 3 + ) + + g2 <- path_graph_impl( + n = 3 + ) + expect_snapshot(get_isomorphisms_vf2_impl( - g1, - g2, + graph1 = g1, + graph2 = g2 + )) + expect_snapshot(get_isomorphisms_vf2_impl( + graph1 = g1, + graph2 = g2, vertex.color1 = c(1, 2, 3), vertex.color2 = c(1, 2, 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2) )) + + # Structured tests + result <- get_isomorphisms_vf2_impl( + graph1 = g1, + graph2 = g2 + ) + expect_type(result, "list") }) test_that("get_isomorphisms_vf2_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - get_isomorphisms_vf2_impl(NULL, path_graph_impl(3)) + get_isomorphisms_vf2_impl( + graph1 = NULL, + graph2 = path_graph_impl(3) + ) ) }) @@ -4619,15 +8600,34 @@ test_that("get_isomorphisms_vf2_impl errors", { test_that("subisomorphic_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g1 <- path_graph_impl(3) - g2 <- path_graph_impl(3) - expect_snapshot(subisomorphic_impl(g1, g2)) + g1 <- path_graph_impl( + n = 3 + ) + + g2 <- path_graph_impl( + n = 3 + ) + + expect_snapshot(subisomorphic_impl( + graph1 = g1, + graph2 = g2 + )) + + # Structured tests + result <- subisomorphic_impl( + graph1 = g1, + graph2 = g2 + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("subisomorphic_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(subisomorphic_impl(NULL, path_graph_impl(3))) + expect_snapshot_igraph_error(subisomorphic_impl( + graph1 = NULL, + graph2 = path_graph_impl(3) + )) }) # 286. subisomorphic_vf2_impl @@ -4635,24 +8635,43 @@ test_that("subisomorphic_impl errors", { test_that("subisomorphic_vf2_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g1 <- path_graph_impl(3) - g2 <- path_graph_impl(3) - expect_snapshot(subisomorphic_vf2_impl(g1, g2)) + g1 <- path_graph_impl( + n = 3 + ) + + g2 <- path_graph_impl( + n = 3 + ) + + expect_snapshot(subisomorphic_vf2_impl( + graph1 = g1, + graph2 = g2 + )) expect_snapshot(subisomorphic_vf2_impl( - g1, - g2, + graph1 = g1, + graph2 = g2, vertex.color1 = c(1, 2, 3), vertex.color2 = c(1, 2, 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2) )) + + # Structured tests + result <- subisomorphic_vf2_impl( + graph1 = g1, + graph2 = g2 + ) + expect_type(result, "list") }) test_that("subisomorphic_vf2_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - subisomorphic_vf2_impl(NULL, path_graph_impl(3)) + subisomorphic_vf2_impl( + graph1 = NULL, + graph2 = path_graph_impl(3) + ) ) }) @@ -4661,24 +8680,43 @@ test_that("subisomorphic_vf2_impl errors", { test_that("count_subisomorphisms_vf2_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g1 <- path_graph_impl(3) - g2 <- path_graph_impl(3) - expect_snapshot(count_subisomorphisms_vf2_impl(g1, g2)) + g1 <- path_graph_impl( + n = 3 + ) + + g2 <- path_graph_impl( + n = 3 + ) + + expect_snapshot(count_subisomorphisms_vf2_impl( + graph1 = g1, + graph2 = g2 + )) expect_snapshot(count_subisomorphisms_vf2_impl( - g1, - g2, + graph1 = g1, + graph2 = g2, vertex.color1 = c(1, 2, 3), vertex.color2 = c(1, 2, 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2) )) + + # Structured tests + result <- count_subisomorphisms_vf2_impl( + graph1 = g1, + graph2 = g2 + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("count_subisomorphisms_vf2_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - count_subisomorphisms_vf2_impl(NULL, path_graph_impl(3)) + count_subisomorphisms_vf2_impl( + graph1 = NULL, + graph2 = path_graph_impl(3) + ) ) }) @@ -4687,24 +8725,43 @@ test_that("count_subisomorphisms_vf2_impl errors", { test_that("get_subisomorphisms_vf2_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g1 <- path_graph_impl(3) - g2 <- path_graph_impl(3) - expect_snapshot(get_subisomorphisms_vf2_impl(g1, g2)) + g1 <- path_graph_impl( + n = 3 + ) + + g2 <- path_graph_impl( + n = 3 + ) + + expect_snapshot(get_subisomorphisms_vf2_impl( + graph1 = g1, + graph2 = g2 + )) expect_snapshot(get_subisomorphisms_vf2_impl( - g1, - g2, + graph1 = g1, + graph2 = g2, vertex.color1 = c(1, 2, 3), vertex.color2 = c(1, 2, 3), edge.color1 = c(1, 2), edge.color2 = c(1, 2) )) + + # Structured tests + result <- get_subisomorphisms_vf2_impl( + graph1 = g1, + graph2 = g2 + ) + expect_type(result, "list") }) test_that("get_subisomorphisms_vf2_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - get_subisomorphisms_vf2_impl(NULL, path_graph_impl(3)) + get_subisomorphisms_vf2_impl( + graph1 = NULL, + graph2 = path_graph_impl(3) + ) ) }) @@ -4713,15 +8770,32 @@ test_that("get_subisomorphisms_vf2_impl errors", { test_that("canonical_permutation_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(canonical_permutation_impl(g)) - expect_snapshot(canonical_permutation_impl(g, colors = c(1, 2, 3), sh = "fl")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(canonical_permutation_impl( + graph = g + )) + expect_snapshot(canonical_permutation_impl( + graph = g, + colors = c(1, 2, 3), + sh = "fl" + )) + + # Structured tests + result <- canonical_permutation_impl( + graph = g + ) + expect_type(result, "list") }) test_that("canonical_permutation_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(canonical_permutation_impl(NULL)) + expect_snapshot_igraph_error(canonical_permutation_impl( + graph = NULL + )) }) # 290. permute_vertices_impl @@ -4729,14 +8803,30 @@ test_that("canonical_permutation_impl errors", { test_that("permute_vertices_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(permute_vertices_impl(g, permutation = 3:1)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(permute_vertices_impl( + graph = g, + permutation = 3:1 + )) + + # Structured tests + result <- permute_vertices_impl( + graph = g, + permutation = 3:1 + ) + expect_s3_class(result, "igraph") }) test_that("permute_vertices_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(permute_vertices_impl(NULL, permutation = 3:1)) + expect_snapshot_igraph_error(permute_vertices_impl( + graph = NULL, + permutation = 3:1 + )) }) # 291. isomorphic_bliss_impl @@ -4744,22 +8834,41 @@ test_that("permute_vertices_impl errors", { test_that("isomorphic_bliss_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g1 <- path_graph_impl(3) - g2 <- path_graph_impl(3) - expect_snapshot(isomorphic_bliss_impl(g1, g2)) + g1 <- path_graph_impl( + n = 3 + ) + + g2 <- path_graph_impl( + n = 3 + ) + + expect_snapshot(isomorphic_bliss_impl( + graph1 = g1, + graph2 = g2 + )) expect_snapshot(isomorphic_bliss_impl( - g1, - g2, + graph1 = g1, + graph2 = g2, colors1 = c(1, 2, 3), colors2 = c(1, 2, 3), sh = "fl" )) + + # Structured tests + result <- isomorphic_bliss_impl( + graph1 = g1, + graph2 = g2 + ) + expect_type(result, "list") }) test_that("isomorphic_bliss_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(isomorphic_bliss_impl(NULL, path_graph_impl(3))) + expect_snapshot_igraph_error(isomorphic_bliss_impl( + graph1 = NULL, + graph2 = path_graph_impl(3) + )) }) # 292. count_automorphisms_impl @@ -4767,15 +8876,32 @@ test_that("isomorphic_bliss_impl errors", { test_that("count_automorphisms_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(count_automorphisms_impl(g)) - expect_snapshot(count_automorphisms_impl(g, colors = c(1, 2, 3), sh = "fl")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(count_automorphisms_impl( + graph = g + )) + expect_snapshot(count_automorphisms_impl( + graph = g, + colors = c(1, 2, 3), + sh = "fl" + )) + + # Structured tests + result <- count_automorphisms_impl( + graph = g + ) + expect_type(result, "list") }) test_that("count_automorphisms_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(count_automorphisms_impl(NULL)) + expect_snapshot_igraph_error(count_automorphisms_impl( + graph = NULL + )) }) # 293. automorphism_group_impl @@ -4783,20 +8909,33 @@ test_that("count_automorphisms_impl errors", { test_that("automorphism_group_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(automorphism_group_impl(g)) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(automorphism_group_impl( - g, + graph = g + )) + expect_snapshot(automorphism_group_impl( + graph = g, colors = c(1, 2, 3), sh = "fl", details = TRUE )) + + # Structured tests + result <- automorphism_group_impl( + graph = g + ) + expect_type(result, "list") }) test_that("automorphism_group_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(automorphism_group_impl(NULL)) + expect_snapshot_igraph_error(automorphism_group_impl( + graph = NULL + )) }) # 294. simplify_and_colorize_impl @@ -4804,14 +8943,27 @@ test_that("automorphism_group_impl errors", { test_that("simplify_and_colorize_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(simplify_and_colorize_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(simplify_and_colorize_impl( + graph = g + )) + + # Structured tests + result <- simplify_and_colorize_impl( + graph = g + ) + expect_type(result, "list") }) test_that("simplify_and_colorize_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(simplify_and_colorize_impl(NULL)) + expect_snapshot_igraph_error(simplify_and_colorize_impl( + graph = NULL + )) }) # 295. graph_count_impl @@ -4819,14 +8971,27 @@ test_that("simplify_and_colorize_impl errors", { test_that("graph_count_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(graph_count_impl(3)) - expect_snapshot(graph_count_impl(3, directed = TRUE)) + expect_snapshot(graph_count_impl( + n = 3 + )) + expect_snapshot(graph_count_impl( + n = 3, + directed = TRUE + )) + + # Structured tests + result <- graph_count_impl( + n = 3 + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("graph_count_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(graph_count_impl("a")) + expect_snapshot_igraph_error(graph_count_impl( + n = "a" + )) }) # 296. is_matching_impl @@ -4834,19 +8999,35 @@ test_that("graph_count_impl errors", { test_that("is_matching_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_matching_impl(g, matching = 1:2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_matching_impl( + graph = g, + matching = 1:2 + )) expect_snapshot(is_matching_impl( - g, + graph = g, types = c(TRUE, FALSE, TRUE), matching = 1:2 )) + + # Structured tests + result <- is_matching_impl( + graph = g, + matching = 1:2 + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("is_matching_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_matching_impl(NULL, matching = 1:2)) + expect_snapshot_igraph_error(is_matching_impl( + graph = NULL, + matching = 1:2 + )) }) # 297. is_maximal_matching_impl @@ -4854,19 +9035,35 @@ test_that("is_matching_impl errors", { test_that("is_maximal_matching_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_maximal_matching_impl(g, matching = 1:2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_maximal_matching_impl( + graph = g, + matching = 1:2 + )) expect_snapshot(is_maximal_matching_impl( - g, + graph = g, types = c(TRUE, FALSE, TRUE), matching = 1:2 )) + + # Structured tests + result <- is_maximal_matching_impl( + graph = g, + matching = 1:2 + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("is_maximal_matching_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_maximal_matching_impl(NULL, matching = 1:2)) + expect_snapshot_igraph_error(is_maximal_matching_impl( + graph = NULL, + matching = 1:2 + )) }) # 298. maximum_bipartite_matching_impl @@ -4874,24 +9071,37 @@ test_that("is_maximal_matching_impl errors", { test_that("maximum_bipartite_matching_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(maximum_bipartite_matching_impl( - g, + graph = g, types = c(TRUE, FALSE, TRUE) )) expect_snapshot(maximum_bipartite_matching_impl( - g, + graph = g, types = c(TRUE, FALSE, TRUE), weights = c(1, 2), - eps = 1e-5 + eps = 1e-05 )) + + # Structured tests + result <- maximum_bipartite_matching_impl( + graph = g, + types = c(TRUE, FALSE, TRUE) + ) + expect_type(result, "list") }) test_that("maximum_bipartite_matching_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - maximum_bipartite_matching_impl(NULL, types = c(TRUE, FALSE, TRUE)) + maximum_bipartite_matching_impl( + graph = NULL, + types = c(TRUE, FALSE, TRUE) + ) ) }) @@ -4900,10 +9110,16 @@ test_that("maximum_bipartite_matching_impl errors", { test_that("adjacency_spectral_embedding_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(adjacency_spectral_embedding_impl(g, no = 2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(adjacency_spectral_embedding_impl( + graph = g, + no = 2 + )) expect_snapshot(adjacency_spectral_embedding_impl( - g, + graph = g, no = 2, weights = c(1, 2), which = "la", @@ -4911,12 +9127,22 @@ test_that("adjacency_spectral_embedding_impl basic", { cvec = c(1, 2, 3), options = list(maxiter = 10) )) + + # Structured tests + result <- adjacency_spectral_embedding_impl( + graph = g, + no = 2 + ) + expect_type(result, "list") }) test_that("adjacency_spectral_embedding_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(adjacency_spectral_embedding_impl(NULL, no = 2)) + expect_snapshot_igraph_error(adjacency_spectral_embedding_impl( + graph = NULL, + no = 2 + )) }) # 300. laplacian_spectral_embedding_impl @@ -4924,14 +9150,30 @@ test_that("adjacency_spectral_embedding_impl errors", { test_that("laplacian_spectral_embedding_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(laplacian_spectral_embedding_impl(g, no = 2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(laplacian_spectral_embedding_impl( + graph = g, + no = 2 + )) + + # Structured tests + result <- laplacian_spectral_embedding_impl( + graph = g, + no = 2 + ) + expect_type(result, "list") }) test_that("laplacian_spectral_embedding_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(laplacian_spectral_embedding_impl(NULL, no = 2)) + expect_snapshot_igraph_error(laplacian_spectral_embedding_impl( + graph = NULL, + no = 2 + )) }) # 301. eigen_adjacency_impl @@ -4939,22 +9181,35 @@ test_that("laplacian_spectral_embedding_impl errors", { test_that("eigen_adjacency_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(eigen_adjacency_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(eigen_adjacency_impl( + graph = g + )) expect_snapshot_igraph_error( eigen_adjacency_impl( - g, + graph = g, algorithm = "lapack", which = list(which = "LA"), options = list(maxiter = 10) ) ) + + # Structured tests + result <- eigen_adjacency_impl( + graph = g + ) + expect_type(result, "list") }) test_that("eigen_adjacency_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(eigen_adjacency_impl(NULL)) + expect_snapshot_igraph_error(eigen_adjacency_impl( + graph = NULL + )) }) # 302. power_law_fit_impl @@ -4962,18 +9217,28 @@ test_that("eigen_adjacency_impl errors", { test_that("power_law_fit_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(power_law_fit_impl(c(1, 2, 3))) expect_snapshot(power_law_fit_impl( - c(1, 2, 3), + data = c(1, 2, 3) + )) + expect_snapshot(power_law_fit_impl( + data = c(1, 2, 3), xmin = 1, force.continuous = TRUE )) + + # Structured tests + result <- power_law_fit_impl( + data = c(1, 2, 3) + ) + expect_type(result, "list") }) test_that("power_law_fit_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(power_law_fit_impl("a")) + expect_snapshot_igraph_error(power_law_fit_impl( + data = "a" + )) }) # 303. sir_impl @@ -4981,15 +9246,39 @@ test_that("power_law_fit_impl errors", { test_that("sir_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(sir_impl(g, beta = 0.1, gamma = 0.1)) - expect_snapshot(sir_impl(g, beta = 0.1, gamma = 0.1, no.sim = 2)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(sir_impl( + graph = g, + beta = 0.1, + gamma = 0.1 + )) + expect_snapshot(sir_impl( + graph = g, + beta = 0.1, + gamma = 0.1, + no.sim = 2 + )) + + # Structured tests + result <- sir_impl( + graph = g, + beta = 0.1, + gamma = 0.1 + ) + expect_s3_class(result, "sir") }) test_that("sir_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(sir_impl(NULL, beta = 0.1, gamma = 0.1)) + expect_snapshot_igraph_error(sir_impl( + graph = NULL, + beta = 0.1, + gamma = 0.1 + )) }) # 304. convex_hull_2d_impl @@ -4997,13 +9286,23 @@ test_that("sir_impl errors", { test_that("convex_hull_2d_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(convex_hull_2d_impl(matrix(1:6, ncol = 2))) + expect_snapshot(convex_hull_2d_impl( + data = matrix(1:6, ncol = 2) + )) + + # Structured tests + result <- convex_hull_2d_impl( + data = matrix(1:6, ncol = 2) + ) + expect_type(result, "list") }) test_that("convex_hull_2d_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(convex_hull_2d_impl("a")) + expect_snapshot_igraph_error(convex_hull_2d_impl( + data = "a" + )) }) # 305. dim_select_impl @@ -5011,13 +9310,23 @@ test_that("convex_hull_2d_impl errors", { test_that("dim_select_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(dim_select_impl(c(1, 2, 3))) + expect_snapshot(dim_select_impl( + sv = c(1, 2, 3) + )) + + # Structured tests + result <- dim_select_impl( + sv = c(1, 2, 3) + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("dim_select_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(dim_select_impl(NULL)) + expect_snapshot_igraph_error(dim_select_impl( + sv = NULL + )) }) # 306. solve_lsap_impl @@ -5025,13 +9334,26 @@ test_that("dim_select_impl errors", { test_that("solve_lsap_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(solve_lsap_impl(matrix(1:4, ncol = 2), n = 2)) + expect_snapshot(solve_lsap_impl( + c = matrix(1:4, ncol = 2), + n = 2 + )) + + # Structured tests + result <- solve_lsap_impl( + c = matrix(1:4, ncol = 2), + n = 2 + ) + expect_true(is.numeric(result)) }) test_that("solve_lsap_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(solve_lsap_impl("a", n = 2)) + expect_snapshot_igraph_error(solve_lsap_impl( + c = "a", + n = 2 + )) }) # 307. find_cycle_impl @@ -5039,15 +9361,31 @@ test_that("solve_lsap_impl errors", { test_that("find_cycle_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(find_cycle_impl(g)) - expect_snapshot(find_cycle_impl(g, mode = "in")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(find_cycle_impl( + graph = g + )) + expect_snapshot(find_cycle_impl( + graph = g, + mode = "in" + )) + + # Structured tests + result <- find_cycle_impl( + graph = g + ) + expect_type(result, "list") }) test_that("find_cycle_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(find_cycle_impl(NULL)) + expect_snapshot_igraph_error(find_cycle_impl( + graph = NULL + )) }) # 308. simple_cycles_impl @@ -5055,20 +9393,33 @@ test_that("find_cycle_impl errors", { test_that("simple_cycles_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(simple_cycles_impl(g)) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(simple_cycles_impl( - g, + graph = g + )) + expect_snapshot(simple_cycles_impl( + graph = g, mode = "in", min.cycle.length = 2, max.cycle.length = 3 )) + + # Structured tests + result <- simple_cycles_impl( + graph = g + ) + expect_type(result, "list") }) test_that("simple_cycles_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(simple_cycles_impl(NULL)) + expect_snapshot_igraph_error(simple_cycles_impl( + graph = NULL + )) }) # 309. is_eulerian_impl @@ -5076,14 +9427,27 @@ test_that("simple_cycles_impl errors", { test_that("is_eulerian_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_eulerian_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_eulerian_impl( + graph = g + )) + + # Structured tests + result <- is_eulerian_impl( + graph = g + ) + expect_type(result, "list") }) test_that("is_eulerian_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_eulerian_impl(NULL)) + expect_snapshot_igraph_error(is_eulerian_impl( + graph = NULL + )) }) # 310. eulerian_path_impl @@ -5091,14 +9455,27 @@ test_that("is_eulerian_impl errors", { test_that("eulerian_path_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(eulerian_path_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(eulerian_path_impl( + graph = g + )) + + # Structured tests + result <- eulerian_path_impl( + graph = g + ) + expect_type(result, "list") }) test_that("eulerian_path_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(eulerian_path_impl(NULL)) + expect_snapshot_igraph_error(eulerian_path_impl( + graph = NULL + )) }) # 311. eulerian_cycle_impl @@ -5106,16 +9483,34 @@ test_that("eulerian_path_impl errors", { test_that("eulerian_cycle_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g1 <- path_graph_impl(3) - expect_snapshot_igraph_error(eulerian_cycle_impl(g1)) - g2 <- cycle_graph_impl(4) - expect_snapshot(eulerian_cycle_impl(g2)) + g1 <- path_graph_impl( + n = 3 + ) + + expect_snapshot_igraph_error(eulerian_cycle_impl( + graph = g1 + )) + g2 <- cycle_graph_impl( + n = 4 + ) + + expect_snapshot(eulerian_cycle_impl( + graph = g2 + )) + + # Structured tests + result <- eulerian_cycle_impl( + graph = g2 + ) + expect_type(result, "list") }) test_that("eulerian_cycle_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(eulerian_cycle_impl(NULL)) + expect_snapshot_igraph_error(eulerian_cycle_impl( + graph = NULL + )) }) # 312. fundamental_cycles_impl @@ -5123,20 +9518,36 @@ test_that("eulerian_cycle_impl errors", { test_that("fundamental_cycles_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(fundamental_cycles_impl(g, start = 1)) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(fundamental_cycles_impl( - g, + graph = g, + start = 1 + )) + expect_snapshot(fundamental_cycles_impl( + graph = g, start = 1, bfs.cutoff = 2, weights = c(1, 2) )) + + # Structured tests + result <- fundamental_cycles_impl( + graph = g, + start = 1 + ) + expect_type(result, "list") }) test_that("fundamental_cycles_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(fundamental_cycles_impl(NULL, start = 1)) + expect_snapshot_igraph_error(fundamental_cycles_impl( + graph = NULL, + start = 1 + )) }) # 313. minimum_cycle_basis_impl @@ -5144,21 +9555,34 @@ test_that("fundamental_cycles_impl errors", { test_that("minimum_cycle_basis_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(minimum_cycle_basis_impl(g)) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(minimum_cycle_basis_impl( - g, + graph = g + )) + expect_snapshot(minimum_cycle_basis_impl( + graph = g, bfs.cutoff = 2, complete = FALSE, use.cycle.order = FALSE, weights = c(1, 2) )) + + # Structured tests + result <- minimum_cycle_basis_impl( + graph = g + ) + expect_type(result, "list") }) test_that("minimum_cycle_basis_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(minimum_cycle_basis_impl(NULL)) + expect_snapshot_igraph_error(minimum_cycle_basis_impl( + graph = NULL + )) }) # 314. is_tree_impl @@ -5166,15 +9590,32 @@ test_that("minimum_cycle_basis_impl errors", { test_that("is_tree_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_tree_impl(g)) - expect_snapshot(is_tree_impl(g, mode = "in", details = TRUE)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_tree_impl( + graph = g + )) + expect_snapshot(is_tree_impl( + graph = g, + mode = "in", + details = TRUE + )) + + # Structured tests + result <- is_tree_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("is_tree_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_tree_impl(NULL)) + expect_snapshot_igraph_error(is_tree_impl( + graph = NULL + )) }) # 315. is_forest_impl @@ -5182,15 +9623,32 @@ test_that("is_tree_impl errors", { test_that("is_forest_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_forest_impl(g)) - expect_snapshot(is_forest_impl(g, mode = "in", details = TRUE)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_forest_impl( + graph = g + )) + expect_snapshot(is_forest_impl( + graph = g, + mode = "in", + details = TRUE + )) + + # Structured tests + result <- is_forest_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("is_forest_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_forest_impl(NULL)) + expect_snapshot_igraph_error(is_forest_impl( + graph = NULL + )) }) # 316. from_prufer_impl @@ -5198,13 +9656,23 @@ test_that("is_forest_impl errors", { test_that("from_prufer_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(from_prufer_impl(1:2)) + expect_snapshot(from_prufer_impl( + prufer = 1:2 + )) + + # Structured tests + result <- from_prufer_impl( + prufer = 1:2 + ) + expect_s3_class(result, "igraph") }) test_that("from_prufer_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(from_prufer_impl("a")) + expect_snapshot_igraph_error(from_prufer_impl( + prufer = "a" + )) }) # 317. to_prufer_impl @@ -5212,14 +9680,27 @@ test_that("from_prufer_impl errors", { test_that("to_prufer_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(to_prufer_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(to_prufer_impl( + graph = g + )) + + # Structured tests + result <- to_prufer_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("to_prufer_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(to_prufer_impl(NULL)) + expect_snapshot_igraph_error(to_prufer_impl( + graph = NULL + )) }) # 318. tree_from_parent_vector_impl @@ -5227,14 +9708,27 @@ test_that("to_prufer_impl errors", { test_that("tree_from_parent_vector_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(tree_from_parent_vector_impl(c(-1, 1, 2, 3))) - expect_snapshot(tree_from_parent_vector_impl(c(-1, 1, 2, 3), type = "in")) + expect_snapshot(tree_from_parent_vector_impl( + parents = c(-1, 1, 2, 3) + )) + expect_snapshot(tree_from_parent_vector_impl( + parents = c(-1, 1, 2, 3), + type = "in" + )) + + # Structured tests + result <- tree_from_parent_vector_impl( + parents = c(-1, 1, 2, 3) + ) + expect_s3_class(result, "igraph") }) test_that("tree_from_parent_vector_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(tree_from_parent_vector_impl("a")) + expect_snapshot_igraph_error(tree_from_parent_vector_impl( + parents = "a" + )) }) # 319. is_complete_impl @@ -5242,14 +9736,27 @@ test_that("tree_from_parent_vector_impl errors", { test_that("is_complete_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_complete_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_complete_impl( + graph = g + )) + + # Structured tests + result <- is_complete_impl( + graph = g + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("is_complete_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_complete_impl(NULL)) + expect_snapshot_igraph_error(is_complete_impl( + graph = NULL + )) }) # 320. random_spanning_tree_impl @@ -5257,14 +9764,30 @@ test_that("is_complete_impl errors", { test_that("random_spanning_tree_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(random_spanning_tree_impl(g, vid = 1)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(random_spanning_tree_impl( + graph = g, + vid = 1 + )) + + # Structured tests + result <- random_spanning_tree_impl( + graph = g, + vid = 1 + ) + expect_s3_class(result, "igraph.es") }) test_that("random_spanning_tree_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(random_spanning_tree_impl(NULL, vid = 1)) + expect_snapshot_igraph_error(random_spanning_tree_impl( + graph = NULL, + vid = 1 + )) }) # 321. tree_game_impl @@ -5272,14 +9795,28 @@ test_that("random_spanning_tree_impl errors", { test_that("tree_game_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot(tree_game_impl(3)) - expect_snapshot(tree_game_impl(3, directed = TRUE, method = "lerw")) + expect_snapshot(tree_game_impl( + n = 3 + )) + expect_snapshot(tree_game_impl( + n = 3, + directed = TRUE, + method = "lerw" + )) + + # Structured tests + result <- tree_game_impl( + n = 3 + ) + expect_s3_class(result, "igraph") }) test_that("tree_game_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(tree_game_impl("a")) + expect_snapshot_igraph_error(tree_game_impl( + n = "a" + )) }) # 322. vertex_coloring_greedy_impl @@ -5287,15 +9824,31 @@ test_that("tree_game_impl errors", { test_that("vertex_coloring_greedy_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(vertex_coloring_greedy_impl(g)) - expect_snapshot(vertex_coloring_greedy_impl(g, heuristic = "dsatur")) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(vertex_coloring_greedy_impl( + graph = g + )) + expect_snapshot(vertex_coloring_greedy_impl( + graph = g, + heuristic = "dsatur" + )) + + # Structured tests + result <- vertex_coloring_greedy_impl( + graph = g + ) + expect_true(is.numeric(result)) }) test_that("vertex_coloring_greedy_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(vertex_coloring_greedy_impl(NULL)) + expect_snapshot_igraph_error(vertex_coloring_greedy_impl( + graph = NULL + )) }) # 323. is_vertex_coloring_impl @@ -5303,15 +9856,31 @@ test_that("vertex_coloring_greedy_impl errors", { test_that("is_vertex_coloring_impl basic", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_vertex_coloring_impl(g, types = c(1, 2, 3))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_vertex_coloring_impl( + graph = g, + types = c(1, 2, 3) + )) + + # Structured tests + result <- is_vertex_coloring_impl( + graph = g, + types = c(1, 2, 3) + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("is_vertex_coloring_impl errors", { withr::local_seed(20250909) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - is_vertex_coloring_impl(NULL, types = c(1, 2, 3)) + is_vertex_coloring_impl( + graph = NULL, + types = c(1, 2, 3) + ) ) }) @@ -5330,15 +9899,31 @@ test_that("is_vertex_coloring_impl errors", { test_that("is_bipartite_coloring_impl basic", { withr::local_seed(12345) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(is_bipartite_coloring_impl(g, types = c(TRUE, FALSE, TRUE))) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(is_bipartite_coloring_impl( + graph = g, + types = c(TRUE, FALSE, TRUE) + )) + + # Structured tests + result <- is_bipartite_coloring_impl( + graph = g, + types = c(TRUE, FALSE, TRUE) + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("is_bipartite_coloring_impl errors", { withr::local_seed(12345) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - is_bipartite_coloring_impl(NULL, types = c(TRUE, FALSE, TRUE)) + is_bipartite_coloring_impl( + graph = NULL, + types = c(TRUE, FALSE, TRUE) + ) ) }) @@ -5347,16 +9932,34 @@ test_that("is_bipartite_coloring_impl errors", { test_that("is_edge_coloring_impl basic", { withr::local_seed(12345) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) + g <- path_graph_impl( + n = 3 + ) + E(g)$color <- c(1, 2) - expect_snapshot(is_edge_coloring_impl(g, types = c(1, 2))) - expect_snapshot(is_edge_coloring_impl(g)) + expect_snapshot(is_edge_coloring_impl( + graph = g, + types = c(1, 2) + )) + expect_snapshot(is_edge_coloring_impl( + graph = g + )) + + # Structured tests + result <- is_edge_coloring_impl( + graph = g, + types = c(1, 2) + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("is_edge_coloring_impl errors", { withr::local_seed(12345) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(is_edge_coloring_impl(NULL, types = c(1, 2))) + expect_snapshot_igraph_error(is_edge_coloring_impl( + graph = NULL, + types = c(1, 2) + )) }) # 327. deterministic_optimal_imitation_impl @@ -5364,21 +9967,33 @@ test_that("is_edge_coloring_impl errors", { test_that("deterministic_optimal_imitation_impl basic", { withr::local_seed(12345) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(deterministic_optimal_imitation_impl( - g, - 1, + graph = g, + vid = 1, quantities = c(1, 2, 3), strategies = c(1, 2, 3) )) expect_snapshot(deterministic_optimal_imitation_impl( - g, - 1, + graph = g, + vid = 1, optimality = "minimum", quantities = c(1, 2, 3), strategies = c(1, 2, 3), mode = "in" )) + + # Structured tests + result <- deterministic_optimal_imitation_impl( + graph = g, + vid = 1, + quantities = c(1, 2, 3), + strategies = c(1, 2, 3) + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("deterministic_optimal_imitation_impl errors", { @@ -5386,8 +10001,8 @@ test_that("deterministic_optimal_imitation_impl errors", { local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( deterministic_optimal_imitation_impl( - NULL, - 1, + graph = NULL, + vid = 1, quantities = c(1, 2, 3), strategies = c(1, 2, 3) ) @@ -5399,21 +10014,38 @@ test_that("deterministic_optimal_imitation_impl errors", { test_that("moran_process_impl basic", { withr::local_seed(12345) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(moran_process_impl( - g, + graph = g, weights = c(1, 1), quantities = c(1, 2, 3), strategies = c(1, 2, 3), mode = "in" )) + + # Structured tests + result <- moran_process_impl( + graph = g, + weights = c(1, 1), + quantities = c(1, 2, 3), + strategies = c(1, 2, 3), + mode = "in" + ) + expect_type(result, "list") }) test_that("moran_process_impl errors", { withr::local_seed(12345) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - moran_process_impl(NULL, quantities = c(1, 2, 3), strategies = c(1, 2, 3)) + moran_process_impl( + graph = NULL, + quantities = c(1, 2, 3), + strategies = c(1, 2, 3) + ) ) }) @@ -5422,22 +10054,35 @@ test_that("moran_process_impl errors", { test_that("roulette_wheel_imitation_impl basic", { withr::local_seed(12345) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(roulette_wheel_imitation_impl( - g, - 1, - TRUE, + graph = g, + vid = 1, + is.local = TRUE, quantities = c(1, 2, 3), strategies = c(1, 2, 3) )) expect_snapshot(roulette_wheel_imitation_impl( - g, - 1, - FALSE, + graph = g, + vid = 1, + is.local = FALSE, quantities = c(1, 2, 3), strategies = c(1, 2, 3), mode = "in" )) + + # Structured tests + result <- roulette_wheel_imitation_impl( + graph = g, + vid = 1, + is.local = TRUE, + quantities = c(1, 2, 3), + strategies = c(1, 2, 3) + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("roulette_wheel_imitation_impl errors", { @@ -5445,9 +10090,9 @@ test_that("roulette_wheel_imitation_impl errors", { local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( roulette_wheel_imitation_impl( - NULL, - 1, - TRUE, + graph = NULL, + vid = 1, + is.local = TRUE, quantities = c(1, 2, 3), strategies = c(1, 2, 3) ) @@ -5459,22 +10104,35 @@ test_that("roulette_wheel_imitation_impl errors", { test_that("stochastic_imitation_impl basic", { withr::local_seed(12345) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(stochastic_imitation_impl( - g, - 1, + graph = g, + vid = 1, algo = 1, quantities = c(1, 2, 3), strategies = c(1, 2, 3) )) expect_snapshot(stochastic_imitation_impl( - g, - 1, + graph = g, + vid = 1, algo = 2, quantities = c(1, 2, 3), strategies = c(1, 2, 3), mode = "in" )) + + # Structured tests + result <- stochastic_imitation_impl( + graph = g, + vid = 1, + algo = 1, + quantities = c(1, 2, 3), + strategies = c(1, 2, 3) + ) + expect_true(is.numeric(result) || is.logical(result)) }) test_that("stochastic_imitation_impl errors", { @@ -5482,8 +10140,8 @@ test_that("stochastic_imitation_impl errors", { local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( stochastic_imitation_impl( - NULL, - 1, + graph = NULL, + vid = 1, algo = 1, quantities = c(1, 2, 3), strategies = c(1, 2, 3) @@ -5496,14 +10154,27 @@ test_that("stochastic_imitation_impl errors", { test_that("invalidate_cache_impl basic", { withr::local_seed(12345) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) - expect_snapshot(invalidate_cache_impl(g)) + g <- path_graph_impl( + n = 3 + ) + + expect_snapshot(invalidate_cache_impl( + graph = g + )) + + # Structured tests + result <- invalidate_cache_impl( + graph = g + ) + expect_s3_class(result, "igraph") }) test_that("invalidate_cache_impl errors", { withr::local_seed(12345) local_igraph_options(print.id = FALSE) - expect_snapshot_igraph_error(invalidate_cache_impl(NULL)) + expect_snapshot_igraph_error(invalidate_cache_impl( + graph = NULL + )) }) # 332. vertex_path_from_edge_path_impl @@ -5511,25 +10182,40 @@ test_that("invalidate_cache_impl errors", { test_that("vertex_path_from_edge_path_impl basic", { withr::local_seed(12345) local_igraph_options(print.id = FALSE) - g <- path_graph_impl(3) + g <- path_graph_impl( + n = 3 + ) + expect_snapshot(vertex_path_from_edge_path_impl( - g, + graph = g, start = 1, edge.path = c(1, 2) )) expect_snapshot(vertex_path_from_edge_path_impl( - g, + graph = g, start = 1, edge.path = c(1), mode = "in" )) + + # Structured tests + result <- vertex_path_from_edge_path_impl( + graph = g, + start = 1, + edge.path = c(1, 2) + ) + expect_s3_class(result, "igraph.vs") }) test_that("vertex_path_from_edge_path_impl errors", { withr::local_seed(12345) local_igraph_options(print.id = FALSE) expect_snapshot_igraph_error( - vertex_path_from_edge_path_impl(NULL, start = 1, edge.path = c(1, 2)) + vertex_path_from_edge_path_impl( + graph = NULL, + start = 1, + edge.path = c(1, 2) + ) ) }) @@ -5539,13 +10225,358 @@ test_that("version_impl basic", { withr::local_seed(12345) version_impl_clean <- function() { v <- version_impl() + paste(v$major, v$minor, v$subminor, sep = ".") } expect_snapshot(version_impl_clean()) + + # Structured tests + result <- version_impl_clean() + expect_type(result, "character") }) test_that("version_impl errors", { withr::local_seed(12345) # version_impl() has no parameters, so testing with invalid arguments - expect_snapshot_igraph_error(version_impl("invalid")) + expect_snapshot_igraph_error(version_impl( + "invalid" + )) +}) + +# 334. ecount_impl + +test_that("ecount_impl basic", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + g <- make_empty_graph(5) + expect_snapshot(ecount_impl( + graph = g + )) + + g <- make_graph(c(1, 2, 2, 3, 3, 4), n = 4, directed = TRUE) + expect_snapshot(ecount_impl( + graph = g + )) +}) + +test_that("ecount_impl errors", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + expect_snapshot_igraph_error(ecount_impl( + graph = NULL + )) +}) + +# 335. is_directed_impl + +test_that("is_directed_impl basic", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + g <- make_empty_graph(5, directed = TRUE) + expect_snapshot(is_directed_impl( + graph = g + )) + + g <- make_empty_graph(5, directed = FALSE) + expect_snapshot(is_directed_impl( + graph = g + )) +}) + +test_that("is_directed_impl errors", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + expect_snapshot_igraph_error(is_directed_impl( + graph = NULL + )) +}) + +# 336. edges_impl + +test_that("edges_impl basic", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + g <- make_graph(c(1, 2, 2, 3, 3, 4), n = 4, directed = TRUE) + + # Get all edges + expect_snapshot(edges_impl( + graph = g, + eids = E(g) + )) + + # Get specific edges + expect_snapshot(edges_impl( + graph = g, + eids = c(1, 3) + )) +}) + +test_that("edges_impl errors", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + expect_snapshot_igraph_error(edges_impl( + graph = NULL, + eids = 1 + )) +}) + +# 337. add_vertices_impl + +test_that("add_vertices_impl basic", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + g <- make_empty_graph(3) + + g_new <- add_vertices_impl( + graph = g, + nv = 2 + ) + expect_snapshot(vcount(g_new)) +}) + +test_that("add_vertices_impl errors", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + expect_snapshot_igraph_error(add_vertices_impl( + graph = NULL, + nv = 1 + )) +}) + +# 338. delete_edges_impl + +test_that("delete_edges_impl basic", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + g <- make_graph(c(1, 2, 2, 3, 3, 4), n = 4, directed = TRUE) + + g_new <- delete_edges_impl( + graph = g, + edges = c(1, 2) + ) + expect_snapshot(ecount(g_new)) +}) + +test_that("delete_edges_impl errors", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + expect_snapshot_igraph_error(delete_edges_impl( + graph = NULL, + edges = 1 + )) +}) + +# 339. delete_vertices_impl + +test_that("delete_vertices_impl basic", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + g <- make_graph(c(1, 2, 2, 3, 3, 4), n = 4, directed = TRUE) + + g_new <- delete_vertices_impl( + graph = g, + vertices = c(1, 3) + ) + expect_snapshot(vcount(g_new)) +}) + +test_that("delete_vertices_impl errors", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + expect_snapshot_igraph_error(delete_vertices_impl( + graph = NULL, + vertices = 1 + )) +}) + +# 340. incident_impl + +test_that("incident_impl basic", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE, return.vs.es = FALSE) + g <- make_graph(c(1, 2, 2, 3, 3, 1), n = 3, directed = TRUE) + + expect_snapshot(incident_impl( + graph = g, + vid = 2, + mode = "out" + )) + expect_snapshot(incident_impl( + graph = g, + vid = 2, + mode = "in" + )) + expect_snapshot(incident_impl( + graph = g, + vid = 2, + mode = "all" + )) +}) + +test_that("incident_impl errors", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + expect_snapshot_igraph_error(incident_impl( + graph = NULL, + vid = 1 + )) +}) + +test_that("famous_impl basic", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + expect_snapshot(famous_impl( + name = "Zachary" + )) +}) + +test_that("famous_impl errors", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + expect_snapshot_igraph_error(famous_impl( + name = "NonexistentGraph" + )) +}) + +# 342. constraint_impl + +test_that("constraint_impl basic", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + g <- make_graph(c(1, 2, 2, 3, 3, 1), n = 3, directed = FALSE) + result <- constraint_impl( + graph = g + ) + expect_length(result, 3) +}) + +test_that("constraint_impl errors", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + expect_snapshot_igraph_error(constraint_impl( + graph = NULL + )) +}) + +# 343. cocitation_impl + +test_that("cocitation_impl basic", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + g <- make_graph(c(1, 2, 1, 3, 2, 4, 3, 4), n = 4, directed = TRUE) + result <- cocitation_impl( + graph = g + ) + expect_true(is.matrix(result)) +}) + +test_that("cocitation_impl errors", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + expect_snapshot_igraph_error(cocitation_impl( + graph = NULL + )) +}) + +# 344. bibcoupling_impl + +test_that("bibcoupling_impl basic", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + g <- make_graph(c(1, 2, 1, 3, 2, 4, 3, 4), n = 4, directed = TRUE) + result <- bibcoupling_impl( + graph = g + ) + expect_true(is.matrix(result)) +}) + +test_that("bibcoupling_impl errors", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + expect_snapshot_igraph_error(bibcoupling_impl( + graph = NULL + )) +}) + +# 345. girth_impl + +test_that("girth_impl basic", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + g <- make_ring(5) + result <- girth_impl( + graph = g + ) + expect_snapshot(result$girth) +}) + +test_that("girth_impl errors", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + expect_snapshot_igraph_error(girth_impl( + graph = NULL + )) +}) + +# 346. coreness_impl + +test_that("coreness_impl basic", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + g <- make_graph(c(1, 2, 2, 3, 3, 1, 3, 4), n = 4, directed = FALSE) + expect_snapshot(coreness_impl( + graph = g + )) +}) + +test_that("coreness_impl errors", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + expect_snapshot_igraph_error(coreness_impl( + graph = NULL + )) +}) + +# 347. union_impl + +test_that("union_impl basic", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + g1 <- make_graph(c(1, 2, 2, 3), n = 3) + g2 <- make_graph(c(1, 3, 3, 4), n = 4) + expect_snapshot(union_impl( + left = g1, + right = g2 + )) +}) + +test_that("union_impl errors", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + expect_snapshot_igraph_error(union_impl( + left = NULL, + right = NULL + )) +}) + +# 348. intersection_impl + +test_that("intersection_impl basic", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + g1 <- make_graph(c(1, 2, 2, 3, 1, 3), n = 3) + g2 <- make_graph(c(1, 2, 2, 3), n = 3) + expect_snapshot(intersection_impl( + left = g1, + right = g2 + )) +}) + +test_that("intersection_impl errors", { + withr::local_seed(20250909) + local_igraph_options(print.id = FALSE) + expect_snapshot_igraph_error(intersection_impl( + left = NULL, + right = NULL + )) }) diff --git a/tests/testthat/test-centrality.R b/tests/testthat/test-centrality.R index 367e88e0248..41653455073 100644 --- a/tests/testthat/test-centrality.R +++ b/tests/testthat/test-centrality.R @@ -658,6 +658,22 @@ test_that("weighted sparse alpha_centrality() works", { expect_equal(ac3, c(vcount(star), 1, 1, 1, 1, 1, 1, 1, 1, 1)) }) +test_that("alpha_centrality() works with custom weight attribute names", { + star <- make_star(10) + E(star)$myweight <- sample(ecount(star)) + + # Test sparse version with custom attribute name + ac_sparse <- alpha_centrality(star, weights = "myweight", sparse = TRUE) + expect_equal(ac_sparse, c(46, 1, 1, 1, 1, 1, 1, 1, 1, 1)) + + # Test dense version with custom attribute name + ac_dense <- alpha_centrality(star, weights = "myweight", sparse = FALSE) + expect_equal(ac_dense, c(46, 1, 1, 1, 1, 1, 1, 1, 1, 1)) + + # Ensure both versions give the same result + expect_equal(ac_sparse, ac_dense) +}) + test_that("undirected alpha_centrality() works, #653", { g <- make_ring(10) diff --git a/tests/testthat/test-interface.R b/tests/testthat/test-interface.R index d1f5b10ecc1..0d331bda8fc 100644 --- a/tests/testthat/test-interface.R +++ b/tests/testthat/test-interface.R @@ -222,3 +222,29 @@ test_that("get_edge_id() errors correctly for wrong matrices", { mat <- matrix(c(1, 2, 1, 3, 1, 4), nrow = 2, ncol = 3) lifecycle::expect_deprecated(get_edge_ids(g, mat)) }) + +test_that("invalidate_cache works", { + g <- make_ring(10) + + # Cache is populated when calling is_simple() + expect_true(is_simple(g)) + + # Invalidate cache + result <- invalidate_cache(g) + + # Result should be the same after cache invalidation + expect_true(is_simple(result)) + + # Function should return a graph object + expect_true(is_igraph(result)) + + # Graph properties should be preserved + expect_equal(vcount(result), 10) + expect_equal(ecount(result), 10) +}) + +test_that("invalidate_cache errors on invalid input", { + expect_error(invalidate_cache(NULL)) + expect_error(invalidate_cache("not a graph")) + expect_error(invalidate_cache(123)) +}) diff --git a/tests/testthat/test-make.R b/tests/testthat/test-make.R index 9c20631df00..a9eb1a53d8c 100644 --- a/tests/testthat/test-make.R +++ b/tests/testthat/test-make.R @@ -339,6 +339,33 @@ test_that("make_chordal_ring works", { expect_equal(degree(chord), rep(6, 15)) }) +test_that("make_circulant works", { + # Test basic circulant graph with shift 1 (should be a ring) + circ <- make_circulant(10, c(1)) + ring <- make_ring(10) + expect_isomorphic(circ, ring) + + # Test circulant graph with multiple shifts + circ2 <- make_circulant(6, c(1, 2)) + expect_vcount(circ2, 6) + # Each vertex should be connected to vertices at distance 1 and 2 + # In undirected graph, degree should be 4 (2 neighbors on each side) + expect_equal(degree(circ2), rep(4, 6)) + + # Test directed circulant graph + circ_dir <- make_circulant(5, c(1, 2), directed = TRUE) + expect_true(is_directed(circ_dir)) + expect_vcount(circ_dir, 5) + # In directed graph, each vertex has out-degree 2 + expect_equal(degree(circ_dir, mode = "out"), rep(2, 5)) + expect_equal(degree(circ_dir, mode = "in"), rep(2, 5)) + + # Test empty shifts + circ_empty <- make_circulant(5, c()) + expect_vcount(circ_empty, 5) + expect_ecount(circ_empty, 0) +}) + test_that("make_line_graph works", { graph_ring_n5 <- make_ring(n = 5) graph_line_n5 <- make_line_graph(graph_ring_n5) @@ -497,3 +524,60 @@ test_that("graph_from_lcf() works", { g2 <- make_graph("Franklin") expect_isomorphic(g1, g2) }) + +test_that("make_full_multipartite() works", { + # Test basic multipartite graph + g <- make_full_multipartite(c(2, 3, 4)) + expect_vcount(g, 9) + expect_ecount(g, 2 * 3 + 2 * 4 + 3 * 4) + expect_true("type" %in% vertex_attr_names(g)) + expect_equal(V(g)$type, c(rep(1, 2), rep(2, 3), rep(3, 4))) + expect_false(is_directed(g)) + + # Test directed multipartite graph + g2 <- make_full_multipartite(c(2, 2), directed = TRUE, mode = "out") + expect_true(is_directed(g2)) + expect_ecount(g2, 4) + + # Test single partition (should have no edges) + g3 <- make_full_multipartite(5) + expect_vcount(g3, 5) + expect_ecount(g3, 0) + + # Test constructor spec form + g4 <- make_(full_multipartite(c(2, 3))) + expect_vcount(g4, 5) + expect_ecount(g4, 6) +}) + +test_that("make_turan() works", { + # Test basic Turán graph + g <- make_turan(10, 3) + expect_vcount(g, 10) + expect_true("type" %in% vertex_attr_names(g)) + expect_false(is_directed(g)) + + # Check partition sizes are balanced + types <- V(g)$type + sizes <- table(types) + expect_equal(max(sizes) - min(sizes), 1) # Should differ by at most 1 + + # Test with n divisible by r + g2 <- make_turan(9, 3) + types2 <- V(g2)$type + sizes2 <- table(types2) + expect_true(all(sizes2 == 3)) # All partitions should have size 3 + + # Test edge cases + g3 <- make_turan(5, 5) # r equals n + expect_vcount(g3, 5) + # When r equals n, each vertex is in its own partition, creating a complete graph + expect_ecount(g3, 10) # Complete graph K5 has 5*4/2 = 10 edges + + g4 <- make_turan(5, 1) # r = 1, single partition, no edges + expect_ecount(g4, 0) + + # Test constructor spec form + g5 <- make_(turan(10, 2)) + expect_vcount(g5, 10) +}) diff --git a/tests/testthat/test-operators.R b/tests/testthat/test-operators.R index afa804d5f16..d38e3ae5a1a 100644 --- a/tests/testthat/test-operators.R +++ b/tests/testthat/test-operators.R @@ -252,6 +252,28 @@ test_that("vertices() works", { expect_snapshot_error(make_empty_graph(1) + vertices("a", "b", foo = 5:7)) }) +test_that("vertices() errors on duplicate attribute names", { + # Test case from issue: vertices("a", name = "c") + expect_snapshot_error( + vertices("a", name = "c", name = "d") + ) + + # Test case from issue: vertices("a", blop = "c", blop = 1) + expect_snapshot_error( + vertices("a", blop = "c", blop = 1) + ) + + # Test with graph addition + expect_snapshot_error( + make_empty_graph(1) + vertices("a", "b", name = "c", name = "d") + ) + + # Test multiple duplicates + expect_snapshot_error( + vertices(foo = 1, foo = 2, bar = 3, bar = 4) + ) +}) + test_that("infix operators work", { g <- make_ring(10) V(g)$name <- letters[1:10] diff --git a/tests/testthat/test-structural-properties.R b/tests/testthat/test-structural-properties.R index f938d495dd0..422e615f969 100644 --- a/tests/testthat/test-structural-properties.R +++ b/tests/testthat/test-structural-properties.R @@ -72,6 +72,34 @@ test_that("max_degree() works", { expect_equal(max_degree(make_empty_graph()), 0) }) +test_that("mean_degree() works", { + # Undirected graph: formula is 2 * edges / vertices + g_undirected <- make_ring(10) + expect_equal(mean_degree(g_undirected), 2) + + # Directed graph: formula is edges / vertices + # This graph has edges 1->2, 2->2 (loop), 2->3, so 3 edges / 3 vertices = 1 + g_directed <- make_graph(c(1, 2, 2, 2, 2, 3), directed = TRUE) + expect_equal(mean_degree(g_directed), 1) + + # Test loops parameter: excluding the self-loop (2->2) + # Without loops: (3 edges - 1 loop) / 3 vertices = 2/3 + expect_equal(mean_degree(g_directed, loops = FALSE), 2 / 3) + + # Empty graph + expect_true(is.nan(mean_degree(make_empty_graph()))) + + # Compare with manual calculation for undirected graph + g_random <- sample_gnp(100, 0.05) + manual_mean <- 2 * ecount(g_random) / vcount(g_random) + expect_equal(mean_degree(g_random), manual_mean) + + # For directed graph + g_directed_random <- sample_gnp(100, 0.05, directed = TRUE) + manual_mean_dir <- ecount(g_directed_random) / vcount(g_directed_random) + expect_equal(mean_degree(g_directed_random), manual_mean_dir) +}) + test_that("BFS uses 1-based root vertex index", { g <- make_ring(3) expect_equal(bfs(g, root = 1)$root, 1) @@ -730,6 +758,50 @@ test_that("a null graph has zero components", { expect_equal(count_components(g), 0L) }) +test_that("count_reachable() works for directed graphs", { + # Directed path graph: 1 -> 2 -> 3 -> 4 -> 5 + g <- make_graph(~ 1 -+ 2 -+ 3 -+ 4 -+ 5) + + # Out mode: count vertices reachable via outgoing edges + out_counts <- count_reachable(g, mode = "out") + expect_equal(out_counts, c(5, 4, 3, 2, 1)) + + # In mode: count vertices from which current vertex is reachable + in_counts <- count_reachable(g, mode = "in") + expect_equal(in_counts, c(1, 2, 3, 4, 5)) + + # All mode: treat as undirected + all_counts <- count_reachable(g, mode = "all") + expect_equal(all_counts, rep(5, 5)) +}) + +test_that("count_reachable() works for undirected graphs", { + # Undirected path graph + g <- make_graph(~ 1 - 2 - 3 - 4 - 5) + + # All vertices are reachable from each other in an undirected path + counts <- count_reachable(g, mode = "out") + expect_equal(counts, rep(5, 5)) +}) + +test_that("count_reachable() works for graphs with multiple components", { + # Graph with three components: 1-2-3, 4-5, 6 + g <- make_graph(~ 1 - 2 - 3, 4 - 5, 6) + + counts <- count_reachable(g, mode = "all") + expect_equal(counts, c(3, 3, 3, 2, 2, 1)) +}) + +test_that("count_reachable() works for empty and single-vertex graphs", { + # Empty graph + g0 <- make_empty_graph(0) + expect_equal(count_reachable(g0, mode = "out"), integer(0)) + + # Single vertex + g1 <- make_empty_graph(1) + expect_equal(count_reachable(g1, mode = "out"), 1L) +}) + test_that("girth() works", { ## No circle in a tree g <- make_tree(1000, 3) @@ -891,6 +963,31 @@ test_that("any_multiple(), count_multiple(), which_multiple() works", { ) }) +test_that("any_loop(), which_loop(), count_loops() works", { + # Graph with loops + g <- make_graph(c(1, 1, 2, 2, 3, 3, 4, 5)) + expect_true(any_loop(g)) + expect_equal(which_loop(g), c(TRUE, TRUE, TRUE, FALSE)) + expect_equal(count_loops(g), 3) + + # Graph without loops + g2 <- make_graph(c(1, 2, 2, 3, 3, 4)) + expect_false(any_loop(g2)) + expect_equal(which_loop(g2), c(FALSE, FALSE, FALSE)) + expect_equal(count_loops(g2), 0) + + # Empty graph + g3 <- make_empty_graph(n = 5) + expect_false(any_loop(g3)) + expect_equal(count_loops(g3), 0) + + # Graph with only loops + g4 <- make_graph(c(1, 1, 2, 2, 3, 3)) + expect_true(any_loop(g4)) + expect_equal(which_loop(g4), c(TRUE, TRUE, TRUE)) + expect_equal(count_loops(g4), 3) +}) + test_that("edge_density works", { g <- sample_gnp(50, 4 / 50) gd <- edge_density(g) diff --git a/tests/testthat/test-topology.R b/tests/testthat/test-topology.R index 12dec658e91..5e19b5bcadb 100644 --- a/tests/testthat/test-topology.R +++ b/tests/testthat/test-topology.R @@ -361,3 +361,70 @@ test_that("subgraph_isomorphisms, vf2", { g3 <- graph_from_literal(X - Y - Z - X) expect_equal(subgraph_isomorphisms(g3, g1, method = "vf2"), list()) }) + +test_that("transitive_closure works for directed graphs", { + # Simple directed path + g <- make_graph(c(1, 2, 2, 3, 3, 4)) + tc <- transitive_closure(g) + + # Should have edges for all reachable pairs + expect_equal(vcount(tc), 4) + expect_equal(ecount(tc), 6) # 1->2, 1->3, 1->4, 2->3, 2->4, 3->4 + expect_true(are_adjacent(tc, 1, 2)) + expect_true(are_adjacent(tc, 1, 3)) + expect_true(are_adjacent(tc, 1, 4)) + expect_true(are_adjacent(tc, 2, 3)) + expect_true(are_adjacent(tc, 2, 4)) + expect_true(are_adjacent(tc, 3, 4)) + + # Check that reverse edges don't exist + expect_false(are_adjacent(tc, 2, 1)) + expect_false(are_adjacent(tc, 3, 1)) +}) + +test_that("transitive_closure works for undirected graphs", { + # Two disconnected components with 2 vertices each + g <- make_graph(c(1, 2, 3, 4), directed = FALSE) + tc <- transitive_closure(g) + + # Each 2-vertex component already forms a complete graph, + # so transitive closure doesn't add new edges + expect_equal(vcount(tc), 4) + expect_equal(ecount(tc), 2) # Same as input: one edge per 2-vertex component + expect_true(are_adjacent(tc, 1, 2)) + expect_true(are_adjacent(tc, 3, 4)) + expect_false(are_adjacent(tc, 1, 3)) + expect_false(are_adjacent(tc, 1, 4)) + + # Test with a path that needs closure + g2 <- make_graph(c(1, 2, 2, 3), directed = FALSE) + tc2 <- transitive_closure(g2) + + # Should create a complete graph (triangle) + expect_equal(vcount(tc2), 3) + expect_equal(ecount(tc2), 3) # Complete graph on 3 vertices + expect_true(are_adjacent(tc2, 1, 2)) + expect_true(are_adjacent(tc2, 2, 3)) + expect_true(are_adjacent(tc2, 1, 3)) # This edge is added by closure +}) + +test_that("transitive_closure handles graphs with cycles", { + # Directed cycle + g <- make_graph(c(1, 2, 2, 3, 3, 1)) + tc <- transitive_closure(g) + + # Should be fully connected + expect_equal(vcount(tc), 3) + expect_equal(ecount(tc), 6) # Complete directed graph on 3 vertices +}) + +test_that("transitive_closure preserves isolated vertices", { + # Graph with isolated vertex + g <- make_graph(c(1, 2, 2, 3), n = 5) + tc <- transitive_closure(g) + + # Isolated vertices should remain + expect_equal(vcount(tc), 5) + expect_equal(degree(tc, 4, mode = "all"), 0) + expect_equal(degree(tc, 5, mode = "all"), 0) +}) diff --git a/tests/testthat/test-utils-assert-args.R b/tests/testthat/test-utils-assert-args.R index 0c5f88f7745..a2984d3a94b 100644 --- a/tests/testthat/test-utils-assert-args.R +++ b/tests/testthat/test-utils-assert-args.R @@ -6,7 +6,7 @@ test_that("ensure_igraph() works", { expect_silent(ensure_igraph(NULL, optional = TRUE)) }) -test_that("igraph.match.arg() works", { +test_that("igraph_match_arg() works", { expect_snapshot( cluster_leiden(make_graph("Zachary"), objective_function = "something"), error = TRUE diff --git a/tests/testthat/testthat-problems.rds b/tests/testthat/testthat-problems.rds deleted file mode 100644 index dc012c529b2df219e29245e5621453ade9a333e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52682 zcmYJadt8j`7dE~(8`zO|5w1G zqXk{x8}`_JNu-_Co3C!iUtaHhBC#!lk|h%AX*@DTYTA$S9H8_ zz>c?gCTN3C@$TiWTXQy~8);~1uXJ767kex?*eUpBwJquWzxNycRz40PcJ_X4@B995 z$eUZA?hm~Nliwc(&PjgmGwtlZzJK4Xf>apupH!WGI z^PxfP)e^yor!D-K2(c6wM}1%3GWsS&~BKPf5LC=KUDGEt#Pt{$fLlc z*)QRST>w&Yz^vW0ahaE=Us1(RSKrl>-_yf(Y2PlNG!K~={Pw?w`h0);*2yrxn%5O4 zFA8WpqWYPziSg9ug}u8i*G!!b4#uFGbVE8ZqA6A;-O{nIw4VHQTT7bibG_}_9byK}F* zpQYUw#u2X?eq?dkj@<8ffWx0uHtm0qr^JUTgJ*xk6RmK={3H>#<)VQ5 zF7IN7w9xJRnLoRQIhXuZ_XHd6UNUh)ySrk@=1yNM-tp956CBH$r#km9jnC8WUDy2a zPR#=C719YES}CsY(dzl*`CI8{vrMzY50$~p|* zV+%WF^G%g%g36!ozvw)woVx$%SeMC?l>C)zYxhi@D_QYt>U2PWL3Z7T8RYEdC-hx+ zqwcFOTa?S%u_1q?GCyE#^X}c*W)TtZB#%B9R=D?D7FUEtR6VRvJJNN~)hos=k)OA~ zPs4QOilP!{;=Pr^E!9DeFHCk^uoG^o`L^`GyfSw%o+?{nsbRLNlJ?*fPGlZ$?#(>g?mqS0&w6F`j;5(d;it#Wx_jS zTJfYkoZLWa_08M{HFEg zsqeS+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CS`We+nO)FC+ zD;x$TE0Q^246MR~_Z0Z5ttCFw((ZEJ-$ndmU|H%bd97=u!Z}M2@#S}J#KnhO8l#X4 z*O9>Im2PQrsSv7rm|yjd(#vVf;oPffdB0uT!(8!Z<6RH#M&Fg#eKx*UMf11!$7c6+ zvyZ0y#E43%b((J85p=`?`T{tpmSr=qkiFjOz!EJ!AsvB9=}jG>xAq3y+hsphecP@6 zuxJK%`5F-Kx|cnO=lRqVlPccVu2c6MR@ELX^fSFo?HV3n^}f-iaxvEMiP z8LlX{L~!@kcjcPS{L5<12Gfry_B|Y5rE1{!CAgvZcVGHh^=4P-k18il@>1|uJl*wn oE>u*1j!>V5^Xy9S3wHX_lp)z`-CL{J%`haGTl}yxT-OV diff --git a/tools/ensure-impl-named.R b/tools/ensure-impl-named.R new file mode 100644 index 00000000000..ec4df2e69ab --- /dev/null +++ b/tools/ensure-impl-named.R @@ -0,0 +1,73 @@ +source_files <- + fs::dir_ls("R", glob = "*.R") |> + setdiff("R/aaa-auto.R") + +test_file <- "tests/testthat/test-aaa-auto.R" + +all_files <- c(source_files, test_file) + +# all_files <- test_file + +# all_files <- all_files[1:10] + +pkgload::load_all() +library(tidyverse) + +for (file in all_files) { + cat(sprintf("Processing %s...\n", file)) + + text <- readLines(file) + + data <- + parse(text = text, keep.source = TRUE) |> + utils::getParseData(includeText = TRUE) |> + as_tibble() + + parents <- + data |> + filter(token == "expr", str_detect(text, "_impl$")) |> + filter(row_number() == 1, .by = line1) + + repl_data <- + data[match(parents$parent, data$id), ] |> + mutate(fun = !!parents$text) |> + arrange(desc(line2), desc(col2)) + + for (i in seq_len(nrow(repl_data))) { + repl_line <- repl_data[i, ] + + sub_expr <- parse(text = repl_line$text)[[1]] + print(sub_expr) + + func_def <- get(repl_line$fun, envir = asNamespace("igraph")) + + matched_call <- tryCatch( + rlang::call_match( + sub_expr, + func_def, + dots_expand = FALSE + ), + error = function(e) { + cat("Failed to match call for ", repl_line$fun, "\n") + cat("Original call:\n") + print(sub_expr) + cat("Function definition:\n") + print(func_def) + sub_expr + } + ) + + deparsed <- deparse(matched_call, width.cutoff = 20) + deparsed[[1]] <- sub("(", "(\n ", deparsed[[1]], fixed = TRUE) + print(deparsed) + + # Splice + text <- c( + text[seq2(1, repl_line$line1 - 1)], + paste0(str_sub(text[repl_line$line1], 1, repl_line$col1 - 1), paste(deparsed, collapse = "\n"), str_sub(text[repl_line$line2], repl_line$col2 + 1)), + text[seq2(repl_line$line2 + 1, length(text))] + ) + } + + writeLines(text, con = file) +} diff --git a/tools/py-stimulus/src/stimulus/generators/r.py b/tools/py-stimulus/src/stimulus/generators/r.py index c7101fb12f0..630a963b059 100644 --- a/tools/py-stimulus/src/stimulus/generators/r.py +++ b/tools/py-stimulus/src/stimulus/generators/r.py @@ -60,7 +60,7 @@ def format_switch_statement(code: str) -> str: switch_pattern = r'(switch\([^,]+)(,\s*)([^)]+)(\))' def format_switch_args(match): - prefix = match.group(1) # "switch(igraph.match.arg(mode)" + prefix = match.group(1) # "switch(igraph_match_arg(mode)" comma = match.group(2) # "," args = match.group(3) # the key-value pairs suffix = match.group(4) # ")" @@ -457,6 +457,7 @@ def generate_function(self, function: str, out: IO[str]) -> None: res["inconv"] = self.chunk_inconv(desc) res["call"] = self.chunk_call(desc) res["outconv"] = self.chunk_outconv(desc) + res["ret"] = self.chunk_ret(desc) # Replace into the template text = ( @@ -474,8 +475,7 @@ def generate_function(self, function: str, out: IO[str]) -> None: /* Convert output */ %(outconv)s - UNPROTECT(1); - return(r_result); +%(ret)s }\n""" % res ) @@ -501,6 +501,8 @@ def do_par(spec: ParamSpec) -> str: inout = [do_par(spec) for spec in desc.iter_input_parameters()] inout = ["SEXP " + n for n in inout if n != ""] + + # cpp11 requires an SEXP return value return "SEXP R_" + desc.name + "(" + (", ".join(inout) or "void") + ")" def chunk_declaration(self, desc: FunctionDescriptor) -> str: @@ -531,9 +533,14 @@ def do_par(spec: ParamSpec) -> str: retpars = [spec.name for spec in desc.iter_output_parameters()] return_type_desc = self.get_type_descriptor(desc.return_type) - retdecl = return_type_desc.declare_c_variable("c_result") if not retpars else "" + if retpars or return_type_desc.name in ("VOID", "ERROR"): + retdecl = "" + else: + retdecl = return_type_desc.declare_c_variable("c_result") - if len(retpars) <= 1: + if len(retpars) == 0 and desc.return_type == "ERROR": + res = "\n".join(inout + out + [retdecl]) + elif len(retpars) <= 1: res = "\n".join(inout + out + [retdecl] + ["SEXP r_result;"]) else: res = "\n".join(inout + out + [retdecl] + ["SEXP r_result, r_names;"]) @@ -620,7 +627,7 @@ def chunk_call(self, desc: FunctionDescriptor) -> str: return res - def chunk_outconv(self, spec: FunctionDescriptor) -> str: + def chunk_outconv(self, desc: FunctionDescriptor) -> str: """The output conversions, this is quite difficult. A function may report its results in two ways: by returning it directly or by setting a variable to which a pointer was passed. igraph @@ -655,20 +662,20 @@ def do_par(param: ParamSpec) -> str: return outconv.replace("%C%", cname).replace("%I%", param.name) - outconv = [do_par(param) for param in spec.iter_parameters()] + outconv = [do_par(param) for param in desc.iter_parameters()] outconv = [o for o in outconv if o != ""] # Consider only those parameters that have a corresponding declaration # in C. retpars = [] - for param in spec.iter_output_parameters(): + for param in desc.iter_output_parameters(): type_desc = self.get_type_descriptor(param.type) if type_desc.get_c_type(param.mode) is not None: retpars.append(param) if not retpars: # return the return value of the function - rt = self.get_type_descriptor(spec.return_type) + rt = self.get_type_descriptor(desc.return_type) retconv = indent(rt.get_output_conversion_template_for(ParamMode.OUT)) retconv = retconv.replace("%C%", "c_result").replace("%I%", "r_result") ret = "\n".join(outconv) + "\n" + retconv @@ -699,6 +706,16 @@ def do_par(param: ParamSpec) -> str: return ret + def chunk_ret(self, desc: FunctionDescriptor) -> str: + """Create the return statement. Only unprotect and return if one or more output arguments. + """ + + if len(list(desc.iter_output_parameters())) == 0 and desc.return_type == "ERROR": + # cpp11 requires an SEXP return value + return " return(R_NilValue);" + + return " UNPROTECT(1);\n return(r_result);" + class RInitCodeGenerator(BlockBasedCodeGenerator): def _count_arguments(self, name: str) -> Tuple[int, int]: diff --git a/tools/stimulus/functions-R.yaml b/tools/stimulus/functions-R.yaml index f88aaa9f1aa..7470eaf8f5d 100644 --- a/tools/stimulus/functions-R.yaml +++ b/tools/stimulus/functions-R.yaml @@ -15,19 +15,14 @@ igraph_empty_attrs: IGNORE: RR, RC igraph_add_vertices: - IGNORE: RR, RC, RInit igraph_delete_edges: - IGNORE: RR, RC igraph_delete_vertices: - IGNORE: RR, RC igraph_ecount: - IGNORE: RR, RC igraph_is_directed: - IGNORE: RR, RC igraph_degree: @@ -35,7 +30,6 @@ igraph_edge: IGNORE: RR, RC, RInit igraph_edges: - IGNORE: RR, RC igraph_get_eid: IGNORE: RR, RC, RInit @@ -51,7 +45,6 @@ igraph_get_all_eids_between: DEPS: from ON graph, to ON graph, eids ON graph igraph_incident: - IGNORE: RR, RC igraph_is_same_graph: IGNORE: RR, RC, RInit @@ -97,7 +90,12 @@ igraph_connect_neighborhood: IGNORE: RR, RC igraph_famous: - IGNORE: RR, RC + +igraph_circulant: + R: + GATTR: + name: Circulant graph + GATTR-PARAM: shifts igraph_lcf_vector: R: @@ -119,6 +117,20 @@ igraph_realize_bipartite_degree_sequence: name: Bipartite graph from degree sequence GATTR-PARAM: degrees1, degrees2, allowed_edge_types, method +igraph_full_multipartite: + DEPS: types ON res$graph + R: + GATTR: + name: Full multipartite graph + GATTR-PARAM: n, mode + +igraph_turan: + DEPS: types ON res$graph + R: + GATTR: + name: Turan graph + GATTR-PARAM: n, r + # TODO: temporarily disabled igraph_weighted_sparsemat: IGNORE: RR, RC @@ -354,7 +366,9 @@ igraph_personalized_pagerank_vs: options ON algo, reset_vids ON graph igraph_rewire: - IGNORE: RR, RC + R: + DEFAULTS: + mode: 0L igraph_average_path_length: IGNORE: RR, RC, RInit @@ -367,7 +381,6 @@ igraph_average_path_length_dijkstra: unconn: unconnected igraph_constraint: - IGNORE: RR, RC igraph_maxdegree: PARAM_ORDER: graph, *, vids, ... @@ -384,7 +397,6 @@ igraph_neighborhood_graphs: IGNORE: RR, RC igraph_topological_sorting: - IGNORE: RR, RC igraph_is_loop: PARAM_NAMES: @@ -399,7 +411,6 @@ igraph_count_multiple: es: eids igraph_girth: - IGNORE: RR, RC, RInit igraph_add_edge: IGNORE: RR, RC, RInit @@ -590,7 +601,6 @@ igraph_maximal_cliques_callback: IGNORE: RR, RC, RInit igraph_maximal_cliques_count: - IGNORE: RR, RC, RInit igraph_maximal_cliques_file: IGNORE: RR, RC, RInit @@ -604,13 +614,10 @@ igraph_independent_vertex_sets: IGNORE: RR, RC igraph_largest_independent_vertex_sets: - IGNORE: RR, RC igraph_maximal_independent_vertex_sets: - IGNORE: RR, RC igraph_independence_number: - IGNORE: RR, RC ####################################### # Layouts @@ -654,10 +661,8 @@ igraph_layout_merge_dla: ####################################### igraph_cocitation: - IGNORE: RR, RC igraph_bibcoupling: - IGNORE: RR, RC ####################################### # Community structure @@ -706,10 +711,8 @@ igraph_graphlets: IGNORE: RC igraph_graphlets_candidate_basis: - IGNORE: RR, RC igraph_graphlets_project: - IGNORE: RR, RC, RInit ####################################### # Hierarchical random graphs @@ -735,7 +738,6 @@ igraph_get_adjacency: igraph_get_edgelist: - IGNORE: RR, RC igraph_to_directed: PARAMS: INOUT GRAPH graph, TODIRECTED mode=MUTUAL @@ -754,26 +756,20 @@ igraph_read_graph_lgl: IGNORE: RR, RC igraph_read_graph_pajek: - IGNORE: RR, RC igraph_read_graph_graphml: - IGNORE: RR, RC # TODO: temporarily disabled igraph_read_graph_dimacs_flow: IGNORE: RR, RC igraph_read_graph_graphdb: - IGNORE: RR, RC igraph_read_graph_gml: - IGNORE: RR, RC igraph_read_graph_dl: - IGNORE: RR, RC igraph_write_graph_edgelist: - IGNORE: RR, RC igraph_write_graph_ncol: IGNORE: RR, RC @@ -782,13 +778,10 @@ igraph_write_graph_lgl: IGNORE: RR, RC igraph_write_graph_leda: - IGNORE: RR, RC igraph_write_graph_graphml: - IGNORE: RR, RC igraph_write_graph_pajek: - IGNORE: RR, RC # TODO: temporarily disabled igraph_write_graph_dimacs_flow: @@ -797,11 +790,7 @@ igraph_write_graph_dimacs_flow: INOUT GRAPH graph, OUTFILE outstream, VERTEX source=0, VERTEX target=0, VECTOR capacity -igraph_write_graph_gml: - IGNORE: RR, RC - igraph_write_graph_dot: - IGNORE: RR, RC ####################################### # Motifs @@ -812,31 +801,25 @@ igraph_write_graph_dot: ####################################### igraph_disjoint_union: - IGNORE: RR, RC, RInit igraph_disjoint_union_many: IGNORE: RR, RC, RInit igraph_union: - IGNORE: RR, RC igraph_union_many: IGNORE: RR, RC, RInit igraph_intersection: - IGNORE: RR, RC igraph_intersection_many: IGNORE: RR, RC, RInit igraph_difference: - IGNORE: RR, RC igraph_complementer: - IGNORE: RR, RC igraph_compose: - IGNORE: RR, RC, RInit ####################################### # Maximum flows, minimum cuts @@ -846,10 +829,8 @@ igraph_maxflow_value: IGNORE: RR, RC, RInit igraph_mincut: - IGNORE: RR, RC igraph_mincut_value: - IGNORE: RR, RC igraph_st_mincut_value: IGNORE: RR, RC @@ -858,13 +839,11 @@ igraph_st_vertex_connectivity: IGNORE: RR, RC, RInit igraph_vertex_connectivity: - IGNORE: RR, RC igraph_st_edge_connectivity: IGNORE: RR, RC igraph_edge_connectivity: - IGNORE: RR, RC igraph_edge_disjoint_paths: IGNORE: RR, RC @@ -873,17 +852,14 @@ igraph_vertex_disjoint_paths: IGNORE: RR, RC igraph_adhesion: - IGNORE: RR, RC igraph_cohesion: - IGNORE: RR, RC ####################################### # Listing s-t cuts, separators ####################################### igraph_cohesive_blocks: - IGNORE: RR, RC R: CLASS: cohesiveBlocks @@ -892,7 +868,6 @@ igraph_cohesive_blocks: ####################################### igraph_coreness: - IGNORE: RR, RC ####################################### # Graph isomorphism @@ -947,7 +922,6 @@ igraph_sir: ####################################### igraph_running_mean: - IGNORE: RR, RC igraph_random_sample: IGNORE: RR, RC @@ -1014,10 +988,8 @@ igraph_minimum_spanning_tree: IGNORE: RR, RC, RInit igraph_minimum_spanning_tree_unweighted: - IGNORE: RR, RC igraph_minimum_spanning_tree_prim: - IGNORE: RR, RC igraph_random_spanning_tree: PARAMS: GRAPH graph, OUT EDGE_INDICES res, OPTIONAL VERTEX vid=0 diff --git a/tools/stimulus/types-RC.yaml b/tools/stimulus/types-RC.yaml index 7255680cf41..29f55765538 100644 --- a/tools/stimulus/types-RC.yaml +++ b/tools/stimulus/types-RC.yaml @@ -69,11 +69,20 @@ CSTRING: INOUT: '&%C%' INCONV: IN: |- - %C% = Rf_translateCharUTF8(%I%); + %C% = Rf_translateCharUTF8(STRING_ELT(%I%, 0)); OUTCONV: OUT: |- PROTECT(%I% = Rf_ScalarString(Rf_mkCharLenCE(%C%, strlen(%C%), CE_UTF8))); +INFILE: + CTYPE: FILE* + CALL: + IN: '%C%' + INCONV: + IN: |- + %C% = R_igraph_fopen_read(%I%); + IGRAPH_FINALLY(fclose, %C%); + REAL: CTYPE: igraph_real_t CALL: @@ -104,9 +113,6 @@ BOOLEAN: PROTECT(%I%=NEW_LOGICAL(1)); LOGICAL(%I%)[0]=%C%; -ERROR: - CTYPE: igraph_error_t - INDEX_VECTOR: CALL: '&%C%' CTYPE: igraph_vector_int_t @@ -183,7 +189,16 @@ MATRIX_LIST: CALL: '&%C%' CTYPE: igraph_matrix_list_t INCONV: - IN: R_igraph_SEXP_to_matrixlist(%I%, &%C%); + IN: |- + R_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%)); + igraph_matrix_list_destroy(&%C%); + IGRAPH_FINALLY_CLEAN(1); VECTOR_LIST: CALL: '&%C%' @@ -569,7 +584,7 @@ ARPACKOPT: INCONV: INOUT: R_SEXP_to_igraph_arpack_options(%I%, &%C%); OUTCONV: - INOUT: PROTECT(%I%=R_igraph_arpack_options_to_SEXP(&%C%)); + INOUT: PROTECT(%I%=Rx_igraph_arpack_options_to_SEXP(&%C%)); ARPACKSTORAGE: CALL: '0' @@ -886,7 +901,7 @@ PAGERANKOPT: OUTCONV: INOUT: |- if (%C1% == IGRAPH_PAGERANK_ALGO_ARPACK) { - PROTECT(%I% = R_igraph_arpack_options_to_SEXP(&%C%1)); + PROTECT(%I% = Rx_igraph_arpack_options_to_SEXP(&%C%1)); } else { PROTECT(%I%); } diff --git a/tools/stimulus/types-RR.yaml b/tools/stimulus/types-RR.yaml index 7ce22d4d356..7e415b49a16 100644 --- a/tools/stimulus/types-RR.yaml +++ b/tools/stimulus/types-RR.yaml @@ -2,6 +2,10 @@ GRAPH: INCONV: ensure_igraph(%I%) +INFILE: + INCONV: | + check_string(%I%) + INTEGER: DEFAULT: FINEITER: max(10, log2(vcount(graph))) @@ -374,6 +378,11 @@ RECIP: DEFAULT: c("default", "ratio") INCONV: '%I% <- switch_igraph_arg(%I%, "default" = 0L, "ratio" = 1L)' +REWIRING_MODE: + DEFAULT: + SIMPLE: c("simple", "simple_loops") + INCONV: '%I% <- switch_igraph_arg(%I%, "simple" = 0L, "simple_loops" = 1L)' + SPARSEMAT: INCONV: requireNamespace("Matrix", quietly = TRUE); %I% <- as(as(as(%I%, "dMatrix"), "generalMatrix"), "CsparseMatrix") @@ -476,6 +485,11 @@ EDGE_TYPE_SW: %I% <- switch_igraph_arg(%I%, "simple" = 0L, "loop" = 1L, "loops" = 1L, "multi" = 6L, "multiple" = 6L, "all" = 7L) +WRITE_GML_SW: + DEFAULT: + DEFAULT: c("default", "encode_only_quot") + INCONV: '%I% <- switch_igraph_arg(%I%, "default" = 0L, "encode_only_quot" = 1L)' + GRAPH_PRODUCT_TYPE: DEFAULT: CARTESIAN: c("cartesian", "lexicographic", "strong", "tensor", "modular")