#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             |
-------------------------------------+-------------------------------------
Changes (by ncohen):

 * status:  needs_review => needs_work


Comment:

 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?

 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.

 - 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())]))}}}

 - 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"
 `;-)`

 Cheers,

 Nathann

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