#20087: `__call__(message)` on a linear code or encoder should return a 
codeword.
-------------------------------------+-------------------------------------
       Reporter:  jsrn               |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.2
      Component:  coding theory      |   Resolution:
       Keywords:  beginner           |    Merged in:
        Authors:  David Lucas        |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/dlucas/shortcut_to_encode        |  92478fd38aa81b95324b2a3b4104416fcc068620
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by jsrn):

 > Should it? IMHO, there's nothing elaborate to do for the encoder. If one
 creates a code `C` and an encoder `E` for `C`, and types `E(c)` for some
 `c`, if `c` does not belong to the message space of `E` it should fail. To
 me, the only purpose of an encoder is to transform elements of the message
 space into codeword. So if one passes an element which does not belong to
 the message space, failing makes sense.

 Oh yeah, you're right. But this patch then still adds the alias
 `Encoder.__call__` as `Encoder.encode`, I presume?

 > I think he meant if one tries to pass an element of the ambient space of
 the code which does not belong to the code. I added a check for that: as I
 cannot picture an encoder whose message space is the ambient space of the
 code, it makes sense to immediately reject vectors which are in the
 ambient space but not in the code, as it avoids calling `encode` and thus
 constructing an encoder for nothing.

 Hm, makes sense. You have a typo in the error message though (is -> it)

--
Ticket URL: <http://trac.sagemath.org/ticket/20087#comment:16>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to