C programming language Graph Structure -


i have trouble building graph structure. know how build linked list , doubly too. want construct graph structure in site (the pic. output) http://www.cs.sunysb.edu/~algorith/files/graph-data-structures.shtml

you have 3 common solutions:

  • an adjacency matrix (in store matrix of n*n n number of vertices , in matrix[x][y] store value if x has edge y, 0 otherwise
  • an edge list, in keep long lists of edges if couple (x,y) in list, there edge x y
  • an adjacency list, in have list of vertices , every vertex x has list of edges nodes x has edge to.

every different approach or bad according to

  • space required
  • computational complexity related specific operations more other

so according need graph choose of those. if want know specific characteristic of above possible implementations take @ answer question.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -