#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:24 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.
>
Arrrrrrggggghhhhhhh. The `k` comes before the `n`. So there is no way to
make `k` optional without making `n` optional... do you feel like having
something like
{{{
def transversal_design(k,n=None):
if n is None:
n = k
k = best_possible(n)
...
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/16272#comment:25>
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.