The Artima Developer Community
Sponsored Link

Python Buzz Forum
generator-based graph algorithms - take 1, part deux

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
maxim khesin

Posts: 251
Nickname: xamdam
Registered: Mar, 2005

Maxim Khesin is developer for Liquidnet. I like C++, python, attend design patterns study group/NYC.
generator-based graph algorithms - take 1, part deux Posted: Mar 11, 2005 10:14 PM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by maxim khesin.
Original Post: generator-based graph algorithms - take 1, part deux
Feed Title: python and the web
Feed URL: http://feeds.feedburner.com/PythonAndTheWeb
Feed Description: blog dedicated to python and the networks we live in
Latest Python Buzz Posts
Latest Python Buzz Posts by maxim khesin
Latest Posts From python and the web

Advertisement
So Jeremy pointed out that my combo of graph visitors and generators reminded him of Dietmar Kuehl's "loop kernel" pattern. I went hunting for Dietmar's thesis just to find out that his uni link to the paper is dead. Fortunately my quiery to the boost list did not go ananswered. (And despite Dietmar's self-deprecation, the paper is still useful).
I took a look at the paper, and sure enough the loop kernels sounds exactly like what I am doing, so I get the reinventor's credit ;). Or you tell me:

"An algorithm implemented as loop kernel consists of an object used to store the state of the algorithm, some functions modifying the current state (i.e. advancing the algorithm) and some functions used to query the current state. Hence, the algorithm does not solve the problem in one call but rather operates in small steps. After each step the user may decide to terminate or preempt the algorithm. Depending on the algorithm and the objective, it may also be useful to modify the problem while the algorithm is active. "

The only difference is the fact that the previous statemant carries a bit of flavor of a language without generators. While it is indeed true that a generator "an object [read: generator] used to store the state of the algorithm [read: function]", this is not something you think consciously in Python. Which reminds me that a lot of Design Patterns are language-specific.

Read: generator-based graph algorithms - take 1, part deux

Topic: The Unbearable Importance Of Detail Previous Topic   Next Topic Topic: Minnow

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use