Basic query operations
Arguments
- graph
An
igraph_ptrobject.
Value
vcount() returns the number of vertices in a graph.
ecount() returns the number of edges in a graph.
is_directed() returns whether the graph is directed.
Examples
g = graph_tree(5L)
vcount(g)
#> [1] 5
ecount(g)
#> [1] 4
is_directed(g)
#> [1] TRUE