Designing a graph study program

andrea kerny404 at gmail.com
Tue May 8 17:20:58 EDT 2007


On 8 Mag, 13:55, "Diez B. Roggisch" <d... at nospam.web.de> wrote:
> > Ok thank you very much I'll try with that.
> > But I have some design doubts, I'd like to keep the algorithm (for
> > example bfs) as clean as possible, being independent from the drawing
> > methods.
> > And how could I make it step through algorithms without having a more
> > complicated code? Maybe using threads?
>
> Along the lines of what Marc said:
>
> Use two graph-implementations that share the same interface regarding the
> algorithms, but one will emit events to some observer for each operation on
> the graph - edge/node adding/removal, attribute changing and so forth.
>
> Thus the algorithm is kept clean, and all that you can visualize anyway is
> available to you.
>
> diez
Interesting but what do you mean for two graph-implementatio that
share the same interface??
I don't have abstract classes or interfaces in python, am I wrong?
Thanks




More information about the Python-list mailing list