Sort Module

Where is this documented in 1.23 please? I have found it for 1.12. Is this
just a Work in Progress?

Also, why have a Search package which is not general enough to be able to
be re-used within the Sort package? Just curious.

Regards - Damian

Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer

Hi Damian,

The documentation for the Sort module for the latest release is going to be here:

https://chapel-lang.org/docs/modules/packages/Sort.html

Not sure about the Search module. How would you expect it to be reused for Sort?

Vass

Hi Vass,

Sort — Chapel Documentation 1.32

The current one does not document all the modules, such as Insertion Sort,
Tim Sort, Bubble Sort, Heap Sort, Merge Sort, Shell Sort, Quick Sort, and
others.

Not sure about the Search module. How would you expect it to be reused
for Sort?

There are Binary Search routines in the Sort Module which are different to
those in the Search module so you loose the benefits of reusability.

Regards - Damian

Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer

Hi Damian -

Yes, things like Bubble Sort and Shell Sort are intentionally undocumented in the Sort module.

The expectation is that at some point the Sort module will become a standard module. I don't think it makes sense for that main standard module to have a gazillion Sort algorithms in it (it should focus on having a small, stable, and functional API).

However we can keep the gazillion Sort algorithms as package modules indefinitely. The package module does not have the same level of strictness in terms of API stability. For example, we might move these into a package module called SortAlgorithms or something like that.

I don't have an intelligent answer to the issue you brought up with two versions of binary search - that seems like something we should resolve at some point.

Thanks,

-michael

Thanks for the clear explanation.

The issues with multiple versions of binary search can wait. It is not urgent. I just noticed it while I was cleaning up my version of TimSort. When I find a spare day or so, I will merge my modifications into the
version in Sort.chpl. Don't hold your breath.