23.11.2014 Views

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

• The edge object for an edge e with end vertices v <strong>and</strong> w holds references<br />

to the positions (or entries) associated with edge e <strong>in</strong> the <strong>in</strong>cidence collections<br />

I(v)<strong>and</strong> I(w).<br />

Traditionally, the <strong>in</strong>cidence collection I(v) for a vertex v is a list, which is why we<br />

call this way of represent<strong>in</strong>g a graph the adjacency list structure. The adjacency list<br />

structure provides direct access both from the edges to the vertices <strong>and</strong> from the<br />

vertices to their <strong>in</strong>cident edges. We illustrate the adjacency list structure of a graph<br />

<strong>in</strong> Figure 13.4.<br />

Figure 13.4: (a) A graph G; (b) schematic<br />

representation of the adjacency list structure of G. As <strong>in</strong><br />

Figure 13.3, we visualize the elements of collections<br />

with names.<br />

Performance of the Adjacency List Structure<br />

803

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!