Opened 6 years ago

Closed 6 years ago

#20835 closed enhancement (fixed)

Systematic encoder for linear codes

Reported by: dlucas Owned by:
Priority: major Milestone: sage-7.3
Component: coding theory Keywords:
Cc: jsrn, cpernet Merged in:
Authors: David Lucas Reviewers: Johan Rosenkilde
Report Upstream: N/A Work issues:
Branch: 3a2f5ac (Commits, GitHub, GitLab) Commit: 3a2f5ac5569301cf07f765a872dca882cbb05c32
Dependencies: #20840 Stopgaps:

Status badges


This ticket introduces a generic systematic encoder for linear codes.

Change History (15)

comment:1 Changed 6 years ago by dlucas

  • Branch set to u/dlucas/systematic_encoder

comment:2 Changed 6 years ago by dlucas

  • Authors set to David Lucas
  • Commit set to ebe977bb98a2fad16729062493ca79015b2b7dbe
  • Status changed from new to needs_review

I pushed the code, this ticket is now open for review.

New commits:

54b50b7Implemented a systematic encoder
ebe977bMethod generator_matrix_systematic now uses the encoder

comment:3 Changed 6 years ago by git

  • Commit changed from ebe977bb98a2fad16729062493ca79015b2b7dbe to 7248f402a963e6963eeea842e496050faa832c51

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

51205d0Changed _repr_ and _latex_ output message. Replaced for the by for in such messages in other objects' representation methods
2d02053Renamed rank_profile_colum_indices, simplified its implementation
7248f40Rewrote class documentation of the encoder

comment:4 Changed 6 years ago by dlucas

I made some changes to this ticket:

  • I simplified the output message of _repr_ and _latex_. I also noticed other encoders in were outputting Encoder blah for the Code blah, while Sage convention is to write Encoder blah for Code blah. I fixed this as well.
  • I renamed rank_profile_column_indices into systematic_positions, and utterly simplified its implementation.
  • I also added details on the encoding, and what we call "systematic form" to the class docstring.

This is still open for review.

comment:5 Changed 6 years ago by git

  • Commit changed from 7248f402a963e6963eeea842e496050faa832c51 to 2887ee18959433736a8873c15efc654ba724fb0f

Branch pushed to git repo; I updated commit sha1. 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
2887ee1Merged trac #20840, fixed conflicts and broken doctets

comment:6 Changed 6 years ago by dlucas

  • Dependencies set to #20840

As this ticket introduces a new generic encoder, I merged in #20840 and made the appropriate changes. It now depends on #20840 and is still open for review (and I'm done pushing changes now ;))


comment:7 Changed 6 years ago by git

  • Commit changed from 2887ee18959433736a8873c15efc654ba724fb0f to bb41e2142497753f11efa1957f1b392e26a817a4

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

5036711Merge branch 'develop' into systematic_encoder
83cb47aSystematic encoder now includes parity check encoder's behaviour. Deprecated parity check encoder
8dc72f5Parity check encoder is no longer systematically imported. Reinstated it in
46485e6Removed useless imports
6d01e05Fixed broken doctests
bb41e21Merged latest version of #20835 and fixed conflicts

comment:8 Changed 6 years ago by dlucas

As LinearCodeParityCheckEncoder and LinearCodeSystematicEncoder were actually doing the same thing, I modified the latter so it now uses a parity check matrix when computing a generator matrix if it is the default encoder. I also deprecated the former. I also merged in latest version of #20840 and fixed conflicts.

This is open for review.


comment:9 Changed 6 years ago by jsrn

In AbstractLinearCode.generator_matrix_systematic, shouldn't the method call AbstractLinearCode.encoder in order to use a possible cached systematic encoder?

Also, perhaps this ticket is as good a place as any to rename that method into systematic_generator_matrix and deprecate the old name.

Best, Johan

comment:10 Changed 6 years ago by git

  • Commit changed from bb41e2142497753f11efa1957f1b392e26a817a4 to 2089792e4392f69f0cd2503d6392bd93fb454684

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

170e79cMerge branch 'u/dlucas/systematic_encoder' of git:// into systematic_encoder
9ab771aRenamed generator_matrix_systematic into systematic_generator_matrix, changed its implementation
2089792Fixed broken doctest in

comment:11 Changed 6 years ago by dlucas


I made the requested changes.


comment:12 Changed 6 years ago by jsrn

  • Branch changed from u/dlucas/systematic_encoder to u/jsrn/systematic_encoder

comment:13 Changed 6 years ago by jsrn

  • Commit changed from 2089792e4392f69f0cd2503d6392bd93fb454684 to 3a2f5ac5569301cf07f765a872dca882cbb05c32
  • Reviewers set to Johan Rosenkilde

Good job with the patch. I made a few improvements to the doc. I also added a check to avoid infinite recursion in case the user made a class with the systematic encoder as default encoder but forgot to override parity check matrix.

If you can accept my changes, please set the ticket to positive review. Best, Johan

New commits:

3e5e0b2Improved some documentation
f90f4eeAdd a catch to avoid infinite loop in case of user error + examples
ab1cc5aFix to encoder catalog doc
3a2f5acFixes to LinearCodeSystematicEncoder doc

comment:14 Changed 6 years ago by dlucas

  • Status changed from needs_review to positive_review

Tests pass, documentation compiles and I accept your changes, I set this ticket to positive review.


comment:15 Changed 6 years ago by vbraun

  • Branch changed from u/jsrn/systematic_encoder to 3a2f5ac5569301cf07f765a872dca882cbb05c32
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.