File ArrayGraph.h

↰ Parent directory (ADS/graph)

The static GRAPH with vectors of adjacency of section 9.4 [see File Graph.h]: the adjacent nodes of all the nodes in one vector, the ones of u in the places [ off( u ) , off( u + 1 ) ); no insertion nor deletion, Theta( n + m ) space and no pointer.

Definition (ADS/graph/ArrayGraph.h)

Detailed Description

The contracts [see File Contract.h]: the graph has n >= 0 nodes and its edges join two distinct nodes; adj(), forEachAdj() and forEachEdge() need a node; the invariant is that the offsets do not decrease and end at the size of the vector, whose entries are nodes. The operations are defined in ArrayGraph.tpp.

  1. Montresor, Algoritmi e Strutture Dati, 2025, section 9.4, https://algoritmicamente.it/materiali/libro/capitoli/cap09.pdf

Donato Meoli

Dipartimento di Informatica Universita’ di Pisa

by Donato Meoli

Includes

Namespaces

Classes