MaineKuehn / graphi

Graph Interface and Types
MIT License
1 stars 0 forks source link

Switch custom overloading for single dispatch #5

Closed maxfischer2781 closed 5 years ago

maxfischer2781 commented 5 years ago

The standard library includes a singledispatch decorator for overloading functions to generic functions. This would be suitable as a replacement for the custom interface introduced in #1 .

Aside from being standard library, singledispatch has the advantage of keeping even Cython classes open for extension. There is a backport available that covers all versions supported by graph.

maxfischer2781 commented 5 years ago

Oops, commits reference issue #4 by accident.

maxfischer2781 commented 5 years ago

graphi.operator is now a module containing the neighbours and density operators. The graphi.operator.interface has been removed. singledispatch is available as graphi.operator.singledispatch.