#18269: A new structure for experimentation on decoding: communication channels
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  dlucas                 |       Status:  needs_work
           Type:         |    Milestone:  sage-6.7
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:         |    Reviewers:
  coding theory          |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  62a2447c45d3d2878f2da037ea4721464bef2ea4
Report Upstream:  N/A    |     Stopgaps:
         Branch:         |
  u/dlucas/channels      |
   Dependencies:         |
-------------------------+-------------------------------------------------
Changes (by vdelecroix):

 * status:  needs_review => needs_work


Comment:

 Hello,

 1. You might consider inheriting from `SageObject`
 (`sage.structure.sage_object`).

 2. I would rather hide them under `codes.channels.<name>`. That way you
 can avoid the file `channels_catalog`.

 3. Why `sage.coding.channel_constructions` and not `sage.coding.channels`?

 4. Why not setting `__call__` as an alias of `transmit`. That would allow
 {{{
 sage: channel(msg)
 }}}
   which is convenient.

 5. Would be cool to have cross references with actual codes in the
 documentation. Right now the documentation looks like this is an isolated
 block.

 6. You could add various tests to check that if you reset the seed you get
 the same answer. Might be useful to have this doctested and also for users
 to know that they can use it.
 {{{
 sage: set_random_seed(10)
 sage: randint(0,5)
 5
 sage: set_random_seed(10)
 sage: randint(0,5)
 5
 sage: set_random_seed(10)
 sage: randint(0,5)
 5
 }}}

 7. In `_random_error_vector` why not starting with
 {{{
 vect = [F.random_element() for _ in range(n)]
 }}}

 8. The functions `_random_error_position`, `_random_error_vector` and
 `_tuple_to_integer` will not appear in the documentation. You should
 either remove the `_` at the begining or add some `automethod` sphinx
 directives (you have to look in the code to find how to do it)

 9. The function `_random_error_position` should be moved to `prandom`. It
 is useful in its own and quite independent. Note that it is quite similar
 to
 {{{
 sage: sample(range(10), 4)
 [1, 7, 6, 4]
 }}}

 10. For `_random_error_vector` I would rather use
 `F._nonzero_random_element()` that is useful in your case
 {{{
 sage: GF(2)._random_nonzero_element()
 1
 }}}
    of course the default implementation is to call `.random_element` until
 something nonzero is found. Hence you can use

 11. Why do you need this `_tuple_to_integer`? Why not using directly
 `randint(*value)`?
 {{{
 sage: value = [0,5]
 sage: randint(*value)
 3
 sage: value = (0,5)
 sage: randint(*value)
 4
 }}}

 Eleven is a nice prime number. So I will stop there.

 Vincent

--
Ticket URL: <http://trac.sagemath.org/ticket/18269#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to