Skip to contents

Basic Query Operations

Usage

vcount(graph)

ecount(graph)

igraph_from(graph)

igraph_to(graph)

edge(graph, eid)

neighbors(graph, vid, mode = 3L)

incident(graph, vid, mode = 3L)

is_directed(graph)

degree(graph, vids = integer(0), mode = 3L, loops = TRUE)

add_vertices(graph, n)

add_edges(graph, eids)

delete_vertices(graph, vids)

delete_edges(graph, eids)

Arguments

graph

igraph_ptr object.

eid

Edges of interest.

vid

Vertices of interest.

mode

Edge type to count; {1: OUT, 2: IN, 3: ALL}.

vids

Vertices of interest.

loops

whether self-loop should be counted.

n

number of vertices to add.

eids

Edges of interest.

Details

vcount(): The number of vertices in a graph.

ecount(): The number of edges in a graph.

edge(): Gives the head and tail vertices of an edge.

neighbors(): Adjacent vertices to a vertex.

incident(): Gives the incident edges of a vertex.

is_directed(): Is this a directed graph?

degree(): The degree of some vertices in a graph.

See also

as_adjlist() and as_inclist() for all-vertices version.