-
-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare linear_code for inheritance #18099
Comments
Author: David Lucas |
Commit: |
This comment has been minimized.
This comment has been minimized.
comment:5
Helloooooooooooooooooooo ! Several comments:
Nathann |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:8
Okay then! I changed the structure of the file: we now have an David |
comment:10
Helloooooooooooooooooooooo, Several comments:
Thanks, I added a small commit at public/18099. The usual procedure is that, as I Nathann |
comment:11
Also, remember to change the description of the ticket to reflect what it actually does now. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
This comment has been minimized.
This comment has been minimized.
comment:14
Replying to @nathanncohen:
Hello!
Got it! Thanks for the advice :)
Not at all. I kept it in the new version of the code.
Done. These methods are now cached.
Sure. Considering I picked some random methods to illustrate the inheritance mechanism with a dummy class, I just replaced it by something faster. David |
comment:16
Hello, I just had a quick look.
Vincent |
comment:37
I thought I did it. My bad.
Sure. A generator matrix is not mandatory to perform operations of subfamilies of liner codes. For instance, with Reed-Solomon codes, you can encode and decode without using a generator matrix at all (in that case, you work with polynomials only). Compute a generator matrix can take some time for specific codes, and takes space in memory. If any code needs to compute a generator matrix in its constructor, that means you force the user to run a time- and memory-consuming every time he builds a code, even if he does not want to use it to encde and decode.
Ok, I'll do that |
comment:40
Hello, There still are trailing whitespaces! What do you want to do with In your children classes of Vincent |
comment:41
Hi Vincent
It is quite likely that
Clearly that is implied by the fact that the generator matrix given as input to the constructor is all the information that the object has. The
All We will handle this - in a later ticket - using a light-weight system of Best, |
comment:42
Hi Johan, hi David, Then just remove the trailing whitespaces and it will be good to go. Vincent |
comment:43
Hi Vincent and David, Actually, having reflected about it I think I now get Vincent's point on generator matrices. Perhaps the doc for the class
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:45
I removed remaining trailing whitespaces (I hope I caught them all this time...) and I changed |
comment:46
It is fine with trailing whitespaces now. And all test pass. Vincent |
Reviewer: Nathann Cohen, Vincent Delecroix |
Changed author from David Lucas to David Lucas, Johan Nielsen |
Changed branch from u/dlucas/prepare_linear_code_for_inheritance to |
Changed commit from |
Changed author from David Lucas, Johan Nielsen to David Lucas, Johan Sebastian Rosenkilde Nielsen |
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.Besides, every linear codes needs to know its generator matrix to be constructed. This is fine for linear codes without a specific algebraic structure, but not for sub-families of linear codes.
For instance, it is possible to encode & decode words in Reed-Solomon codes without the help of a generator matrix. With regards to this, the user should be free to build the generator matrix for sub-families of code (which can be both a time- and memory-consuming operation).
This is also true for the dimension of a code (which can be long to compute for some sub-families).
However, some parameters (like the length of the code, or its base field) are mandatory to every linear code, and subfamilies. They need to work fine with the category framework as well.
We then propose the following design:
implement an abstract class ,
AbstractLinearCode
, which will initialize parameters used in every linear code, and make linear codes properly interact as modules in the category framework in its constructor. Besides, as all methods that were previously in linear codes need to work for all subfamilies of codes, we propose to relocate them as methods ofAbtractLinearCode
. With this design, every linear code and subfamily will only need to inherit from this abstract class to get all the generic methods and parameters initialized.Besides, linear codes get their
base_ring
method from their category. For better consistency, we propose to implement abase_field()
method which will be specific to linear codes.CC: @johanrosenkilde @nathanncohen
Component: coding theory
Keywords: sd66
Author: David Lucas, Johan Sebastian Rosenkilde Nielsen
Branch:
196e395
Reviewer: Nathann Cohen, Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/18099
The text was updated successfully, but these errors were encountered: