#18223: cartesian products with orders
-------------------------------------+-------------------------------------
       Reporter:  dkrenn             |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.7
      Component:  categories         |   Resolution:
       Keywords:  sd67               |    Merged in:
        Authors:  Daniel Krenn       |    Reviewers:  Benjamin Hackl
Report Upstream:  N/A                |  Work issues:
         Branch:  u/dkrenn/cat       |       Commit:
  /cartesian-product-posets          |  6714aaaf749e2618e44fba307c0e0a389a4e73c1
   Dependencies:  #18586             |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by vdelecroix):

 * status:  needs_review => needs_work


Comment:

 Instead of using `QQ` which is not a poset in the doctest why not use
 available ones from `Posets.<tab>`?

 Some more comments

 10. In the documentation clqss of `CartesianProductPosets` you should say
 that `order` and `order_le` are optionals and what is the default
 behavior. You should also document the behavior of
 {{{
 sage: CartesianProductPoset([X,Y,Z], order='lex', order_le=my_le)
 }}}
   (or raise an appropriate error)

 11. I am not sure how much this is supported but parents are allowed to
 have their `category` argument to be set to a tuple as in
 {{{
 sage: P = Parent(category=(Rings(),Posets()))
 sage: P.category()
 Join of Category of rings and Category of posets
 }}}
   In your subclass, the operation `category & Posets()` would break. You
 might use the safer `Category.join(my_list_of_categories)`. If you do so,
 add an appropriate doctest for that.

 12. What is the point of adding `*kwargs` in the `__init__` method of
 `CartesianProduct`? If this argument is not supported then it should
 simply not exists.

 13. Add some `TestSuite(C).run()` for various cartesian products of posets
 (i.e. at least with the two default implemented orders and one self
 implemented).

 14. Since the cartesian product elements are tuples, we might want to use
 the orders from the tuple themselves (which is fastest then anything
 else). What about an alternative
 {{{
 def le_native(self, x, y):
     return x.value <= y.value
 }}}

 15. I am not sure that it is good to have the `le_*` methods as being
 public. Do you have some feeling about it?

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