diff --git a/R/make.R b/R/make.R index b538de64b13..26108f57c3a 100644 --- a/R/make.R +++ b/R/make.R @@ -1698,7 +1698,11 @@ empty_graph <- function(n = 0, directed = TRUE) { #' all arguments are passed to `graph_from_literal()`. #' @param simplify Logical scalar, whether to call [simplify()] #' on the created graph. By default the graph is simplified, loop and -#' multiple edges are removed. +#' multiple edges are removed. [simplify()] is only called when the +#' created graph is not already simple, so the edge order from the +#' formula is preserved whenever no loops or multi-edges are present. +#' When the graph does contain loops or multi-edges (and `simplify = +#' TRUE`), [simplify()] reorders the edges into its canonical order. #' @return An igraph graph #' #' @family deterministic constructors diff --git a/R/simple.R b/R/simple.R index c2de4f1fdbb..dcc91205422 100644 --- a/R/simple.R +++ b/R/simple.R @@ -50,7 +50,8 @@ is.simple <- function(graph) { #' #' `simplify()` removes the loop and/or multiple edges from a graph. If #' both `remove.loops` and `remove.multiple` are `TRUE` the -#' function returns a simple graph. +#' function returns a simple graph. If the graph is already simple, it is +#' returned unchanged. #' #' `simplify_and_colorize()` constructs a new, simple graph from a graph and #' also sets a `color` attribute on both the vertices and the edges. @@ -71,7 +72,8 @@ is.simple <- function(graph) { #' `remove.multiple=TRUE`. In this case many edges might be mapped to a #' single one in the new graph, and their attributes are combined. Please see #' [attribute.combination()] for details on this. -#' @return a new graph object with the edges deleted. +#' @return a graph object with the loop and/or multiple edges removed; the +#' input graph is returned unchanged if it is already simple. #' @author Gabor Csardi \email{csardi.gabor@@gmail.com} #' @seealso [which_loop()], [which_multiple()] and #' [count_multiple()], [delete_edges()], @@ -94,6 +96,14 @@ simplify <- function( remove.loops = TRUE, edge.attr.comb = igraph_opt("edge.attr.comb") ) { + # A graph that is already simple has no loops and no multiple edges, so + # simplify_impl() would not change its structure regardless of the + # remove.* / edge.attr.comb arguments. Short-circuiting here avoids the + # cost of rebuilding the graph in the (common) already-simple case; + # is_simple() is orders of magnitude cheaper than simplify(). + if (is_simple(graph)) { + return(graph) + } simplify_impl( graph = graph, remove_multiple = remove.multiple, diff --git a/man/alpha.centrality.Rd b/man/alpha.centrality.Rd index 06576dd5f4b..401887b5b9b 100644 --- a/man/alpha.centrality.Rd +++ b/man/alpha.centrality.Rd @@ -55,7 +55,7 @@ support} consistent API. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency}{\code{get_adjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency_sparse}{\code{get_adjacency_sparse()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency}{\code{get_adjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency_sparse}{\code{get_adjacency_sparse()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} } \keyword{internal} diff --git a/man/alpha_centrality.Rd b/man/alpha_centrality.Rd index f9c415130a1..ece056ed87a 100644 --- a/man/alpha_centrality.Rd +++ b/man/alpha_centrality.Rd @@ -74,7 +74,7 @@ algorithm, the routine may fail is certain cases. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency}{\code{get_adjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency_sparse}{\code{get_adjacency_sparse()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency}{\code{get_adjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency_sparse}{\code{get_adjacency_sparse()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} } \examples{ diff --git a/man/as.igraph.Rd b/man/as.igraph.Rd index 794b14f1031..6cd869be514 100644 --- a/man/as.igraph.Rd +++ b/man/as.igraph.Rd @@ -25,7 +25,7 @@ These objects are created by the \code{\link[=fit_hrg]{fit_hrg()}} and \code{\link[=consensus_tree]{consensus_tree()}} functions. } } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}} } \examples{ diff --git a/man/bonpow.Rd b/man/bonpow.Rd index 521a629586a..3b440ded94d 100644 --- a/man/bonpow.Rd +++ b/man/bonpow.Rd @@ -44,7 +44,7 @@ support} consistent API. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_degree}{\code{degree()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency}{\code{get_adjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency_sparse}{\code{get_adjacency_sparse()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_degree}{\code{degree()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency}{\code{get_adjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency_sparse}{\code{get_adjacency_sparse()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} } \keyword{internal} diff --git a/man/dot-apply_modifiers.Rd b/man/dot-apply_modifiers.Rd index 9a40faea4e9..99caccbb444 100644 --- a/man/dot-apply_modifiers.Rd +++ b/man/dot-apply_modifiers.Rd @@ -19,7 +19,7 @@ This is a helper function for the common parts of \code{make_()} and \code{sample_()}. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} } \keyword{internal} diff --git a/man/from_incidence_matrix.Rd b/man/from_incidence_matrix.Rd index 2f2294fc343..725efe0bb5f 100644 --- a/man/from_incidence_matrix.Rd +++ b/man/from_incidence_matrix.Rd @@ -18,7 +18,7 @@ Some authors refer to the bipartite adjacency matrix as the this naming to avoid confusion with the edge-vertex incidence matrix. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Bipartite.html#igraph_biadjacency}{\code{biadjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Bipartite.html#igraph_biadjacency}{\code{biadjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} } \keyword{internal} diff --git a/man/graph.Rd b/man/graph.Rd index 9b48a955567..0b116120272 100644 --- a/man/graph.Rd +++ b/man/graph.Rd @@ -59,7 +59,7 @@ Do not give both of them.} consistent API. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}} } \keyword{internal} diff --git a/man/graph.adjacency.Rd b/man/graph.adjacency.Rd index 0c91cc2d348..0ee561f3139 100644 --- a/man/graph.adjacency.Rd +++ b/man/graph.adjacency.Rd @@ -55,7 +55,7 @@ former is ignored.} consistent API. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_adjacency}{\code{adjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_weighted_adjacency}{\code{weighted_adjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_adjacency}{\code{adjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_weighted_adjacency}{\code{weighted_adjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} } \keyword{internal} diff --git a/man/graph.edgelist.Rd b/man/graph.edgelist.Rd index d1b9690ed6f..df5d093e878 100644 --- a/man/graph.edgelist.Rd +++ b/man/graph.edgelist.Rd @@ -18,7 +18,7 @@ graph.edgelist(el, directed = TRUE) consistent API. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}} } \keyword{internal} diff --git a/man/graph.famous.Rd b/man/graph.famous.Rd index 9469016b8e1..b6212968c8c 100644 --- a/man/graph.famous.Rd +++ b/man/graph.famous.Rd @@ -59,7 +59,7 @@ Do not give both of them.} consistent API. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}} } \keyword{internal} diff --git a/man/graph.formula.Rd b/man/graph.formula.Rd index 024b15a5574..55578421f35 100644 --- a/man/graph.formula.Rd +++ b/man/graph.formula.Rd @@ -13,7 +13,10 @@ all arguments are passed to \code{graph_from_literal()}.} \item{simplify}{Logical scalar, whether to call \code{\link[=simplify]{simplify()}} on the created graph. By default the graph is simplified, loop and -multiple edges are removed.} +multiple edges are removed. \code{\link[=simplify]{simplify()}} is only called when the +created graph is not already simple, so the edge order from the +formula is preserved whenever no loops or multi-edges are present. +When the graph does contain loops or multi-edges (and \code{simplify = TRUE}), \code{\link[=simplify]{simplify()}} reorders the edges into its canonical order.} } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} @@ -22,7 +25,7 @@ multiple edges are removed.} consistent API. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}} } \keyword{internal} diff --git a/man/graph.incidence.Rd b/man/graph.incidence.Rd index 7f61c4c7d6c..65afa2c20ef 100644 --- a/man/graph.incidence.Rd +++ b/man/graph.incidence.Rd @@ -54,7 +54,7 @@ type) will be added.} consistent API. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Bipartite.html#igraph_biadjacency}{\code{biadjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Bipartite.html#igraph_biadjacency}{\code{biadjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} } \keyword{internal} diff --git a/man/graph_.Rd b/man/graph_.Rd index 3fdf882b38e..823d7aab3a3 100644 --- a/man/graph_.Rd +++ b/man/graph_.Rd @@ -16,7 +16,7 @@ This is a generic function to convert R objects to igraph graphs. TODO } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} } \examples{ diff --git a/man/graph_from_adjacency_matrix.Rd b/man/graph_from_adjacency_matrix.Rd index 2663076a3d0..d8d79206e79 100644 --- a/man/graph_from_adjacency_matrix.Rd +++ b/man/graph_from_adjacency_matrix.Rd @@ -141,7 +141,7 @@ gives the edge weights. } } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_adjacency}{\code{adjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_weighted_adjacency}{\code{weighted_adjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_adjacency}{\code{adjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_weighted_adjacency}{\code{weighted_adjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} } \examples{ diff --git a/man/graph_from_biadjacency_matrix.Rd b/man/graph_from_biadjacency_matrix.Rd index fafb48c22d9..eb6cf2cb94c 100644 --- a/man/graph_from_biadjacency_matrix.Rd +++ b/man/graph_from_biadjacency_matrix.Rd @@ -72,7 +72,7 @@ Some authors refer to the bipartite adjacency matrix as the this naming to avoid confusion with the edge-vertex incidence matrix. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Bipartite.html#igraph_biadjacency}{\code{biadjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Bipartite.html#igraph_biadjacency}{\code{biadjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} } \examples{ diff --git a/man/graph_from_edgelist.Rd b/man/graph_from_edgelist.Rd index e3967c611d0..21f42ae015a 100644 --- a/man/graph_from_edgelist.Rd +++ b/man/graph_from_edgelist.Rd @@ -28,7 +28,7 @@ names and a vertex id will be assigned to each name, and also a \code{name} vertex attribute will be added. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}} } \examples{ diff --git a/man/graph_from_incidence_matrix.Rd b/man/graph_from_incidence_matrix.Rd index cc40a0d7df5..fd84444aa97 100644 --- a/man/graph_from_incidence_matrix.Rd +++ b/man/graph_from_incidence_matrix.Rd @@ -18,7 +18,7 @@ Some authors refer to the bipartite adjacency matrix as the this naming to avoid confusion with the edge-vertex incidence matrix. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Bipartite.html#igraph_biadjacency}{\code{biadjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Bipartite.html#igraph_biadjacency}{\code{biadjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} } \keyword{internal} diff --git a/man/graph_from_literal.Rd b/man/graph_from_literal.Rd index 5c0601dbefa..65f97689823 100644 --- a/man/graph_from_literal.Rd +++ b/man/graph_from_literal.Rd @@ -16,7 +16,10 @@ all arguments are passed to \code{graph_from_literal()}.} \item{simplify}{Logical scalar, whether to call \code{\link[=simplify]{simplify()}} on the created graph. By default the graph is simplified, loop and -multiple edges are removed.} +multiple edges are removed. \code{\link[=simplify]{simplify()}} is only called when the +created graph is not already simple, so the edge order from the +formula is preserved whenever no loops or multi-edges are present. +When the graph does contain loops or multi-edges (and \code{simplify = TRUE}), \code{\link[=simplify]{simplify()}} reorders the edges into its canonical order.} } \value{ An igraph graph @@ -92,7 +95,7 @@ You can include any character in the vertex names this way, even See more examples below. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}} } \examples{ diff --git a/man/make_.Rd b/man/make_.Rd index 7ef443684db..f9ff4b5cf80 100644 --- a/man/make_.Rd +++ b/man/make_.Rd @@ -31,7 +31,7 @@ to the newly created graphs. See the examples and the various constructor modifiers below. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} } \examples{ diff --git a/man/make_graph.Rd b/man/make_graph.Rd index ba06936c111..93ac61b6b99 100644 --- a/man/make_graph.Rd +++ b/man/make_graph.Rd @@ -217,7 +217,7 @@ Journal of Anthropological Research 33, 452-473 (1977). } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_create}{\code{create()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Generators.html#igraph_famous}{\code{famous()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_empty}{\code{empty()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}} } \examples{ diff --git a/man/power_centrality.Rd b/man/power_centrality.Rd index b0799e6be48..d40c970980c 100644 --- a/man/power_centrality.Rd +++ b/man/power_centrality.Rd @@ -103,7 +103,7 @@ fixed when we get a better algorithm. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_degree}{\code{degree()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency}{\code{get_adjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency_sparse}{\code{get_adjacency_sparse()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_degree}{\code{degree()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency}{\code{get_adjacency()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_adjacency_sparse}{\code{get_adjacency_sparse()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} } \examples{ diff --git a/man/sample_.Rd b/man/sample_.Rd index 1e2378e112c..a7c4390887b 100644 --- a/man/sample_.Rd +++ b/man/sample_.Rd @@ -31,7 +31,7 @@ to the newly created graphs. See the examples and the various constructor modifiers below. } \section{Related documentation in the C library}{ -\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} +\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Operators.html#igraph_simplify}{\code{simplify()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_simple}{\code{is_simple()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}} } \examples{ diff --git a/man/simplify.Rd b/man/simplify.Rd index 7dab00fd405..bf1643497a5 100644 --- a/man/simplify.Rd +++ b/man/simplify.Rd @@ -31,7 +31,8 @@ single one in the new graph, and their attributes are combined. Please see \code{\link[=attribute.combination]{attribute.combination()}} for details on this.} } \value{ -a new graph object with the edges deleted. +a graph object with the loop and/or multiple edges removed; the +input graph is returned unchanged if it is already simple. } \description{ Simple graphs are graphs which do not contain loop and multiple edges. @@ -46,7 +47,8 @@ it does not contain loop edges and multiple edges. \code{simplify()} removes the loop and/or multiple edges from a graph. If both \code{remove.loops} and \code{remove.multiple} are \code{TRUE} the -function returns a simple graph. +function returns a simple graph. If the graph is already simple, it is +returned unchanged. \code{simplify_and_colorize()} constructs a new, simple graph from a graph and also sets a \code{color} attribute on both the vertices and the edges. diff --git a/revdep/README.md b/revdep/README.md index 200b317ceb1..e3857f1fae3 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -1,6 +1,6 @@ # Revdeps -## Failed to check (8) +## Failed to check (9) |package |version |error |warning |note | |:----------|:-------|:-----|:-------|:----| @@ -8,33 +8,36 @@ |caugi |1.2.0 |1 | | | |deepSTRAPP |? | | | | |ggpicrust2 |? | | | | -|rsat |0.1.21 |1 | | | +|primer |? | | | | +|rsat |? | | | | |scAnnotate |0.3 |1 | | | |spopt |0.1.2 |1 | | | |streamDAG |? | | | | -## New problems (20) +## New problems (22) -|package |version |error |warning |note | -|:-----------|:-------|:------|:-------|:------| -|[Boptbd](problems.md#boptbd)|1.0.7 |__+1__ | | | -|[c3net](problems.md#c3net)|1.1.1.1 |__+1__ | | | -|[comato](problems.md#comato)|1.1 |__+1__ | | | -|[cranly](problems.md#cranly)|0.6.0 |__+1__ | | | -|[dci](problems.md#dci)|1.0.3 |__+3__ | | | -|[degreenet](problems.md#degreenet)|1.3-6 |__+1__ | | | -|[ECoL](problems.md#ecol)|0.4.4 |__+2__ | | | -|[FrF2](problems.md#frf2)|2.3-4 | | |__+1__ | -|[ggm](problems.md#ggm)|2.5.2 |__+1__ | | | -|[ggraph](problems.md#ggraph)|2.2.2 |__+2__ | | | -|[GoodFitSBM](problems.md#goodfitsbm)|0.0.1 |__+1__ | | | -|[migraph](problems.md#migraph)|1.6.2 |__+1__ | | | -|[nat](problems.md#nat)|1.8.25 |__+3__ | | | -|[optbdmaeAT](problems.md#optbdmaeat)|1.0.2 |__+1__ | | | -|[optrcdmaeAT](problems.md#optrcdmaeat)|1.0.1 |__+1__ | | | -|[qgraph](problems.md#qgraph)|1.9.8 |__+1__ | | | -|[R6causal](problems.md#r6causal)|0.8.3 | |__+1__ | | -|[scistreer](problems.md#scistreer)|1.2.1 |__+1__ | |1 | -|[tidygraph](problems.md#tidygraph)|1.3.1 |__+2__ | |1 | -|[vkR](problems.md#vkr)|0.2 | |__+1__ | | +|package |version |error |warning |note | +|:-----------|:-------|:------|:-------|:----| +|[Boptbd](problems.md#boptbd)|1.0.7 |__+1__ | | | +|[c3net](problems.md#c3net)|1.1.1.1 |__+1__ | | | +|[cfid](problems.md#cfid)|0.1.8 |__+1__ | | | +|[comato](problems.md#comato)|1.1 |__+1__ | | | +|[cranly](problems.md#cranly)|0.6.0 |__+1__ | | | +|[dci](problems.md#dci)|1.0.3 |__+3__ | | | +|[degreenet](problems.md#degreenet)|1.3-7 |__+1__ | | | +|[ECoL](problems.md#ecol)|0.4.4 |__+2__ | | | +|[ggm](problems.md#ggm)|2.5.2 |__+1__ | | | +|[ggraph](problems.md#ggraph)|2.2.2 |__+2__ | | | +|[glyrepr](problems.md#glyrepr)|0.12.0 |__+1__ | | | +|[GoodFitSBM](problems.md#goodfitsbm)|0.0.1 |__+1__ | | | +|[manynet](problems.md#manynet)|2.0.1 |__+1__ | | | +|[migraph](problems.md#migraph)|1.6.2 |__+1__ | | | +|[nat](problems.md#nat)|1.8.25 |__+3__ | | | +|[optbdmaeAT](problems.md#optbdmaeat)|1.0.2 |__+1__ | | | +|[optrcdmaeAT](problems.md#optrcdmaeat)|1.0.1 |__+1__ | | | +|[qgraph](problems.md#qgraph)|1.9.8 |__+1__ | | | +|[R6causal](problems.md#r6causal)|0.8.3 | |__+1__ | | +|[scistreer](problems.md#scistreer)|1.2.1 |__+1__ | |1 | +|[tidygraph](problems.md#tidygraph)|1.3.1 |__+2__ | |1 | +|[vkR](problems.md#vkr)|0.2 | |__+1__ | | diff --git a/revdep/cran.md b/revdep/cran.md index c538c3fb605..6ab4efcbed2 100644 --- a/revdep/cran.md +++ b/revdep/cran.md @@ -1,9 +1,9 @@ ## revdepcheck results -We checked 2287 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. +We checked 2289 reverse dependencies (2287 from CRAN + 2 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package. - * We saw 20 new problems - * We failed to check 8 packages + * We saw 22 new problems + * We failed to check 7 packages Issues with CRAN packages are summarised below. @@ -16,6 +16,9 @@ Issues with CRAN packages are summarised below. * c3net checking examples ... ERROR +* cfid + checking tests ... ERROR + * comato checking examples ... ERROR @@ -34,9 +37,6 @@ Issues with CRAN packages are summarised below. checking examples ... ERROR checking tests ... ERROR -* FrF2 - checking tests ... NOTE - * ggm checking examples ... ERROR @@ -44,9 +44,15 @@ Issues with CRAN packages are summarised below. checking examples ... ERROR checking re-building of vignette outputs ... ERROR +* glyrepr + checking tests ... ERROR + * GoodFitSBM checking examples ... ERROR +* manynet + checking tests ... ERROR + * migraph checking tests ... ERROR @@ -83,7 +89,6 @@ Issues with CRAN packages are summarised below. * caugi (NA) * deepSTRAPP (NA) * ggpicrust2 (NA) -* rsat (NA) * scAnnotate (NA) * spopt (NA) * streamDAG (NA) diff --git a/revdep/failures.md b/revdep/failures.md index ca7a7e694e1..83e1a86845b 100644 --- a/revdep/failures.md +++ b/revdep/failures.md @@ -2430,59 +2430,59 @@ Status: OK ``` -# rsat (0.1.21) +# primer (NA) -* GitHub: -* Email: -* GitHub mirror: +* : -Run `revdepcheck::cloud_details(, "rsat")` for more info +Run `revdepcheck::cloud_details(, "primer")` for more info -## In both +## Error before installation -* checking whether package ‘rsat’ can be installed ... ERROR - ``` - Installation failed. - See ‘/tmp/workdir/rsat/new/rsat.Rcheck/00install.out’ for details. - ``` +### Devel -## Installation +``` + + + + + + +``` +### CRAN + +``` + + + + + + +``` +# rsat (NA) + +* : + +Run `revdepcheck::cloud_details(, "rsat")` for more info + +## Error before installation ### Devel ``` -* installing *source* package ‘rsat’ ... -** this is package ‘rsat’ version ‘0.1.21’ -** package ‘rsat’ successfully unpacked and MD5 sums checked -** using staged installation -** R -** data -*** moving datasets to lazyload DB -** inst -** byte-compile and prepare package for lazy loading -Error: object ‘tm_scale_bar’ is not exported by 'namespace:tmap' -Execution halted -ERROR: lazy loading failed for package ‘rsat’ -* removing ‘/tmp/workdir/rsat/new/rsat.Rcheck/rsat’ + + + + ``` ### CRAN ``` -* installing *source* package ‘rsat’ ... -** this is package ‘rsat’ version ‘0.1.21’ -** package ‘rsat’ successfully unpacked and MD5 sums checked -** using staged installation -** R -** data -*** moving datasets to lazyload DB -** inst -** byte-compile and prepare package for lazy loading -Error: object ‘tm_scale_bar’ is not exported by 'namespace:tmap' -Execution halted -ERROR: lazy loading failed for package ‘rsat’ -* removing ‘/tmp/workdir/rsat/old/rsat.Rcheck/rsat’ + + + + ``` @@ -2588,10 +2588,10 @@ fi export CARGO_HOME=/tmp/workdir/spopt/new/spopt.Rcheck/00_pkg_src/spopt/src/.cargo && \ export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin" && \ RUSTFLAGS=" --print=native-static-libs" cargo build -j 2 --offline --lib --release --manifest-path=./rust/Cargo.toml --target-dir ./rust/target -error: package `rayon-core v1.13.0` cannot be built because it requires rustc 1.80 or newer, while the currently active rustc version is 1.75.0 -Either upgrade to rustc 1.80 or newer, or use -cargo update rayon-core@1.13.0 --precise ver -where `ver` is the latest version of `rayon-core` supporting rustc 1.75.0 +error: package `indexmap v2.12.1` cannot be built because it requires rustc 1.82 or newer, while the currently active rustc version is 1.75.0 +Either upgrade to rustc 1.82 or newer, or use +cargo update indexmap@2.12.1 --precise ver +where `ver` is the latest version of `indexmap` supporting rustc 1.75.0 make: *** [Makevars:27: rust/target/release/libspopt.a] Error 101 ERROR: compilation failed for package ‘spopt’ * removing ‘/tmp/workdir/spopt/new/spopt.Rcheck/spopt’ @@ -2627,10 +2627,10 @@ fi export CARGO_HOME=/tmp/workdir/spopt/old/spopt.Rcheck/00_pkg_src/spopt/src/.cargo && \ export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin" && \ RUSTFLAGS=" --print=native-static-libs" cargo build -j 2 --offline --lib --release --manifest-path=./rust/Cargo.toml --target-dir ./rust/target -error: package `sprs v0.11.4` cannot be built because it requires rustc 1.85.0 or newer, while the currently active rustc version is 1.75.0 -Either upgrade to rustc 1.85.0 or newer, or use -cargo update sprs@0.11.4 --precise ver -where `ver` is the latest version of `sprs` supporting rustc 1.75.0 +error: package `rayon-core v1.13.0` cannot be built because it requires rustc 1.80 or newer, while the currently active rustc version is 1.75.0 +Either upgrade to rustc 1.80 or newer, or use +cargo update rayon-core@1.13.0 --precise ver +where `ver` is the latest version of `rayon-core` supporting rustc 1.75.0 make: *** [Makevars:27: rust/target/release/libspopt.a] Error 101 ERROR: compilation failed for package ‘spopt’ * removing ‘/tmp/workdir/spopt/old/spopt.Rcheck/spopt’ diff --git a/revdep/problems.md b/revdep/problems.md index 0bdebadd701..0861c6d2b02 100644 --- a/revdep/problems.md +++ b/revdep/problems.md @@ -76,6 +76,46 @@ Run `revdepcheck::cloud_details(, "c3net")` for more info Execution halted ``` +# cfid (0.1.8) + +* GitHub: +* Email: +* GitHub mirror: + +Run `revdepcheck::cloud_details(, "cfid")` for more info + +## Newly broken + +* checking tests ... ERROR + ``` + ... + Expected `import_graph(ig)` to be identical to `dag("X -> Z -> Y X <-> Y")`. + Differences: + `dim(actual)`: 5 5 + `dim(expected)`: 4 4 + + `attr(actual, 'labels')[2:5]`: "Z" "Y" "U[X,Y]" "U[Z,Y]" + `attr(expected, 'labels')[2:4]`: "Z" "Y" "U[X,Y]" + + `attr(actual, 'latent')[2:5]`: FALSE FALSE TRUE TRUE + `attr(expected, 'latent')[2:4]`: FALSE FALSE TRUE + + `attr(actual, 'order')`: 4 5 3 1 2 + `attr(expected, 'order')`: 4 1 2 3 + + `attr(actual, 'text')`: "X; Z; Y; X -> Z; Y -> X; X <-> Y; Z <-> Y" + `attr(expected, 'text')`: "X; Z; Y; X -> Z; Z -> Y; X <-> Y" + + `actual`: 0 0 1 1 0 1 0 0 0 1 and 15 more... + `expected[2:16]`: 0 0 1 1 0 0 0 0 1 0 ... + + + [ FAIL 1 | WARN 0 | SKIP 0 | PASS 204 ] + Error: + ! Test failures. + Execution halted + ``` + # comato (1.1) * Email: @@ -255,7 +295,7 @@ Run `revdepcheck::cloud_details(, "dci")` for more info Execution halted ``` -# degreenet (1.3-6) +# degreenet (1.3-7) * Email: * GitHub mirror: @@ -362,45 +402,6 @@ Run `revdepcheck::cloud_details(, "ECoL")` for more info Execution halted ``` -# FrF2 (2.3-4) - -* Email: -* GitHub mirror: - -Run `revdepcheck::cloud_details(, "FrF2")` for more info - -## Newly broken - -* checking tests ... NOTE - ``` - ... - < 4: `clique.number()` was deprecated in igraph 2.0.0. - < ℹ Please use `clique_num()` instead. - < ℹ The deprecated feature was likely used in the FrF2 package. - < Please report the issue to the authors. - Running ‘godolphintest.R’ - Comparing ‘godolphintest.Rout’ to ‘godolphintest.Rout.save’ ...49,65d48 - < Warning messages: - < 1: `graph.empty()` was deprecated in igraph 2.1.0. - < ℹ Please use `make_empty_graph()` instead. - < ℹ The deprecated feature was likely used in the FrF2 package. - < Please report the issue to the authors. - < 2: `add.edges()` was deprecated in igraph 2.0.0. - < ℹ Please use `add_edges()` instead. - < ℹ The deprecated feature was likely used in the FrF2 package. - < Please report the issue to the authors. - < 3: `independence.number()` was deprecated in igraph 2.0.0. - < ℹ Please use `ivs_size()` instead. - < ℹ The deprecated feature was likely used in the FrF2 package. - < Please report the issue to the authors. - < 4: `clique.number()` was deprecated in igraph 2.0.0. - < ℹ Please use `clique_num()` instead. - < ℹ The deprecated feature was likely used in the FrF2 package. - < Please report the issue to the authors. - Running ‘pbtest.R’ - Comparing ‘pbtest.Rout’ to ‘pbtest.Rout.save’ ... OK - ``` - # ggm (2.5.2) * Email: @@ -510,6 +511,46 @@ Run `revdepcheck::cloud_details(, "ggraph")` for more info Execution halted ``` +# glyrepr (0.12.0) + +* GitHub: +* Email: +* GitHub mirror: + +Run `revdepcheck::cloud_details(, "glyrepr")` for more info + +## Newly broken + +* checking tests ... ERROR + ``` + ... + > library(glyrepr) + > + > test_check("glyrepr") + Saving _problems/test-structure-to-iupac-95.R + [ FAIL 1 | WARN 0 | SKIP 12 | PASS 1180 ] + + ══ Skipped tests (12) ══════════════════════════════════════════════════════════ + • On CRAN (12): 'test-composition.R:270:1', 'test-composition.R:297:1', + 'test-example-glycans.R:1:1', 'test-example-glycans.R:9:1', + 'test-example-glycans.R:16:1', 'test-example-glycans.R:23:1', + 'test-example-glycans.R:30:1', 'test-structure-level.R:66:1', + 'test-structure-level.R:147:1', 'test-structure.R:530:1', + 'test-structure.R:537:1', 'test-structure.R:545:1' + + ══ Failed tests ════════════════════════════════════════════════════════════════ + ── Error ('test-structure-to-iupac.R:95:3'): structure_to_iupac handles complex branched structures ── + + Error in `purrr::map(valid_graphs, function(graph) { checkmate::assert_class(graph, "igraph") graph %>% validate_single_glycan_structure() %>% ensure_name_vertex_attr() })`: i In index: 1. + Caused by error in `validate_single_glycan_structure()`: + ! Duplicated linkage positions. + + [ FAIL 1 | WARN 0 | SKIP 12 | PASS 1180 ] + Error: + ! Test failures. + Execution halted + ``` + # GoodFitSBM (0.0.1) * GitHub: @@ -550,6 +591,46 @@ Run `revdepcheck::cloud_details(, "GoodFitSBM")` for more info Execution halted ``` +# manynet (2.0.1) + +* GitHub: +* Email: +* GitHub mirror: + +Run `revdepcheck::cloud_details(, "manynet")` for more info + +## Newly broken + +* checking tests ... ERROR + ``` + ... + 'test-manip_transform.R:10:5', 'test-manip_transform.R:10:5' + • Some functions need more input (4): 'test-manip_transform.R:8:5', + 'test-manip_transform.R:8:5', 'test-manip_transform.R:8:5', + 'test-manip_transform.R:8:5' + • nodelist and pajek read/write not tested yet (2): 'test-make_read.R:12:5', + 'test-make_read.R:12:5' + + ══ Failed tests ════════════════════════════════════════════════════════════════ + ── Failure ('test-manip_format.R:129:3'): to_twomode works ───────────────────── + Expected `is_twomode(to_twomode(ison_algebra, "type"))` to be TRUE. + Differences: + `actual`: FALSE + `expected`: TRUE + + ── Failure ('test-manip_format.R:130:3'): to_twomode works ───────────────────── + Expected `is_twomode(to_twomode(as_igraph(ison_algebra), "type"))` to be TRUE. + Differences: + `actual`: FALSE + `expected`: TRUE + + + [ FAIL 2 | WARN 0 | SKIP 18 | PASS 399 ] + Error: + ! Test failures. + Execution halted + ``` + # migraph (1.6.2) * GitHub: @@ -938,7 +1019,7 @@ Run `revdepcheck::cloud_details(, "tidygraph")` for more info ! The `father` argument of `bfs()` was deprecated in igraph 2.2.0 and is now defunct. i Please use the `parent` argument instead. - [ FAIL 5 | WARN 12 | SKIP 1 | PASS 424 ] + [ FAIL 6 | WARN 13 | SKIP 1 | PASS 423 ] Error: ! Test failures. Execution halted diff --git a/tests/testthat/_snaps/aaa-auto.md b/tests/testthat/_snaps/aaa-auto.md index ecfe53099c6..b8315efdb62 100644 --- a/tests/testthat/_snaps/aaa-auto.md +++ b/tests/testthat/_snaps/aaa-auto.md @@ -10983,24 +10983,24 @@ community_edge_betweenness_impl(graph = g, directed = FALSE) Output $removed_edges - [1] 2 0 1 3 4 5 6 + [1] 6 0 1 2 3 4 5 $edge_betweenness [1] 9 1 2 1 1 2 1 $merges [,1] [,2] - [1,] 5 4 - [2,] 6 3 - [3,] 2 1 - [4,] 8 0 + [1,] 5 3 + [2,] 6 4 + [3,] 2 0 + [4,] 8 1 [5,] 7 9 $bridges [1] 7 6 4 3 1 $modularity - [1] -0.17346939 -0.07142857 0.09183673 0.19387755 0.35714286 0.00000000 + [1] -0.17346939 -0.09183673 0.09183673 0.17346939 0.35714286 0.00000000 $membership [1] 0 0 0 1 1 1 diff --git a/tests/testthat/_snaps/make.md b/tests/testthat/_snaps/make.md index 8fc69bf8504..f8c8f1d350b 100644 --- a/tests/testthat/_snaps/make.md +++ b/tests/testthat/_snaps/make.md @@ -63,7 +63,7 @@ IGRAPH UN-- 3 3 -- + attr: name (v/c) + edges (vertex names): - [1] A--B A--C B--C + [1] A--B B--C A--C # graph_from_literal() and undirected explosion @@ -112,7 +112,7 @@ IGRAPH DN-- 3 3 -- + attr: name (v/c) + edges (vertex names): - [1] A->B C->A C->B + [1] A->B C->B C->A # graph_from_literal() and directed explosion @@ -129,7 +129,7 @@ IGRAPH DN-- 13 19 -- + attr: name (v/c) + edges (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 + [1] A->D A->E B->D B->E C->D C->E F->D G->D H->D F->E G->E H->E F->I G->I H->I [16] J->I K->I L->I M->I # graph_from_literal(simplify = FALSE) diff --git a/tests/testthat/test-conversion.R b/tests/testthat/test-conversion.R index a497f9e4f82..fbed3c47671 100644 --- a/tests/testthat/test-conversion.R +++ b/tests/testthat/test-conversion.R @@ -33,14 +33,14 @@ test_that("as_directed keeps attributes", { df_mutual <- as_data_frame(g_mutual) expect_equal( df_mutual[order(df_mutual[, 1], df_mutual[, 2]), ]$weight, - c(1, 2, 1, 3, 3, 2) + c(1, 3, 1, 2, 2, 3) ) g_arbitrary <- as_directed(g, "arbitrary") df_arbitrary <- as_data_frame(g_arbitrary) expect_equal( df_arbitrary[order(df_arbitrary[, 1], df_arbitrary[, 2]), ]$weight, - 1:3 + c(1, 3, 2) ) }) @@ -66,14 +66,14 @@ test_that("as_undirected() keeps attributes", { g_tiny <- as_undirected(g, mode = "collapse") df_tiny <- as_data_frame(g_tiny) expect_equal(g_tiny$name, g$name) - expect_equal(df_tiny[order(df_tiny[, 1], df_tiny[, 2]), ]$weight, c(4, 2, 9)) + expect_equal(df_tiny[order(df_tiny[, 1], df_tiny[, 2]), ]$weight, c(3, 3, 9)) g_each <- as_undirected(g, mode = "each") df_each <- as_data_frame(g_each) expect_equal(g_each$name, g$name) expect_equal( df_each[order(df_each[, 1], df_each[, 2]), ]$weight, - c(1, 3, 2, 4, 5) + c(1, 2, 3, 4, 5) ) g_mutual <- as_undirected(g, mode = "mutual") @@ -81,7 +81,7 @@ test_that("as_undirected() keeps attributes", { expect_equal(g_mutual$name, g$name) expect_equal( df_mutual[order(df_mutual[, 1], df_mutual[, 2]), ]$weight, - c(4, 9) + c(3, 9) ) }) diff --git a/tests/testthat/test-flow.R b/tests/testthat/test-flow.R index 063d0323b8d..d9bf184056b 100644 --- a/tests/testthat/test-flow.R +++ b/tests/testthat/test-flow.R @@ -55,17 +55,17 @@ test_that("st_cuts() works", { expect_equal( unvs(all_cuts_star_v7$cuts), list( - c(1, 2), - c(1, 7), - c(2, 3, 4, 5, 6), - c(2, 3, 4, 5, 10), - c(2, 3, 4, 6, 9), - c(2, 3, 4, 9, 10), - c(2, 3, 5, 6, 8), - c(2, 3, 5, 8, 10), - c(2, 3, 6, 8, 9), + 1:2, + c(1, 4), + c(2, 3, 5, 6, 7), + c(2, 3, 5, 6, 10), + c(2, 3, 5, 7, 9), + c(2, 3, 5, 9, 10), + c(2, 3, 6, 7, 8), + c(2, 3, 6, 8, 10), + c(2, 3, 7, 8, 9), c(2, 3, 8, 9, 10), - c(3, 7) + 3:4 ) ) expect_equal( @@ -73,7 +73,7 @@ test_that("st_cuts() works", { list( 1, c(1, 3), - c(1, 2), + 1:2, c(1, 2, 7), c(1, 2, 6), c(1, 2, 6, 7), @@ -88,7 +88,7 @@ test_that("st_cuts() works", { g_star_v9 <- graph_from_literal(s -+ a:b -+ t, a -+ 1:2:3:4:5 -+ b) all_cuts_star_v9 <- st_min_cuts(g_star_v9, source = "s", target = "t") expect_equal(all_cuts_star_v9$value, 2) - expect_equal(unvs(all_cuts_star_v9$cuts), list(c(1, 2), c(1, 9), c(3, 9))) + expect_equal(unvs(all_cuts_star_v9$cuts), list(1:2, c(1, 4), 3:4)) expect_equal( unvs(all_cuts_star_v9$partition1s), list(1, c(1, 3), c(1, 3, 2, 9, 8, 7, 6, 5)) diff --git a/tests/testthat/test-operators.R b/tests/testthat/test-operators.R index 6620c260086..b79725b8a90 100644 --- a/tests/testthat/test-operators.R +++ b/tests/testthat/test-operators.R @@ -144,22 +144,22 @@ C 5 e NA NA C textConnection( " from to bar1 foo_1 foo_2 bar2 -1 A B 3 c c 3 -2 A A 3 c b 2 -3 A E 1 a c 3 +1 A B 3 c b 2 +2 A A 3 c c 3 +3 A E 1 a b 2 4 A A 1 a a 1 -5 B E 1 a b 2 +5 B E 1 a c 3 6 B B 1 a a 1 -7 B D 6 f c 3 -8 A D 6 f b 2 -9 D E 4 d c 3 -10 A D 4 d a 1 -11 D E 2 b b 2 +7 B D 7 g b 2 +8 A D 7 g c 3 +9 D E 5 e b 2 +10 A D 5 e a 1 +11 D E 2 b c 3 12 B D 2 b a 1 -13 E E 3 c b 2 +13 E E 3 c c 3 14 B E 3 c a 1 -15 E C 5 e c 3 -16 A C 5 e a 1 +15 E C 4 d b 2 +16 A C 4 d a 1 " ) )