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

Improve grs.py documentation #20849

Closed
sagetrac-dlucas mannequin opened this issue Jun 20, 2016 · 41 comments
Closed

Improve grs.py documentation #20849

sagetrac-dlucas mannequin opened this issue Jun 20, 2016 · 41 comments

Comments

@sagetrac-dlucas
Copy link
Mannequin

sagetrac-dlucas mannequin commented Jun 20, 2016

Some doctests in grs.py are quite unhelpful, and some classes description do not explain at all how
the class works (especially for the encoders).

This ticket fixes that.

CC: @johanrosenkilde

Component: coding theory

Keywords: rd3

Author: David Lucas, Clément Pernet

Branch/Commit: 2ae9428

Reviewer: Daniel Augot, Travis Scrimshaw, Clément Pernet

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

@sagetrac-dlucas sagetrac-dlucas mannequin added this to the sage-7.3 milestone Jun 20, 2016
@sagetrac-dlucas sagetrac-dlucas mannequin changed the title Improved grs.py documentation Improve grs.py documentation Jun 20, 2016
@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented Jun 20, 2016

Branch: u/dlucas/rewrite_grs_docstrings

@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented Jun 20, 2016

Commit: 5dccaa0

@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented Jun 20, 2016

comment:3

I pushed my branch, this is now open for review.


New commits:

5dccaa0Improved documentation in grs.py

@sagetrac-dlucas
Copy link
Mannequin Author

sagetrac-dlucas mannequin commented Jun 20, 2016

Author: David Lucas

@sagetrac-danielaugot
Copy link
Mannequin

sagetrac-danielaugot mannequin commented Aug 25, 2016

comment:4

Hi David,

typos:

  • scalaers

remarks and suggestions:

  • minimum_distance the new doc string is less clear than previous one. The notion of minimum distance is clear in coding theory, no need to be explicit. If you really want to explicit it, change the sentence of the new docstring to Returns the minimum distance between any two words in ``self``.

  • column_multipliers, parity_column_multipliers: the new doc strings speaks about positions scalars, while these methods deal with multipliers.

  • weight_enumerator: it would be better to say "the polynomial whose coefficient of degree is [...]" to avoid naming the variable 'x'

  • (several places) the framework for describing the encoding could be made a bit more clear, using the terms "message" and "encoding" more explicitly. Instead of

Let `m = (m_1, \dots, m_k)` a vector over F.
[...]
The corresponding codeword is the following vector:

what about

let `m=[...]` a vector over F be the message:
[...]
the encoding of `m` will be the following codeword:
  • class GRSErrorErasureDecoder(Decoder) it would be better to say : floor((d-1)/2 instead of "decoding radius". Also the input to the decode method should be a word_and_erasure vector, not a vector y.

Daniel

@sagetrac-ylchapuy
Copy link
Mannequin

sagetrac-ylchapuy mannequin commented Oct 21, 2016

comment:5

needs rebase.

also:

  • typo: scalaers

@ClementPernet
Copy link
Contributor

@ClementPernet
Copy link
Contributor

Changed commit from 5dccaa0 to 21ce2d0

@ClementPernet
Copy link
Contributor

comment:7

Rebased and fixed the scalaers typo. Other remarks by danielaugot still need to be adressed.


New commits:

21ce2d0Merge branch 'u/dlucas/rewrite_grs_docstrings' of git://trac.sagemath.org/sage into grs_docstring

@ClementPernet
Copy link
Contributor

Changed keywords from none to rd3

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 9, 2017

Changed commit from 21ce2d0 to b2dfd4d

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 9, 2017

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

b2dfd4dfix docstring following danielaugot's suggestions and turn verbs to imperative

@ClementPernet
Copy link
Contributor

Changed author from David Lucas to David Lucas, Clément Pernet

@ClementPernet
Copy link
Contributor

comment:10

I fixed the merge conflict and all outstanding remarks by danielaugot.
I also took this opportunity to turn the verbs to imperative at the beginning of almost each docstring.
Ready for review

@sagetrac-danielaugot
Copy link
Mannequin

sagetrac-danielaugot mannequin commented Feb 9, 2017

comment:11

A very small typo with maths in the docstring of GRSErrorErasureDecoder. The hamming_weight gives a bad rendering in math mode, just fix the "_" in

    - Create a new GRS code of length `n-hamming_weight(e)`, dimension `k`.

docstring.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 9, 2017

Changed commit from b2dfd4d to 2036806

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 9, 2017

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

2036806fix typesetting of Hamming weight

@ClementPernet
Copy link
Contributor

comment:13

Typesetting updated.

@sagetrac-danielaugot
Copy link
Mannequin

sagetrac-danielaugot mannequin commented Feb 10, 2017

Reviewer: Daniel Augot

@sagetrac-danielaugot
Copy link
Mannequin

sagetrac-danielaugot mannequin commented Feb 14, 2017

comment:19

I did a refined test. The following builds nicely the coding pdf doc.

./sage -b
./sage --docbuild reference/coding pdf

and evince ./local/share/doc/sage/pdf/en/reference/coding/coding.pdf shows a correct pdf.

@tscrim
Copy link
Collaborator

tscrim commented Feb 14, 2017

comment:21

I've pushed a branch to u/tscrim/improve_grs-20849 that does a little bit more cleanup of the doc (including some of the parts added here) and of the file itself. If you want to review that here, then go ahead and do so, but feel free to use that as a branch for a followup ticket too.

@tscrim tscrim modified the milestones: sage-7.3, sage-7.6 Feb 14, 2017
@ClementPernet
Copy link
Contributor

comment:22

Travis. Thanks for your follow-up corrections. Please push your branch to this ticket, as it is based on the latest commit of mine.
I am willing to positive review all of your changes except the following ones:

  • in several place, you added a line break before a \textnormal{ Reed Solomon Code over }...
    there is an extra space identation in each of these which I think should be removed.
  • You replaced a new GRS code of length `n-hamming_weight(e)` by
    a new GRS code of length equal to the `n`-hamming weight of `e`.
    This sentence does not make sense. Maybe change it to a new GRS code of length equal to `n` minus the Hamming weight of `e` (move the and capitalize Hamming)

Hence I put the ticket in needs-work status again.

@ClementPernet
Copy link
Contributor

comment:23

Also can you fix line 957:
an polynomial to a polynomial

@tscrim
Copy link
Collaborator

tscrim commented Feb 15, 2017

comment:24

Replying to @ClementPernet:

Travis. Thanks for your follow-up corrections. Please push your branch to this ticket, as it is based on the latest commit of mine.
I am willing to positive review all of your changes except the following ones:

  • in several place, you added a line break before a \textnormal{ Reed Solomon Code over }...
    there is an extra space identation in each of these which I think should be removed.

At the risk of bikeshedding, the spaces are there in order to show that the line came from a line break in the output. This is used in a number of other places in Sage too. IMO it builds a better association to the line above it, but I don't have a strong opinion on this.

  • You replaced a new GRS code of length `n-hamming_weight(e)` by
    a new GRS code of length equal to the `n`-hamming weight of `e`.
    This sentence does not make sense. Maybe change it to a new GRS code of length equal to `n` minus the Hamming weight of `e` (move the and capitalize Hamming)

Ah, I mis-parsed that sentence. I was wondering what the n-Hamming weight was and why I couldn't find a definition. Fixed.


New commits:

e2d07fcMerge branch 'u/cpernet/rewrite_grs_docstrings' of git://trac.sagemath.org/sage into u/tscrim/improve_grs-20849
cde29f7Doing a little bit of extra cleanup.
e9fcb77Some details.

@tscrim
Copy link
Collaborator

tscrim commented Feb 15, 2017

Changed reviewer from Daniel Augot to Daniel Augot, Travis Scrimshaw

@tscrim
Copy link
Collaborator

tscrim commented Feb 15, 2017

Changed branch from u/cpernet/rewrite_grs_docstrings to u/tscrim/improve_grs-20849

@tscrim
Copy link
Collaborator

tscrim commented Feb 15, 2017

Changed commit from 1d9c6cb to e9fcb77

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 18, 2017

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

d631689Merge branch 'develop' into u/tscrim/improve_grs-20849

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 18, 2017

Changed commit from e9fcb77 to d631689

@tscrim
Copy link
Collaborator

tscrim commented Feb 22, 2017

comment:27

ping

@ClementPernet
Copy link
Contributor

Changed branch from u/tscrim/improve_grs-20849 to u/cpernet/improve_grs-20849

@ClementPernet
Copy link
Contributor

comment:29

Positive review to all recent commits by Travis. I also pushed a minor edit, replacing H(e) by the standard notation w(e).
Travis, can you please just review this last edit and were fine.


New commits:

521fc25Use the more standard notation w for Hamming weight function [Roth'06].
2ae9428Merge branch 'u/tscrim/improve_grs-20849' of git://trac.sagemath.org/sage into u/tscrim/improve_grs-20849

@ClementPernet
Copy link
Contributor

Changed commit from d631689 to 2ae9428

@ClementPernet
Copy link
Contributor

Changed reviewer from Daniel Augot, Travis Scrimshaw to Daniel Augot, Travis Scrimshaw, Clément Pernet

@tscrim
Copy link
Collaborator

tscrim commented Feb 28, 2017

comment:31

LGTM. Sorry, I didn't know standard notation and just took a guess.

@vbraun
Copy link
Member

vbraun commented Mar 1, 2017

Changed branch from u/cpernet/improve_grs-20849 to 2ae9428

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