Skip to content

Commit 958d54c

Browse files
maelleaviator-bot
authored andcommitted
refactor: drop attributes in a more straightforward fashion in graphlet_basis()
1 parent 18afa55 commit 958d54c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

R/glet.R

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,12 @@ graphlet_basis <- function(graph, weights = NULL) {
118118
weights <- NULL
119119
}
120120

121-
## Drop all attributes, we don't want to deal with them, TODO
122-
graph2 <- graph
123-
graph2[[igraph_t_idx_attr]] <- list(c(1, 0, 1), list(), list(), list())
121+
## Drop all attributes, we don't want to deal with them
122+
graph <- reduce(graph_attr_names(graph), delete_graph_attr, .init = graph)
124123

125124
on.exit(.Call(R_igraph_finalizer))
126125
## Function call
127-
res <- .Call(R_igraph_graphlets_candidate_basis, graph2, weights)
126+
res <- .Call(R_igraph_graphlets_candidate_basis, graph, weights)
128127

129128
res
130129
}

0 commit comments

Comments
 (0)