Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Changed _repr_ and _latex_ output message. Replaced for the by for in…
Browse files Browse the repository at this point in the history
… such messages in other objects' representation methods
  • Loading branch information
David Lucas committed Jun 17, 2016
1 parent ebe977b commit 51205d0
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/sage/coding/linear_code.py
Expand Up @@ -4008,7 +4008,7 @@ def __init__(self, code):
sage: C = LinearCode(G)
sage: E = codes.encoders.LinearCodeParityCheckEncoder(C)
sage: E
Parity check matrix-based encoder for the Linear code of length 7, dimension 4 over Finite Field of size 2
Parity check matrix-based encoder for Linear code of length 7, dimension 4 over Finite Field of size 2
"""
super(LinearCodeParityCheckEncoder, self).__init__(code)

Expand All @@ -4022,9 +4022,9 @@ def _repr_(self):
sage: C = LinearCode(G)
sage: E = codes.encoders.LinearCodeParityCheckEncoder(C)
sage: E
Parity check matrix-based encoder for the Linear code of length 7, dimension 4 over Finite Field of size 2
Parity check matrix-based encoder for Linear code of length 7, dimension 4 over Finite Field of size 2
"""
return "Parity check matrix-based encoder for the %s" % self.code()
return "Parity check matrix-based encoder for %s" % self.code()

def _latex_(self):
r"""
Expand All @@ -4036,9 +4036,9 @@ def _latex_(self):
sage: C = LinearCode(G)
sage: E = codes.encoders.LinearCodeParityCheckEncoder(C)
sage: latex(E)
\textnormal{Parity check matrix-based encoder for the }[7, 4]\textnormal{ Linear code over }\Bold{F}_{2}
\textnormal{Parity check matrix-based encoder for }[7, 4]\textnormal{ Linear code over }\Bold{F}_{2}
"""
return "\\textnormal{Parity check matrix-based encoder for the }%s" % self.code()._latex_()
return "\\textnormal{Parity check matrix-based encoder for }%s" % self.code()._latex_()

@cached_method
def generator_matrix(self):
Expand Down Expand Up @@ -4086,7 +4086,7 @@ def __init__(self, code):
sage: C = LinearCode(G)
sage: E = codes.encoders.LinearCodeSystematicEncoder(C)
sage: E
Generator matrix in systematic form-based encoder for the Linear code of length 7, dimension 4 over Finite Field of size 2
Systematic encoder for Linear code of length 7, dimension 4 over Finite Field of size 2
"""
super(LinearCodeSystematicEncoder, self).__init__(code)

Expand All @@ -4100,9 +4100,9 @@ def _repr_(self):
sage: C = LinearCode(G)
sage: E = codes.encoders.LinearCodeSystematicEncoder(C)
sage: E
Generator matrix in systematic form-based encoder for the Linear code of length 7, dimension 4 over Finite Field of size 2
Systematic encoder for Linear code of length 7, dimension 4 over Finite Field of size 2
"""
return "Generator matrix in systematic form-based encoder for the %s" % self.code()
return "Systematic encoder for %s" % self.code()

def _latex_(self):
r"""
Expand All @@ -4114,9 +4114,9 @@ def _latex_(self):
sage: C = LinearCode(G)
sage: E = codes.encoders.LinearCodeSystematicEncoder(C)
sage: latex(E)
\textnormal{Generator matrix in systematic form-based encoder for the }[7, 4]\textnormal{ Linear code over }\Bold{F}_{2}
\textnormal{Systematic encoder for }[7, 4]\textnormal{ Linear code over }\Bold{F}_{2}
"""
return "\\textnormal{Generator matrix in systematic form-based encoder for the }%s" % self.code()._latex_()
return "\\textnormal{Systematic encoder for }%s" % self.code()._latex_()

@cached_method
def generator_matrix(self):
Expand Down

0 comments on commit 51205d0

Please sign in to comment.