Thursday, November 29, 2007

Declaring an Edge Adjacency List Graph

The 3 types of Graph representations are: 1. Edge List 2. Adjacency Edge List 3. Edge Matrix The heart of the simplest representation of Edge List is the following:

LinkedList [ ] AdjLists = new LinkedList [numberOfVertices];

This implies that we are declaring an Array called AdjLists. No matter what, the Graph at the end is just an Array!!! This Array called AdjLists will hold elements of the type LinkedList which are in turn containers of type 'Edge'. Whatever Edge means... So basically, we are implementing a 3 level structure, at the end the edge objects are elements that are stored in Linked Lists, which are themselves stored in an Array! How beautiful!!!!!!!!!!!!

1 comment:

Anonymous said...

Hello. This post is likeable, and your blog is very interesting, congratulations :-). I will add in my blogroll =). If possible gives a last there on my blog, it is about the GPS, I hope you enjoy. The address is http://gps-brasil.blogspot.com. A hug.

Just some daily notes ...

Powered By Blogger