[Pharo-project] Topological Sort
Hi, the following methods: - Collection>>topologicallySortedUsing: - SortedCollection>>sortTopologically: - SortedCollection>>should:precede: are in the dirty methods list. The only sender of this is a test case for topologically sorted. Anyway, I don't understand the need for such behavior in SortedCollection... the topological sort is used in graph theory to obtain a total order of the nodes in a directed acyclic graph.. From my point of view SortedCollection should not implement this behavior... the sortTopologically: uses the same sort block used for standard sorting in SortedCollection, from the implementation I think that additionally it retains the original partial order of the equal elements (some kind of stable sorting, however this is not the intention for the method name). Summarizing.. I vote for removal of this behavior... Anyone knowns if there's another meaning for topological sorting? Waiting for comments Gabriel
Summarizing.. I vote for removal of this behavior...
+1 Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch
participants (2)
-
Gabriel Cotelli -
Lukas Renggli