#20087: `__call__(message)` on a linear code or encoder should return a
codeword.
-------------------------------------+-------------------------------------
Reporter: jsrn | Owner:
Type: enhancement | Status: needs_work
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 | de7193894303ef9945d1f152b80cb46b9987affc
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by jsrn):
* status: needs_review => needs_work
* milestone: sage-duplicate/invalid/wontfix => sage-7.2
Old description:
> If `E` is an `Encoder` for a `LinearCode`, one can use
> `E.encode(message)`, where `message` is in the appropriate space.
> `E(message)` should default to the same behaviour.
New description:
If `E` is an `Encoder` for a `LinearCode` `C`, one can use
`E.encode(message)`, where `message` is in the appropriate space.
`E(message)` should default to the same behaviour. So should `C(message)`.
Be aware that the category framework specifies that `C(c) = c` if `c in
C`. This needs to be handled.
--
Comment:
This issue is not a show-stopper: instead of `__call__` simply aliasing
`self.encode`, it is a proper method which checks its input. If the input
is a codeword, it returns that unchanged. If the input has the correct
length of a message, return the encoded codeword, via `self.encode`.
Otherwise, throw a `ValueError`.
Re-opening.
--
Ticket URL: <http://trac.sagemath.org/ticket/20087#comment:9>
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.