Opened 7 years ago

Last modified 7 years ago

#18099 closed enhancement

Prepare linear_code for inheritance — at Version 3

Reported by: dlucas Owned by:
Priority: major Milestone: sage-6.6
Component: coding theory Keywords: sd66
Cc: jsrn, ncohen Merged in:
Authors: David Lucas Reviewers:
Report Upstream: N/A Work issues:
Branch: u/dlucas/prepare_linear_code_for_inheritance (Commits, GitHub, GitLab) Commit: bf70359e1dd818e8dfc066ad2efa4ea03e06144d
Dependencies: Stopgaps:

Status badges

Description (last modified by jsrn)

For now, every family of linear code (eg: Hamming code) is a method which returns a LinearCode object. It would be nice to change this: every family of code should be an object.

LinearCode?'s need to be initialised with some magic incantations for them to work as modules and in the category framework. This needs to be called by all sub-classes as well, and could be achieved by a "initialise code"-function (which is not __init__).

Several private fields are also being set in the constructor which need to be set by all sub-classes. To avoid that subclasses need to know the name of these private fields (they should be accessed through public getters), we can instead set them using the above function as well.

Besides, a linear code gets his base_ring using the base_ring() method from vector spaces. Linear codes should have their own method to do that.

Change History (3)

comment:1 Changed 7 years ago by dlucas

  • Branch set to u/dlucas/prepare_linear_code_for_inheritance

comment:2 Changed 7 years ago by dlucas

  • Authors set to David Lucas
  • Commit set to bf70359e1dd818e8dfc066ad2efa4ea03e06144d
  • Status changed from new to needs_review

New commits:

4d7f14dNew method: _init_linear_code
bf70359New method: base_field

comment:3 Changed 7 years ago by jsrn

  • Description modified (diff)
Note: See TracTickets for help on using tickets.