In the first paragraph of the documentation it says:

"If its dimension is denoted k then we typically store a basis of C as
a kxn matrix,
with rows the basis vectors. It is called the generator matrix of C."

I personally define a generator matrix to be a full rank matrix. I assumed that
this was standard terminology. Is that assumption wrong?


On Thu, Jun 9, 2011 at 5:52 PM, D. Monarres <dmmonar...@gmail.com> wrote:
>
> This also seems to cause problems with decoding.  I am posting here just to
> make sure that this would actually be considered a bug, not just user error.
>  Everything works as expected when I construct the same code with a full
> rank generator matrix.
>
>
> (with C defined as before)
>
> sage: C.decode([1,0,1,0,1])
> ---------------------------------------------------------------------------
> IndexError                                Traceback (most recent call last)
> /home/ayeq/sage/local/lib/python2.6/site-packages/sage/all_cmdline.pyc in
> <module>()
> /home/ayeq/sage/local/lib/python2.6/site-packages/sage/misc/decorators.pyc
> in wrapper(*args, **kwds)
>     571                     kwds[new_name] = kwds[old_name]
>     572                     del kwds[old_name]
> --> 573             return func(*args, **kwds)
>     574
>     575         return wrapper
> /home/ayeq/sage/local/lib/python2.6/site-packages/sage/coding/linear_code.pyc
> in decode(self, right, algorithm)
>    1174         from decoder import decode
>    1175         if algorithm=="syndrome" or algorithm=="nearest neighbor":
> -> 1176             return decode(self,right)
>    1177         if not(algorithm in ["syndrome", "nearest
> neighbor","guava"]):
>    1178             raise NotImplementedError, "Only 'syndrome','nearest
> neighbor','guava' are implemented."
> /home/ayeq/sage/local/lib/python2.6/site-packages/sage/misc/decorators.pyc
> in wrapper(*args, **kwds)
>     571                     kwds[new_name] = kwds[old_name]
>     572                     del kwds[old_name]
> --> 573             return func(*args, **kwds)
>     574
>     575         return wrapper
> /home/ayeq/sage/local/lib/python2.6/site-packages/sage/coding/decoder.pyc in
> decode(C, v, algorithm)
>     119         return diffs[0][0]+v
>     120     if algorithm=="syndrome":
> --> 121         return -V(syndrome(C, v)[0])+v
>     122
>     123
> /home/ayeq/sage/local/lib/python2.6/site-packages/sage/coding/decoder.pyc in
> syndrome(C, v)
>      45         v = v.list()
>      46     v = V(v)
> ---> 47     coset = [[c+v,hamming_weight(c+v)] for c in C]
>      48     coset.sort(lambda x,y: x[1]-y[1])
>      49     return [x[0] for x in coset]
> /home/ayeq/sage/local/lib/python2.6/site-packages/sage/coding/linear_code.pyc
> in __iter__(self)
>     759         k = self.dimension()
>     760         F = self.base_ring()
> --> 761         Cs,p = self.standard_form()
>     762         Gs = Cs.gen_mat()
>     763         V = VectorSpace(F,k)
> /home/ayeq/sage/local/lib/python2.6/site-packages/sage/coding/linear_code.pyc
> in standard_form(self)
>    2438         for i in range(1,k+1):
>    2439             r = M.rows()[i-1]
> -> 2440             j = r.nonzero_positions()[0]
>    2441             if (j < d and i <> j+1):
>    2442                 perm = perm *G([(i,j+1)])
> IndexError: list index out of range
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to