Opened 2 years ago

Closed 2 years ago

#30250 closed enhancement (fixed)

FiniteRankFreeModule: Simplify unique representation code for dependent modules

Reported by: Matthias Köppe Owned by:
Priority: major Milestone: sage-9.2
Component: linear algebra Keywords:
Cc: Eric Gourgoulhon, Travis Scrimshaw, Michael Jung Merged in:
Authors: Matthias Koeppe Reviewers: Eric Gourgoulhon
Report Upstream: N/A Work issues:
Branch: de35db3 (Commits, GitHub, GitLab) Commit: de35db3bf1378d5505503f08b0887ecd4defc7ff
Dependencies: Stopgaps:

Status badges


A FiniteRankFreeModule instance keeps track of all dependent modules in dictionaries ._tensor_modules, ._exterior_powers, ._dual_exterior_powers.

This is done for two purposes:

  • caching / unique representation of the dependent modules
  • for updating all dependent modules in FreeModuleBasis.__init__

In this ticket, we give these two purposes two separate implementation mechanisms.

This will make it easier to implement new dependent modules, such as tensor products of several modules.

A set ._all_modules will now keep track of the dependent modules.

Change History (5)

comment:1 Changed 2 years ago by Matthias Köppe

Branch: u/mkoeppe/finiterankfreemodule__simplify_unique_representation_code_for_dependent_modules

comment:2 Changed 2 years ago by Matthias Köppe

Authors: Matthias Koeppe
Commit: de35db3bf1378d5505503f08b0887ecd4defc7ff
Status: newneeds_review

New commits:

5a340d9TensorFreeModule.__init__: Remove duplicate registration of self in the base module, uniqueness check
de35db3FreeModuleBasis.__init__: Update all modules in the set fmodule._all_modules

comment:3 Changed 2 years ago by Eric Gourgoulhon

Reviewers: Eric Gourgoulhon
Status: needs_reviewpositive_review

LGTM. Thanks!

comment:4 Changed 2 years ago by Matthias Köppe


comment:5 Changed 2 years ago by Volker Braun

Branch: u/mkoeppe/finiterankfreemodule__simplify_unique_representation_code_for_dependent_modulesde35db3bf1378d5505503f08b0887ecd4defc7ff
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.