On Sun, Nov 22, 2009 at 11:59 AM, Florent Hivert
<[email protected]> wrote:
>      Hi There,
>
>> > During the review of http://trac.sagemath.org/sage_trac/ticket/7364,
>> > Florent Hivert mentionned it could be a great idea to add a
>> > "complexity" note in all of our algorithms, and some informations
>> > about optimality if known ( or even approximations if available, etc
>> > ... ). What do you think of it, and what would you think of such
>> > information as "required" before giving a positive review to patches ?
>>
>> I'm strongly against requiring this, but certainly for encouraging it
>> and establishing a good format.
>
> +1
>
> As indicated in my review, it was not at all my idea to *require* it. But It
> is undoubtedly a valuable information... I'm trying to hire a student to do
> this job for all the basic method throughout combinat. We started to do this
> more or less systematically in MuPAD before the switch to sage. See for
> examples:
>
> http://mupad-combinat.sourceforge.net/doc/en/combinat/permutations.html
>
> My (obvious) suggestion is to add at the end of a function doc (close to
> reference) a section e.g.:
>
>    ALGORITHM:
>
>     - modified merge sort algorithm. The complexity ``O(n * ln(n))`` is
>    optimal however it has a bad constant time factor. We therefore use a
>    naive method for ``n <= 27``.
>
>
>    REFERENCES:
>
>     - ...
>
>    AUTHORS:
>
>    - ...
>
> Do you think about something even more structured ?

That's a good example.  I wonder if LaTeX typesetting would be nicer,
e.g. `O(n\ln(n))` and `n\leq 27`?

William

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to