#18099: Prepare linear_code for inheritance
-------------------------------------+-------------------------------------
Reporter: dlucas | Owner:
Type: enhancement | Status: needs_work
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|
8905552948a0896a46e587815cce539b6e60aae9
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Description changed by dlucas:
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.
>
> 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.
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 creating an abstract
linear code class.
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 abstract class constructor as well.
So, every sub-family of linear will only need to inherit from the abstract
class.
Besides, a linear code gets his `base_field` using the `base_ring()`
method coming from its category. Linear codes should have their own method
to do that.
--
--
Ticket URL: <http://trac.sagemath.org/ticket/18099#comment:13>
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.