Skip to content

Basic Inspection

Ed Scheinerman edited this page Sep 19, 2018 · 14 revisions

Basic Inspection Functions

  • NV(G): the number of vertices.
  • NE(G): the number of edges.
  • vlist(G): list containing the vertices.
  • elist(G): list containing the edges.

  • has(G,v): is v a vertex of G?
  • has(G,v,w): is (v,w) an edge of G?

  • neighbors(G,v): list of v's neighbors. Also G[v].
  • deg(G,v): degree of vertex v.
  • deg(G): sorted list of vertex degrees.

See also deg_hist.

Clone this wiki locally