dijkstra algorithm by object oriented

Josiah Carlson jcarlson at uci.edu
Thu Nov 4 23:23:13 CET 2004


"Ricardo Batista" <batista.ric at iol.pt> wrote:
> 
> Ok. you are right.
> 
> I don't express my self in a rigth way.
> 
> I just want an idea to begin my work.
> 
> For example, how many classes do i implement.
> 
> I have an idea to create three classes, class Graph, class Vertex, class
> edge.
> But i don't know if i'm going in the rigth way.
> 
> This is the help i need.

You don't need to use object orientation to implement the algorithm.  If
it works, there is no problem.  If you want to make it faster, you
should look into a variant that uses a heap.

 - Josiah




More information about the Python-list mailing list