Topological Sort

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Topological Sort

gcotelli
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


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Topological Sort

Lukas Renggli
> Summarizing.. I vote for removal of this behavior...

+1

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project