MaineKuehn / graphi

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

Graph algorithm interface #1

Closed maxfischer2781 closed 6 years ago

maxfischer2781 commented 7 years ago

The only explicit graph algorithm neighbourhood is defined as a method for historical reasons. This allows for optimisations depending on the data structure. However, this approach has several shortcomings:

I suggest an operator-like approach: each algorithm corresponds to one (or more) special methods. Graph implementations can provide such a method for efficient implementations. Otherwise, the algorithm uses a default implementation.

maxfischer2781 commented 7 years ago

Current thoughts: