#16534: Basic Block design methods
-------------------------------------+-------------------------------------
       Reporter:  brett              |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.4
      Component:  combinatorial      |   Resolution:
  designs                            |    Merged in:
       Keywords:  Block Design,      |    Reviewers:
  Incidence Structure, Residual,     |  Work issues:
  Derived, Complement, Supplement,   |       Commit:
  Union                              |  dc5e9c654673101f1875cc3e1cc7221ce4c8d6c0
        Authors:  Brett Stevens      |     Stopgaps:
Report Upstream:  N/A                |
         Branch:  u/brett/design     |
   Dependencies:  #16553             |
-------------------------------------+-------------------------------------

Comment (by brett):

 Replying to [comment:24 ncohen]:
 > Hellooooooo Brett,
 >
 > Your branch does not seem to be compatible with Sage's latest developer
 version
 > (its name appears in red on the trac ticket). Could you please fix that
 by
 > rebasing/merging it with the latest beta?

 I will try but I may have questions

 >
 > Also:
 >
 > - We try to keep trac tickets "thematically focused". Thus, it would
 have been
 >   better to open a new ticket to discuss your modification of `.packing`
 instead
 >   of doing it here. It is not a big deal, so let us do everything at
 once here
 >   anyway.

 wait, which should we do?

 >
 > - I am not a big defender of your `blocks_by_size` function. I first
 thought
 >   that it would return the list of blocks sorted by size, but it is
 actually
 >   equivalent to `[B for B in H if len(B) in block_sizes]` soooo
 'well'...
 >
 >   In particular, I do not understand why you wrote
 >
 >   {{{p.set_objective(p.sum([b[i]*self.block_sizes()[i] for i in
 range(self.num_blocks())]))}}}
 >
 >   instead of
 >
 >   {{{p.set_objective(p.sum([b[i]*len(self._blocks[i]) for i in
 range(self.num_blocks())]))}}}
 >

 just remove it entirely or build it in as an option to .blocks()?


 > - When a keyword can take two values like `coverage/cardinality`, it is
 better
 >   to avoid if/else and write something like:
 >
 >   {{{
 >   if objective == "coverage":
 >      pass
 >   elif objective == "cardinality":
 >      pass
 >   else:
 >      raise ValueError("'objective' must be equal to either 'coverage' or
 'cardinality'")
 >   }}}
 >
 >   This, because otherwise you would pay very dear a typo like "covearge"
 `;-)`

 will do.

 >
 > Cheers,
 >
 > Nathann

--
Ticket URL: <http://trac.sagemath.org/ticket/16534#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.

Reply via email to