Closed 1861b8a9-77f0-4f35-8431-8514a75b40d1 closed 8 years ago
Branch pushed to git repo; I updated commit sha1. New commits:
1e738f3 | Some docstring typography |
Changed reviewer from Julien Lavauzelle to Julien Lavauzelle, Johan Sebastian Rosenkilde Nielsen
OK, looks good. I fixed some phrasings and some typos in the docstring. If you can accept them, set the ticket to positive review :-)
I accept your changes, positive reviewed!
David
Before you close the ticket (it is not long enough ;-)), just a minor remark: your documentation of decode_to_code
talks about decoding into the "message space" instead of the code.
Otherwise, really good job :)
Changed branch from u/jsrn/generic_decoders to u/dlucas/generic_decoders
Dammit, you're right, I thought I fixed this long ago... Well, nice catch, it's fixed now ;)
New commits:
642dca4 | Fixed typo in decode_to_code |
Something is broken in combination with #19897
sage -t --long src/doc/en/thematic_tutorials/coding_theory.rst
**********************************************************************
File "src/doc/en/thematic_tutorials/coding_theory.rst", line 253, in doc.en.thematic_tutorials.coding_theory
Failed example:
c_dec = C.decode_to_code(r)
Exception raised:
Traceback (most recent call last):
File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 496, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 858, in compile_and_execute
exec(compiled, globs)
File "<doctest doc.en.thematic_tutorials.coding_theory[29]>", line 1, in <module>
c_dec = C.decode_to_code(r)
File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/coding/linear_code.py", line 1656, in decode_to_code
D = self.decoder(decoder_name, **kwargs)
File "sage/misc/cachefunc.pyx", line 1909, in sage.misc.cachefunc.CachedMethodCaller.__call__ (/home/buildslave-sage/slave/sage_git/build/src/build/cythonized/sage/misc/cachefunc.c:9941)
w = self._instance_call(*args, **kwds)
File "sage/misc/cachefunc.pyx", line 1785, in sage.misc.cachefunc.CachedMethodCaller._instance_call (/home/buildslave-sage/slave/sage_git/build/src/build/cythonized/sage/misc/cachefunc.c:9408)
return self.f(self._instance, *args, **kwds)
File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/coding/linear_code.py", line 1739, in decoder
D = decClass(self, **kwargs)
File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/coding/linear_code.py", line 4173, in __init__
self._lookup_table = self._build_lookup_table()
File "sage/misc/cachefunc.pyx", line 2235, in sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__ (/home/buildslave-sage/slave/sage_git/build/src/build/cythonized/sage/misc/cachefunc.c:12406)
self.cache = f(self._instance)
File "/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/sage/coding/linear_code.py", line 4298, in _build_lookup_table
lookup[s] = copy(e)
MemoryError
**********************************************************************
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
cb65314 | Update to latest beta |
2057fee | Small fixes and improvements |
d9bcb28 | Update to 7.1beta0 |
70e5211 | Added ..linkall keyword and wrote a new paragraph on decoders and introspections |
4035292 | Moved and fixed list of decoder types |
b443718 | Update to 7.1beta1 |
61d49cc | Rewrote some sentences and fixed typos |
12bf512 | Removed table of types |
564dcdd | Merge branch 'introductory_thematic_tutorial' into generic_decoders |
2bef528 | Picked a smaller code in thematic tutorial to fix examples |
I identified the problem, it was because of a [12, 4] GRS code over GF(13)
in my examples.
Decoding over this code using the new syndrome decoder required to build a huge syndrome lookup table, hence the memory error.
I replaced it by a [6, 3] code over GF(7)
, so it should be fine now.
Reopening for review...
David
Hah, that's pretty funny: before, the syndrome decoder was actually a nearest neighbor decoder, and therefore ran in q^k
. Now, it's really a syndrome decoder and runs in q^(n-k)
, which is too big for the previous example in the tutorial.
Perhaps, a linear code should default to using syndrome or nearest neighbor depending on which of q^(n-k)
or q^k
is biggest?
For this ticket: green again.
Changed branch from u/dlucas/generic_decoders to 2bef528
The current implementation of syndrome decoder for linear codes actually uses a nearest neighbor decoding algorithm.
It should be rewritten.
CC: @johanrosenkilde @ClementPernet @jlavauzelle
Component: coding theory
Author: David Lucas
Branch/Commit:
2bef528
Reviewer: Julien Lavauzelle, Johan Sebastian Rosenkilde Nielsen
Issue created by migration from https://trac.sagemath.org/ticket/19623