Opened 11 years ago

Last modified 11 years ago

#9651 closed enhancement

Addition on CombinatorialFreeModule directly on dictionaries — at Version 4

Reported by: stumpc5 Owned by: sage-combinat
Priority: major Milestone: sage-4.6.1
Component: combinatorics Keywords: addition of dictionaries, CombinatorialFreeModule
Cc: Merged in:
Authors: Christian Stump Reviewers: Daniel Bump
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by bump)

At the moment, adding (and taking negative, substracting,...) for CombinatorialFreeModule? is not done in a very efficient way.

This patch

  • provides a cythonized version of a pointwise addition of dictionaries, together with multiple options
  • is (indirectly) based on the patch in Ticket #9648

======================================

prerequisite: trac_9648_modulemorphism_codomain_extension.2.patch

apply that patch and trac_9651_CombinatorialFreeModule_Addition-cs.4.patch, which supercedes the previously posted patches on this page.

Change History (9)

comment:1 Changed 11 years ago by stumpc5

  • Status changed from new to needs_review

The patch still needs some doctesting (I have not yet done much, but will do more these days) - in particular, I modified CombinatorialFreeModule?._apply_module_morphism and .apply_module_endomorphism. The first method is used in the code for symmetric functions: powersum.py, sfa.py and macdonald.py. Would be nice if someone could check if everything there still works well.

Thx, Christian

comment:2 Changed 11 years ago by bump

The patch doesn't apply cleanly to sage-4.5.3.rc0. Applying #9648 first doesn't help.

comment:3 Changed 11 years ago by bump

The revised patch trac_9651_CombinatorialFreeModule_Addition-cs.patch applies cleanly to sage 4.6.alpha1 and passes all tests.

But I haven't been able to confirm that it is a speedup. The results of some testing are here:

http://groups.google.com/group/sage-combinat-devel/msg/4869cc885ca42bc1

Changed 11 years ago by stumpc5

includes referees suggestions

Changed 11 years ago by stumpc5

includes more referees suggestions

comment:4 Changed 11 years ago by bump

  • Description modified (diff)
  • Reviewers set to Daniel Bump
  • Status changed from needs_review to positive_review

Positive review!

There is a thread about this patch in sage-combinat-devel resulting in the latest version.

I tested this with sage-4.6.alpha3. After applying

trac_9648_modulemorphism_codomain_extension.2.patch 
trac_9651_CombinatorialFreeModule_Addition-cs.4.patch

all tests pass. I also confirmed that the test is a speedup.

Note: See TracTickets for help on using tickets.