On 11/23/13 7:26 AM, Nathann Cohen wrote:
Because perhaps there is a OA construction to build an OA with those
given parameters, and perhaps there is none. And if there is none,
perhaps there is a way to create a TD with the same parameters, in which
case we should built it and convert the output to a OA.
1. Would it be easy and fast to separately check to see if there is a
construction with a particular method? Then you could just ask for the
construction directly, without having that method first go through other
constructions.
If your question is about checking the existence of cached
constructions, see Simon King's answer. If it's not a question of
whether something has already been constructed, then:
In, for example, the implementation of TD, why are you checking first to
see if there is an OA construction before checking if there is a TD
construction? I would have thought your logic would be:
def TD(k,n)
1) Try to see if some TD-specific construction is available for this
set of parameters.
2) elif does there exist a OA(k,n,2) ? If so, return it
3) elif does there exist a MOLS(n, k-2) ? If so, return it
You still have the problem of breaking call graph cycles, though. I
suppose one way of doing this is to pass an extra optional parameter
telling which things you've already tried, which you update and check:
def TD(k,n,tried=None):
tried = set() if tried is None else tried
1) Try to see if some TD-specific construction is available for this
set of parameters.
tried.add('TD')
2) elif if 'OA' not in tried: call OA with the current tried set,
and return it
3) elif 'MOLS' not in tried: call MOLS with the current tried set
and return it
Thanks,
Jason
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.