#18099: Prepare linear_code for inheritance
-------------------------------------+-------------------------------------
Reporter: dlucas | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.6
Component: coding theory | Resolution:
Keywords: sd66 | Merged in:
Authors: David Lucas | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/dlucas/prepare_linear_code_for_inheritance|
bf70359e1dd818e8dfc066ad2efa4ea03e06144d
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Description changed by jsrn:
Old description:
> 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.
>
> Because most codes share parameters (like `length`) it could be a good
> idea to do several parameter assignements in a specific method which be
> be called by each subclass to automatically do these assignements.
>
> 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.
New description:
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.
--
--
Ticket URL: <http://trac.sagemath.org/ticket/18099#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.