Skip to content
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

Automatically add generic encoders/decoders to any linear code class #20840

Closed
sagetrac-dlucas mannequin opened this issue Jun 17, 2016 · 12 comments
Closed

Automatically add generic encoders/decoders to any linear code class #20840

sagetrac-dlucas mannequin opened this issue Jun 17, 2016 · 12 comments

Comments

@sagetrac-dlucas
Copy link
Mannequin

sagetrac-dlucas mannequin commented Jun 17, 2016

Some encoders/decoders (e.g. Syndrome decoders) are "generic" encoders/decoders which work for any linear code family.
This ticket implements a very small change which automatically add these generic decoders to any code family assuming one adds a line related to this encoder/decoder into AbstractLinearCode's constructor.
Before, one had to manually add one's encoder/decoder in any module which contains a linear code class.

CC: @johanrosenkilde

Component: coding theory

Author: David Lucas

Branch: 6d01e05

Reviewer: Johan Sebastian Rosenkilde Nielsen

Issue created by migration from https://trac.sagemath.org/ticket/20840

@sagetrac-dlucas sagetrac-dlucas mannequin added this to the sage-7.3 milestone Jun 17, 2016
@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented Jun 17, 2016

@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented Jun 17, 2016

comment:2

I implemented the feature described above.
I also added a dedicated note in the thematic tutorial which explains how to create new objects in sage/coding.

This is now open for review.


New commits:

55f8771Added automatic registration for generic encoder/decoders
550c584Added a note to document this feature in related tutorial
ad1caddfixed broken doctest in the introductory tutorial

@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented Jun 17, 2016

Commit: ad1cadd

@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented Jun 17, 2016

Author: David Lucas

@johanrosenkilde
Copy link
Contributor

comment:3

I don't think it makes sense to let all codes have ParityCheckEncoder, the reason being that for any code where the default encoder is something else, say A, then ParityCheckEncoder behaves exactly like SystematicEncoder.

This is because ParityCheckEncoder.generator_matrix calls
code.parity_check_matrix().right_kernel() which always returned a matrix in reduced row echelon form, i.e. the same systematic generator matrix that SystematicEncoder uses.

@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented Jun 24, 2016

comment:4

Good point. I made the suggested change and fixed doctests accordingly.
I also removed generic decoders from the list of imports in grs.py, hamming_code.py and punctured_code.py as they are no longer needed there.

David


New commits:

8dc72f5Parity check encoder is no longer systematically imported. Reinstated it in hamming_code.py
46485e6Removed useless imports
6d01e05Fixed broken doctests

@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented Jun 24, 2016

Changed commit from ad1cadd to 6d01e05

@johanrosenkilde
Copy link
Contributor

comment:5

Looks good, green light. But found two unrelated small bugs in Sage while testing this ticket :-)

@johanrosenkilde
Copy link
Contributor

Reviewer: Johan S. R. Nielsen

@vbraun
Copy link
Member

vbraun commented Jun 30, 2016

@jdemeyer
Copy link

Changed reviewer from Johan S. R. Nielsen to Johan Sebastian Rosenkilde Nielsen

@jdemeyer
Copy link

Changed commit from 6d01e05 to none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants