[prev] 44 [next]

Graph ADT

Data:
  • set of edges, set of vertices
Operations:
  • building: create graph, add edge
  • deleting: remove edge, drop whole graph
  • scanning: check if graph contains a given edge
Things to note:
  • set of vertices is fixed when graph initialised
  • we treat vertices as ints, but could be arbitrary Items   (e.g. individual profiles on a social network)