#15431: Transversal Design TD(6,12)
-------------------------+-------------------------------------------------
Reporter: | Owner:
ncohen | Status: needs_review
Type: | Milestone: sage-6.2
enhancement | Resolution:
Priority: major | Merged in:
Component: | Reviewers:
combinatorics | Work issues:
Keywords: | Commit:
Authors: | 4adf6b5792919daea356c66d511fc621776d0a77
Nathann Cohen | Stopgaps:
Report Upstream: N/A |
Branch: |
u/ncohen/15431 |
Dependencies: |
#15287 #15368 |
-------------------------+-------------------------------------------------
Comment (by ncohen):
> Nope. Look line 200 and 203.
{{{
if k < 2:
raise ValueError("undefined for k less than 2")
elif k >= n+t:
from sage.categories.sets_cat import EmptySetError
# When t=2 then k<n+t as it is equivalent to the existence of n-1
MOLS.
# When t>2 the submatrix defined by the rows whose first t-2
elements
# are 0s yields a OA with t=2 and k-(t-2) columns. Thus k-(t-2) <
n+2,
# i.e. k<n+t.
raise EmptySetError("No Orthogonal Array exists when k>=n+t")
elif t != 2:
raise NotImplementedError("only implemented for t=2")
}}}
You can also see this by clicking on the branch's name at the head of the
ticket. I moved this `t != 2` in an earlier commit.
> I was not arguing about MOLS which for me looks really different. TD and
OA are the very same up to a stupid relabeling. Please do not argue about
MOLS, I want to leave them for now.
I was just saying that those are all equivalent objects up to some
relabelling...
> This is an argument for having two entry points but not having two
places where to find the code.
Well... I saw a construction for a transversal design, I added it to the
constructor of transversal designs. What is the problem with having two
places with code, given that we will have some code in MOLS and in TD at
the same time ?
I mention those MOLS again because I would have agreed with your if we
only had TD and OA. It is too similar to have one which is not just a
translating function for the other, but given that we are more or less
forced to have two versions already, I do not see what would keep us from
having a third one.
> I believe this was not easy, but my job is review. And it should be
clear for anybody who reads the code why there are two different functions
TD and OA. With the definition you gave in the documentation a OA *is* a
TD.
As well as a MOLS.
> On the other hand, look at the code of transversal_design... it is
almost empty except `TD6_12` which is the reason of this patch. I do not
see any reason for having different functions at this point. Do you think
`transversal_design` will get bigger ?
Well, I have a product function for transversal designs to add as part of
the general BIBD with k=5 construction. Not very long, and it can
obviously be rewritten as a TD or a MOLS.
Really, as we are already forced to accept that code will be spread into
at least two functins, MOLS and TD or OA, I just don't mind a third one,
given that some code is written to make them communicate.
And in the end writing code for these objects gets easier : implement a TD
if you want a TD, implement an OA if you want an OA, etc ...
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/15431#comment:14>
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.