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

Shorter printing of core linear code objects #21691

Closed
johanrosenkilde opened this issue Oct 12, 2016 · 13 comments
Closed

Shorter printing of core linear code objects #21691

johanrosenkilde opened this issue Oct 12, 2016 · 13 comments

Comments

@johanrosenkilde
Copy link
Contributor

The central objects for linear codes in Sage prints unnecessarily long, even though there are established conventions for shorter description. This ticket proposes a change to that:

Linear code of length 7, dimension 3 over Finite Field of size 2^3
   should be
[7, 3] linear code over GF(8)

Printing GF(8) is the only controversial thing here, from a Sage POV. The
argument is that linear codes are always over finite fields, so it is
unnecessarily verbose to insist on the long printing. (formally, using LinearCode over a ring has not been deprecated yet, see #20387, but a code over a ring is not a "linear code" in the classical sense)

Other proposed changes are:

  • Generalized Reed-Solomon Code -> Reed-Solomon Code (whenever the column multipliers are all-1)
  • Extended code coming from <bla> -> Extension of <bla>
  • Punctured code coming from <bla> -> Puncturing of <bla>
  • Subfield subcode over <subfield> coming from <code> -> Subfield subcode of <bla> down to <subfield>

Related objects (e.g. encoders and decoders) have been shortened similarly
(though much more could be done here).

An unrelated change which I put here anyway is a polishing of AbstractLinearCode's class doc, and improved error messages for its encoder() and decoder() methods.

CC: @sagetrac-dlucas @jlavauzelle

Component: coding theory

Keywords: linear_code

Author: Johan Rosenkilde

Branch/Commit: 2316e35

Reviewer: Julien Lavauzelle

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

@johanrosenkilde
Copy link
Contributor Author

Branch: u/jsrn/improve_linear_code_messages

@johanrosenkilde
Copy link
Contributor Author

New commits:

77772c3Better error message for encode and decoder
d2f4c18Improve some class doc in AbstractLinearCode
dafdadfShortened printing of many linear code objects.

@johanrosenkilde
Copy link
Contributor Author

Commit: dafdadf

@jlavauzelle
Copy link

@jlavauzelle
Copy link

comment:4

Hi Johan,

Nice changes, it makes it really more readable. I only have one suggestion for punctured codes. You wrote for instance: Puncturing of [11, 5] linear code over GF(7) punctured (...) but I think writing "Puncturing/punctured" only once would be even easier to read. However I'm not that fluent in english, so maybe I'm wrong...

I also made 3 optional doctests pass in guava.py and merge with the latest beta (7.5.beta1).

Julien


New commits:

4d65268Merge branch 'u/jsrn/improve_linear_code_messages' of git://trac.sagemath.org/sage into 21691_shorter_printing
a3b2b66Merged with latest beta (7.5.beta1).
ba19b0cFixed doctest on optional guava package.

@jlavauzelle
Copy link

Reviewer: Julien Lavauzelle

@jlavauzelle
Copy link

Changed commit from dafdadf to ba19b0c

@jlavauzelle jlavauzelle modified the milestones: sage-7.4, sage-7.5 Nov 1, 2016
@johanrosenkilde
Copy link
Contributor Author

comment:5

Hi Julien,
Thanks for the review and good catch with the optional doctests. I agree with you on the puncturing. What about Puncturing of [11, 5] linear code over GF(7) at positions [1,2]?

I would make the change, but I'm running some heavy computations and I'm worried that I'll break something by recompiling and experimenting. Could you do it?

Best,
Johan

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 2, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

2316e35Improved punctured codes representation and fixed doctests.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 2, 2016

Changed commit from ba19b0c to 2316e35

@jlavauzelle
Copy link

comment:7

Hi Johan,

I did that change. Patchbot also found doctest failures in some crazy tutorials (one about linear codes and ciphers, the other about graphs...). I fixed them.

I'll wait your green light on my changes to give the positive review.

Best,

Julien

@johanrosenkilde
Copy link
Contributor Author

comment:8

It looks great, thanks a lot!
Johan

@vbraun
Copy link
Member

vbraun commented Nov 7, 2016

Changed branch from u/jlavauzelle/improve_linear_code_messages to 2316e35

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