[Networkit] BFS: lambda function, timestamps

Christian Staudt christian.staudt at kit.edu
Fri Jun 13 15:59:07 CEST 2014

Hi Marcel,

Am 10.06.2014 um 16:24 schrieb Marcel Radermacher <marcel.radermacher at student.kit.edu>:

> Is there a specific reason for your design decision?

The only reason for passing the source node in the constructor was that the 
conventional pattern is to initialize an algorithm class in the constructor and trigger
the computation in the run method. But this can be done differently of course
if there are good reasons.

> > Open questions: - Have you thought about Cython compatibility?
> Not really, since I have no experience with Cython. But I figured, as
> the concept of passing the handlers has already been used in the graph
> datastructure it would not be so much of a problem.

Think twice. The iterator methods in the graphs are not exposed to Python because I did not find a way to make them compatible. 
Bottom line: The BFS and Dijkstra classes should remain usable from Python. However, it is not strictly necessary that all functions are available in Python, such
as passing arbitrary node and edge handlers. The criterion is whether the functionality is something one would like to use interactively when doing network analysis, 
or something that is only used at the algorithm level.

I suggest that you go ahead with your design in your own branch and we review it together when it’s time to merge.
Provided that you do not irreparably break Cython compatibility and the changes required to the rest of NetworKit
are not too big, I think your approach looks good.

Best regards

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20140613/aa51634a/attachment.sig>

More information about the NetworKit mailing list