Skip to contents

These are simple wrappers around degree() to get zero-degree vertices.

Usage

is_sink(graph)

is_source(graph)

Vsink(graph)

Vsource(graph)

Arguments

graph

An igraph_ptr object.

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