#16272: redesign transversal designs
-------------------------------------+-------------------------------------
       Reporter:  vdelecroix         |        Owner:  Vincent Delecroix
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.2
      Component:  combinatorics      |   Resolution:
       Keywords:  designs,           |    Merged in:
  orthogona arrays                   |    Reviewers:
        Authors:  Vincent Delecroix  |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:  public/16272       |  bcf917589a03c3e71a800a51d181ed24a96834f9
   Dependencies:  #15310, #16227     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by vdelecroix):

 Replying to [comment:23 ncohen]:
 > Yo !
 >
 > > You are right. I moved `TD_existence` as a doctest in
 `transversal_design` and now `projective_plane_as_OA` belongs to the
 module `block_design`.
 >
 > Okay, I really think that you are wrongly assuming that it is "always
 cool" to add tests, but I always check the long tests when I work on a
 file and adding "a minute there, a minute there" really is painful.
 >
 > Let's talk about the code : you screamed when I removed the feature
 "give me the largest k possible" from the MOLS. It is now time to add it.
 To add the feature in all 3 constructors, because it costs absolutely
 nothing
 >
 > {{{
 > def OA(...):
 >    if k is None:
 >        all(OA(k+1,n,existence=True) for k in range(2,n+4))
 >        return k
 > }}}
 > And for all others
 > {{{
 > def TD(...):
 >     if k is None:
 >         k = OA(None, n,existence = True)
 > }}}
 >
 > Then your doctest will be lighter and we will have the feature back. I
 can do it if you don't want to.
 >
 > Also : would you mind not constructing the design for values of k which
 are smaller than the best possible ? Really, please don't make doctests
 too long. It takes times when you work on code, and you really over-check
 stuff. Remember that all results are checked before being returned anyway,
 so really this is a waste of (developer) time.

 Sounds good to me. I will do it and simplify the doctests accordingly.

 > > The function `projective_plane_as_OA` is not similar to
 `ProjectivePlaneDesign` as it returns an  OA (moreover, possibly not a
 complete OA(n+1,n,2)). To write it, I just pick the code from what was in
 OA and put it in an independent function. To my mind, we should keep the
 `ProjectivePlaneDesign` function as it was before.
 >
 > If you need to rewrite a different version of !ProjectivePlaneDesign
 because it is too slow, is it safe to assume that !ProjectivePlaneDesign
 should be changed ?

 It is not only about conversion. !ProjectivePlaneDesign is buggy: there is
 crazy argument "type" which makes specification a bit more complicated:
  - if type is None: do what you know is the best and return '''a'''
 projective plane
  - if type is something: do whatever the construction tells you and return
 '''the''' corresponding projective plane

 Now if you incorporate the `who_asked` feature. It becomes crazy! I feel
 like `type` and `who_asked` are rather incompatible. To my mind, we should
 simply remove `ProjectivePlaneDesign` and have different functions (which
 raise only `ValueError` on bad entries) for each kind of projective planes
 we know about.

 > It does not make any sense to implement the same thing twice, Vincent,
 really. Of course if you have to call the !ProjectivePlaneDesign you may
 have some conversion to do, but is that really a problem ? We must not
 implement this thing twice, really ....

 What? I only moved '''your''' code from `orthogonal_array` to
 `projective_plane_as_OA`? Just kidding :-P

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

Reply via email to