Opened 7 years ago

Closed 5 years ago

Last modified 5 years ago

#10333 closed enhancement (fixed)

An interface to Anders Buch's Littlewood-Richardson Calculator ``lrcalc``

Reported by: mhansen Owned by: sage-combinat
Priority: major Milestone: sage-5.0
Component: packages: optional Keywords: spkg package, Schubert calculus, Littlewood-Richardson, days30
Cc: sage-combinat, asbuch, saliola Merged in: sage-5.0.beta2
Authors: Mike Hansen, Anders Buch, Nicolas M. Thiéry, Anne Schilling Reviewers: Nicolas M. Thiéry, Anne Schilling
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by nthiery)

The attached patch, and spkg implements an interface to Anders Buch's Littlewood-Richardson Calculator lrcalc

The "Littlewood-Richardson Calculator" is a C library for fast computation of Littlewood-Richardson (LR) coefficients and products of Schubert polynomials. It handles single LR coefficients, products of and coproducts of Schur functions, skew Schur functions, and fusion products. All of the above are achieved by counting LR (skew)-tableaux (also called Yamanouchi (skew)-tableaux) of appropriate shape and content by iterating through them. Additionally, lrcalc handles products of Schubert polynomials.

The web page of lrcalc is: http://math.rutgers.edu/~asbuch/lrcalc/

Here is a short extract of the doc:

EXAMPLES::

    sage: import sage.libs.lrcalc.lrcalc as lrcalc

Compute a single Littlewood-Richardson coefficient::

    sage: lrcalc.lrcoef([3,2,1],[2,1],[2,1])              #optional - lrcalc
    2

Compute a product of Schur functions; return the coefficients in the Schur expansion::

    sage: lrcalc.mult([2,1], [2,1])                       #optional - lrcalc
    {[3, 3]: 1, [4, 2]: 1, [3, 1, 1, 1]: 1, [4, 1, 1]: 1, [2, 2, 2]: 1, [3, 2, 1]: 2, [2, 2, 1, 1]: 1}

Add optional package lrcalc-1.1.6beta.spkg

Apply: trac_10333-lrcalc-final.patch

Making lrcalc into a standard package in the next Sage release is the topic of the followup ticket: #11563

Attachments (3)

lrcalc-1.1.6beta.tgz (657.4 KB) - added by nthiery 5 years ago.
lrcalc 1.1.6 beta release (for Anders)
lrcalc-1.1.6beta.spkg (610.2 KB) - added by nthiery 5 years ago.
Final spkg
trac_10333-lrcalc-final.patch (25.7 KB) - added by nthiery 5 years ago.

Download all attachments as: .zip

Change History (47)

comment:1 Changed 7 years ago by mhansen

  • Status changed from new to needs_review

comment:2 Changed 7 years ago by mhansen

  • Type changed from PLEASE CHANGE to enhancement

comment:3 Changed 6 years ago by aschilling

  • Reviewers set to Anne Schilling

Together with Anders Buch, I went through this patch at Sage Days 30 and checked all functionalities. We added further doctests and also access to fusion coefficients (which was not in the previous version of this patch).

From the mathematical point of view, I give this a positive review. Could someone please do a quick technical review of the patch?

Thanks!

Anne

Apply: trac_10333-lrcalc-final.patch

comment:4 Changed 6 years ago by aschilling

  • Milestone changed from sage-4.7 to sage-4.7.1

comment:5 Changed 6 years ago by aschilling

  • Keywords spkg package Schubert calculus Littlewood-Richardson added

I fixed some more typos and omissions on the doctest.

Positive review on the mathematics and features.

Could someone complete the technical review?

Cheers,

Anne

comment:6 Changed 6 years ago by aschilling

  • Keywords days30 added

comment:7 Changed 6 years ago by chapoton

for the bot:

Apply: trac_10333-lrcalc-final.patch

comment:8 Changed 6 years ago by aschilling

  • Authors changed from Mike Hansen to Mike Hansen, Anders Buch, Nicolas Thiery, Anne Schilling
  • Reviewers changed from Anne Schilling to Nicolas Thiery, Anne Schilling

comment:9 Changed 6 years ago by nthiery

Hi,

I used the occasion to do something I had promissed Anders a while ago: namely to add a standard GNU build system (autoconf/automake) to the original lrcalc sources. With this, the SPKG becomes trivial. I'll upload shortly a preversion of it. If Anders agrees with the changes, and once he will have done an official release, I'll upload a final version of the spkg.

Mike: could you review now the three little files: SPKG.txt, spkg-install and spkg-check? Those are unlikely to change.

comment:10 Changed 6 years ago by nthiery

  • Description modified (diff)
  • Summary changed from Add an optional interface for lrcalc to An interface to Anders Buch's Littlewood-Richardson Calculator ``lrcalc``

comment:11 Changed 6 years ago by nthiery

  • Description modified (diff)

comment:12 Changed 6 years ago by nthiery

I fixed a couple tiny typos in lrcalc.pyx, and uploaded an updated patch. For me this part is good to go.

comment:13 follow-up: Changed 6 years ago by nthiery

  • Description modified (diff)

According to the vote on http://groups.google.com/group/sage-devel/browse_thread/thread/2e7114375f6f88a5/, there is a consensus on making lrcalc a standard package, after a one release probation period in order to follow the official rule. See: #11563

comment:14 in reply to: ↑ 13 Changed 6 years ago by aschilling

Can we now set a positive review on this patch?

Anne

comment:15 follow-up: Changed 6 years ago by ncohen

  • Status changed from needs_review to needs_info

(pending an answer, if no one knows whether this ticket should be reviewed...)

comment:16 in reply to: ↑ 15 Changed 6 years ago by aschilling

  • Status changed from needs_info to needs_review

Replying to ncohen:

(pending an answer, if no one knows whether this ticket should be reviewed...)

As far as I know, everything is fine with the ticket except that Nicolas is waiting for confirmation from Anders Buch about the spkg. Nicolas, is everything ok now on this front?

Anne

comment:17 Changed 6 years ago by ncohen

Got it ! Then what about setting it to needs_info in the meantime sothat it does not appear in the list of tickets needing a review ? I am trying to deal with some of them, and it would be nice to sort out the tickets which actually need one, those which are to be forgotten until some external event takes place, and those that are totally abandonned :-)

Nathann

comment:18 Changed 6 years ago by nthiery

  • Status changed from needs_review to needs_info
  • Work issues set to Need final permission from Anders

Done.

comment:19 Changed 5 years ago by nthiery

  • Description modified (diff)

Changed 5 years ago by nthiery

lrcalc 1.1.6 beta release (for Anders)

comment:20 Changed 5 years ago by nthiery

  • Status changed from needs_info to needs_review
  • Work issues Need final permission from Anders deleted

After discussion with Anders, I have rolled a new (beta) release of lrcalc, based on:

  • lrcalc-1.1.5.tar.gz
  • schmult-1.1.5.tar.gz
  • an autotools build system

which Anders will later polish into an official 1.1.6 release. The spkg is basically identical to the previous 1.1.5b, except for some updated files in the lrcalc sources (README/AUTHOR/TODO), and the header installation configuration. Anders gave his +1 on the changes. I have installed the spkg together with the patch on sage 4.7.2 and sage-5.0.prealpha0, and in both cases, all test pass.

The patch is unchanged and has a positive review.

Anne (and others!): could you try out the new spkg? If it works fine for you, I guess we can set a positive review. Feel free to untar the spkg, and check the files src/README, src/AUTHORS, src/TODO, src/NEWS.

Cheers,

Nicolas

comment:21 Changed 5 years ago by nthiery

  • Cc asbuch added
  • Description modified (diff)

comment:22 Changed 5 years ago by aschilling

  • Status changed from needs_review to positive_review

I tried out the new package and ran the tests. Everything seemed to work. Positive review.

Anne

comment:23 Changed 5 years ago by jdemeyer

  • Milestone changed from sage-4.8 to sage-5.0

comment:24 Changed 5 years ago by jdemeyer

  • Component changed from combinatorics to optional packages

comment:25 follow-up: Changed 5 years ago by jdemeyer

  • Status changed from positive_review to needs_work

I get a warning building the documentation (this is without the optional spkg installed):

/mnt/usb1/scratch/jdemeyer/merger/sage-5.0.beta1/devel/sage/doc/en/reference/sage/libs/lrcalc/lrcalc.rst:7: WARNING: autodoc can't import/find module 'sage.libs.lrcalc.lrcalc', it reported error: "No module named lrcalc", please check your spelling and sys.path

comment:26 in reply to: ↑ 25 ; follow-up: Changed 5 years ago by nthiery

  • Cc saliola added

Replying to jdemeyer:

I get a warning building the documentation (this is without the optional spkg installed):

/mnt/usb1/scratch/jdemeyer/merger/sage-5.0.beta1/devel/sage/doc/en/reference/sage/libs/lrcalc/lrcalc.rst:7: WARNING: autodoc can't import/find module 'sage.libs.lrcalc.lrcalc', it reported error: "No module named lrcalc", please check your spelling and sys.path

Yikes. Is there an idiom to conditionally include a piece of documentation in the reference manual depending on the presence or not of a spkg? (analogue of the is_package_installed in module.list.py).

If not, may we just kill the beast, and make lrcalc right away a standard spkg (#11563)?

Cheers,

comment:27 follow-up: Changed 5 years ago by jdemeyer

Maybe this should be discussed on sage-devel? I don't have an opinion either way.

comment:28 in reply to: ↑ 27 Changed 5 years ago by nthiery

  • Description modified (diff)

Replying to jdemeyer:

Maybe this should be discussed on sage-devel? I don't have an opinion either way.

Ok, I just relaunched the discussion there:

http://groups.google.com/group/sage-devel/msg/9a7b4987ae974b2b

comment:29 in reply to: ↑ 26 ; follow-up: Changed 5 years ago by slabbe

Yikes. Is there an idiom to conditionally include a piece of documentation in the reference manual depending on the presence or not of a spkg? (analogue of the is_package_installed in module.list.py).

If you don't include the documentation in the reference manual (by that, I mean no modification to the file doc/en/reference/libs.rst ), does the warning still shows up when building the documentation?

What is the status of the documentation for other optional packages?

comment:30 in reply to: ↑ 29 Changed 5 years ago by nthiery

Salut Sébastien!

Replying to slabbe:

Yikes. Is there an idiom to conditionally include a piece of documentation in the reference manual depending on the presence or not of a spkg? (analogue of the is_package_installed in module.list.py).

If you don't include the documentation in the reference manual (by that, I mean no modification to the file doc/en/reference/libs.rst ), does the warning still shows up when building the documentation?

I guess not, so worst case that will be the way to go. But not having the documentation linked to does not feel good.

What is the status of the documentation for other optional packages?

I did not find that many, and as far as I could see, the documentation was not linked to ...

Cheers,

comment:31 Changed 5 years ago by nthiery

  • Status changed from needs_work to positive_review

Oh well, I just stripped the link to the lrcalc from libs.rst. Ugly, but if that's the price to pay to abide to the rules ...

Jeroen: I am allowing myself to put back the positive review to catch your attention. Feel free to unset it if you find it innappropriate.

comment:32 follow-up: Changed 5 years ago by jdemeyer

  • Status changed from positive_review to needs_work

One more thing: the spkg should follow the format of http://sagemath.org/doc/developer/producing_spkgs.html#the-file-spkg-txt. In particular, the Changelog should be formatted differently.

Changed 5 years ago by nthiery

Final spkg

comment:33 in reply to: ↑ 32 Changed 5 years ago by nthiery

  • Status changed from needs_work to needs_review

Replying to jdemeyer:

One more thing: the spkg should follow the format of http://sagemath.org/doc/developer/producing_spkgs.html#the-file-spkg-txt. In particular, the Changelog should be formatted differently.

Oops. Thanks for spotting this. I updated the spkg accordingly. Do you mind reviewing the new SPKG.txt?

comment:34 follow-up: Changed 5 years ago by jdemeyer

  • Status changed from needs_review to needs_work

Actually, the documentation still doesn't work:

/mnt/usb1/scratch/jdemeyer/merger/sage-5.0.beta2/devel/sage/doc/en/reference/sage/libs/lrcalc/lrcalc.rst:7: WARNING: autodoc can't import/find module 'sage.libs.lrcalc.lrcalc', it reported error: "No module named lrcalc", please check your spelling and sys.path
/mnt/usb1/scratch/jdemeyer/merger/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/misc/edit_module.py:docstring of sage.misc.edit_module.edit_devel:14: WARNING: Inline interpreted text or phrase reference start-string without end-string.

comment:35 in reply to: ↑ 34 Changed 5 years ago by nthiery

Replying to jdemeyer:

Actually, the documentation still doesn't work:

/mnt/usb1/scratch/jdemeyer/merger/sage-5.0.beta2/devel/sage/doc/en/reference/sage/libs/lrcalc/lrcalc.rst:7: WARNING: autodoc can't import/find module 'sage.libs.lrcalc.lrcalc', it reported error: "No module named lrcalc", please check your spelling and sys.path
/mnt/usb1/scratch/jdemeyer/merger/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/misc/edit_module.py:docstring of sage.misc.edit_module.edit_devel:14: WARNING: Inline interpreted text or phrase reference start-string without end-string.

I don't understand. Why is this lrcalc.rst file generated, whereas no such file is generated for, e.g. the analoguous sage/numerical/backends/coin_backend.pyx?

comment:36 follow-ups: Changed 5 years ago by jhpalmieri

When I click on trac_10333-lrcalc-final.patch, it still has a line adding sage/libs/lrcalc/lrcalc to doc/en/reference/libs.rst. That's presumably the problem.

comment:37 in reply to: ↑ 36 ; follow-up: Changed 5 years ago by aschilling

Replying to jhpalmieri:

When I click on trac_10333-lrcalc-final.patch, it still has a line adding sage/libs/lrcalc/lrcalc to doc/en/reference/libs.rst. That's presumably the problem.

Nicolas, could you please also put the updated patch on the sage-combinat server.

Thanks,

Anne

Changed 5 years ago by nthiery

comment:38 in reply to: ↑ 36 Changed 5 years ago by nthiery

Replying to jhpalmieri:

When I click on trac_10333-lrcalc-final.patch, it still has a line adding sage/libs/lrcalc/lrcalc to doc/en/reference/libs.rst. That's presumably the problem.

What's the heck? How did I do this?

Oh well; fixed. Thanks for spotting it!

comment:39 in reply to: ↑ 37 Changed 5 years ago by nthiery

  • Status changed from needs_work to needs_review

Nicolas, could you please also put the updated patch on the sage-combinat server.

Done.

comment:40 follow-up: Changed 5 years ago by nthiery

Jeroen: I let you set back the positive review. Sorry for all the back and forth.

comment:41 in reply to: ↑ 40 Changed 5 years ago by aschilling

  • Status changed from needs_review to positive_review

Replying to nthiery:

Jeroen: I let you set back the positive review. Sorry for all the back and forth.

The line referring to doc/en/reference/libs.rst seems to be gone now, so I set this back to positive review. Hopefully it will work now!

Anne

comment:42 Changed 5 years ago by jdemeyer

  • Merged in set to sage-5.0.beta2
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:43 Changed 5 years ago by nthiery

Yippee :-)

Thanks everyone!

comment:44 Changed 5 years ago by jdemeyer

  • Authors changed from Mike Hansen, Anders Buch, Nicolas Thiery, Anne Schilling to Mike Hansen, Anders Buch, Nicolas M. Thiéry, Anne Schilling
  • Reviewers changed from Nicolas Thiery, Anne Schilling to Nicolas M. Thiéry, Anne Schilling
Note: See TracTickets for help on using tickets.