[Networkit] Bachelor-Project about generic semiring operators

Thomas Schmidt thomas.3.schmidt at uni-konstanz.de
Tue Jun 28 16:25:41 CEST 2016


Hi Chris,

> Have you thought about how this new functionality will be available on
> the Python layer? It should, but it doesn’t have to be a 1:1 mapping
> of the underlying C++. We can help with the mapping.

I think the best way would be for the Python layer to, just like on the
C++ layer, add the relax function as a parameter. I am not really sure
how to map a template class, though. But since, in python, addition and
multiplication can be defined for arbitrary classes as well, I think it
would be best, if one could just define such a class, assign objects of
it as the edgeweights, and then just call Dijkstra on it.

Regarding that, something just came to my mind: How should the
edgeweights be added? Should there be an extra function for it? So far,
I just created a vector and handed it over to the Dijkstra constructor.

But anyways, if Python's duck typing could be utilized this way, it
would be great. Do you know if this is possible?

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ira.uni-karlsruhe.de/pipermail/networkit/attachments/20160628/58a3d6fc/attachment.html>


More information about the NetworKit mailing list