Skip to content

Commit 01c16d8

Browse files
committed
s3
1 parent 6dc5010 commit 01c16d8

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

R/structural-properties.R

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,18 +2305,12 @@ coreness <- function(graph, mode = c("all", "out", "in")) {
23052305
#' topo_sort(g)
23062306
#'
23072307
topo_sort <- function(graph, mode = c("out", "all", "in")) {
2308-
ensure_igraph(graph)
23092308
mode <- igraph_match_arg(mode)
2310-
mode <- switch(mode, "out" = 1, "in" = 2, "all" = 3)
2311-
2312-
on.exit(.Call(R_igraph_finalizer))
2313-
res <- .Call(Rx_igraph_topological_sorting, graph, as.numeric(mode)) + 1L
2314-
2315-
if (igraph_opt("return.vs.es")) {
2316-
res <- create_vs(graph, res)
2317-
}
23182309

2319-
res
2310+
topological_sorting_impl(
2311+
graph = graph,
2312+
mode = mode
2313+
)
23202314
}
23212315

23222316
#' Finding a feedback arc set in a graph

0 commit comments

Comments
 (0)