These are simple wrappers around degree() to get zero-degree vertices.
Arguments
- graph
An
igraph_ptrobject.
Value
is_sink() and is_source() return a logical vector indicating
whether the vertices in the graph are terminating or starting points,
respectively.
Vsink() and Vsource() return the terminating and starting
vertices of a graph, respectively.
Examples
g = graph_tree(5L)
is_sink(g)
#> [1] FALSE FALSE TRUE TRUE TRUE
is_source(g)
#> [1] TRUE FALSE FALSE FALSE FALSE
Vsink(g)
#> [1] 3 4 5
Vsource(g)
#> [1] 1