Re: dijkstra algorithm by object oriented

From: Mike Meyer (mwm_at_mired.org)
Date: 11/05/04


Date: Fri, 05 Nov 2004 00:35:00 -0600


"Ricardo Batista" <batista.ric@iol.pt> writes:

> 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.

Yup, that's certainly one way to do it. But the best way to found out
is to try it and see.

One comment on the original code. You'd be better off doing INF =
None. That way you don't risk accidently generating an INF.

      <mike

-- 
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.