#13090: Make LinearCode take minimum distance as a parameter
------------------------------------+---------------------------------------
       Reporter:  ppurka            |         Owner:  wdj         
           Type:  enhancement       |        Status:  needs_review
       Priority:  major             |     Milestone:  sage-5.1    
      Component:  coding theory     |    Resolution:              
       Keywords:  minimum distance  |   Work issues:              
Report Upstream:  N/A               |     Reviewers:              
        Authors:                    |     Merged in:              
   Dependencies:                    |      Stopgaps:              
------------------------------------+---------------------------------------
Changes (by ppurka):

  * status:  new => needs_review


Old description:

> For some codes, the minimum distance is a known parameter. For instance,
> for Reed-Solomon code, Hamming code, Golay code, etc. For these cases,
> making Sage compute the minimum distance is quite a wasted effort.
>
> I am introducing a patch which does the following
> 1. adds an extra parameter `d=None` to `LinearCode`. If `d` is provided,
> then the minimum distance of the code is set to `d`.
> 2. An extra attribute `self.__distance` is introduced which stores the
> distance. If `d` is not provided during the initialization of the class
> and if the minimum distance has already been computed before, then the
> computed value is stored in `d` so that it does not need to be recomputed
> the next time it is called.
> 3. To force recomputation of the distance, if desired,
> `LinearCode.minimum_distance()` takes the parameter `algorithm="gap"`.

New description:

 For some codes, the minimum distance is a known parameter. For instance,
 for Reed-Solomon code, Hamming code, Golay code, etc. For these cases,
 making Sage compute the minimum distance is quite a wasted effort.

 I am introducing a patch which does the following
 1. adds an extra parameter `d=None` to `LinearCode`. If `d` is provided,
 then the minimum distance of the code is set to `d`.
 2. An extra attribute `self.__distance` is introduced which stores the
 distance. If `d` is not provided during the initialization of the class
 and if the minimum distance has already been computed before, then the
 computed value is stored in `d` so that it does not need to be recomputed
 the next time it is called.
 3. To force recomputation of the distance, if desired,
 `LinearCode.minimum_distance()` takes the parameter `algorithm="gap"`.

 To see why the patch can be useful, note the long time it takes to (force)
 compute the distance on a relatively small code:
 {{{
 sage: C = ReedSolomonCode(15,6,GF(16,'a'))
 sage: %time C.minimum_distance()
 CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s
 Wall time: 0.00 s
 10
 sage: %time C.minimum_distance(algorithm='gap') # forcing computation of
 distance
 CPU times: user 0.25 s, sys: 0.04 s, total: 0.29 s
 Wall time: 8.55 s
 10
 }}}
 ----
 Apply [attachment:trac_13090-minimum_distance.patch] to `devel/sage`.

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13090#comment:1>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to