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

AbstractLinearCode.dimension() is wrong if _dimension is not set #21156

Closed
johanrosenkilde opened this issue Aug 3, 2016 · 13 comments
Closed

Comments

@johanrosenkilde
Copy link
Contributor

The current implementation of AbstractLinearCode.dimension() simply accesses self._dimension. But there is no (longer a) requirement that this be set at construction time. The method should instead check if the special variable is set, and if it is not, compute the dimension as the number of rows in a generator matrix.

CC: @sagetrac-dlucas

Component: coding theory

Keywords: linear code, rd3

Author: Bruno Grenet

Branch/Commit: b72b705

Reviewer: Johan Rosenkilde

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

@bgrenet
Copy link
Contributor

bgrenet commented Feb 7, 2017

comment:1

I implemented a fix.

@bgrenet
Copy link
Contributor

bgrenet commented Feb 7, 2017

New commits:

4a8613e21156: Compute dimension if not already known
8c994a621156: Add tests (+ minor typo)

@bgrenet
Copy link
Contributor

bgrenet commented Feb 7, 2017

@bgrenet
Copy link
Contributor

bgrenet commented Feb 7, 2017

Commit: 8c994a6

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 7, 2017

Changed commit from 8c994a6 to fb83a25

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 7, 2017

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

fb83a2521156: Better doctest

@johanrosenkilde
Copy link
Contributor Author

Changed commit from fb83a25 to b72b705

@johanrosenkilde
Copy link
Contributor Author

comment:5

Added a note about the _registered_encoder that bruno ran into when writing the doc test.

Otherwise good, setting positive review.


New commits:

b72b705Added note on class-level registration dictionaries to the doc.

@johanrosenkilde
Copy link
Contributor Author

Reviewer: Johan Rosenkilde

@johanrosenkilde
Copy link
Contributor Author

Author: Bruno Grenet

@johanrosenkilde
Copy link
Contributor Author

Changed keywords from linear code to linear code, rd3

@vbraun
Copy link
Member

vbraun commented Feb 11, 2017

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