dijkstra algorithm by object oriented

Josiah Carlson jcarlson at uci.edu
Fri Nov 5 04:11:59 CET 2004


"Ricardo Batista" <batista.ric at iol.pt> wrote:
> 
> But i need it for a homework.

We try not to do homework here.

 - Josiah


> -----Mensagem original-----
> De: Josiah Carlson [mailto:jcarlson at uci.edu] 
> Enviada: quinta-feira, 4 de Novembro de 2004 22:23
> Para: Ricardo Batista; python-list at python.org
> Assunto: Re: dijkstra algorithm by object oriented
> 
> 
> "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