another graph question

This is a discussion on another graph question within the C++ Programming forums, part of the General Programming Boards category; I have just been debating my work with a few friends and now I am all muddled up and would ...

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    94

    another graph question

    I have just been debating my work with a few friends and now I am all muddled up and would like the opionion of anyone willing to give it to me before I go and redo the whole program

    I have a connected weighted directional graph for which I am using an adjacency list. I have to find the shortest route from one vertex to another. What approach would you guys use.

    So,
    1. What method should I use to read it into a graph
    2. What method should I use to get the shortest route

    Thanx in advance
    Sophie
    simple is always an understatement.....

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    >1. What method should I use to read it into a graph

    You already have a graph, so what do you want to read into the graph?

    >2. What method should I use to get the shortest route

    There are many algorithms for doing this. But as a being a Dutchman I would suggest Dijkstra's shortest path algorithm,

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 01:14 PM
  2. determining a path through the graph
    By Mist in forum C Programming
    Replies: 2
    Last Post: 02-27-2005, 12:21 PM
  3. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM
  4. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM
  5. Minimize crossing edges in undirected graph
    By Shiro in forum C Programming
    Replies: 0
    Last Post: 12-26-2001, 04:48 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21