Retrieve the indices of nodes that are not neighbors of a specified node.
Examples
adj_matrix <- matrix(c(0,1,0,
1,0,0,
0,0,0), nrow=3, byrow=TRUE)
ng <- neighbor_graph(adj_matrix)
non_neighbors(ng, 1)
#> [1] 3