Skip to content

Commit 6dc5010

Browse files
committed
s2
1 parent c920c39 commit 6dc5010

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/structural-properties.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,12 +2262,12 @@ make_neighborhood_graph <- make_ego_graph
22622262
#' coreness(g) # small core triangle in a ring
22632263
#'
22642264
coreness <- function(graph, mode = c("all", "out", "in")) {
2265-
ensure_igraph(graph)
22662265
mode <- igraph_match_arg(mode)
2267-
mode <- switch(mode, "out" = 1, "in" = 2, "all" = 3)
22682266

2269-
on.exit(.Call(R_igraph_finalizer))
2270-
res <- .Call(Rx_igraph_coreness, graph, as.numeric(mode))
2267+
res <- coreness_impl(
2268+
graph = graph,
2269+
mode = mode
2270+
)
22712271
if (igraph_opt("add.vertex.names") && is_named(graph)) {
22722272
names(res) <- vertex_attr(graph, "name")
22732273
}

0 commit comments

Comments
 (0)