Opened 5 years ago

Last modified 4 years ago

#18411 closed enhancement

get rid of CartesianProduct — at Version 17

Reported by: vdelecroix Owned by:
Priority: major Milestone: sage-6.10
Component: combinatorics Keywords:
Cc: nthiery, ncohen Merged in:
Authors: Vincent Delecroix Reviewers:
Report Upstream: N/A Work issues:
Branch: public/18411 (Commits) Commit: 8a5ca0185dc3d46b7c62429b3d60ccccb485c0c4
Dependencies: Stopgaps:

Description (last modified by vdelecroix)

The features of sage.combinat.cartesian_product.CartesianProduct are now completely integrated into the category framework (see #18290). We remove all occurrences of CartesianProduct to either cartesian_product or itertools.product. We also deprecate the CartesianProduct from sage.combinat.cartesian_product.

In order to support all features of the old class we also:

  • move the __iter__ from EnumeratedSets.CartesianProducts.ParentMethods category to Sets
  • allows cartesian_product to be called with list, tuple, set, frozenset
  • introduce a function bounded_number_of_tuples in sage.misc.misc that is intensively used in the testing framework
  • refine the category of Set([1,2,3]) to be finite
  • implement a (very naive) random_element for Set([1,2,3])

follow up: #19192

Change History (17)

comment:1 Changed 5 years ago by vdelecroix

  • Dependencies set to #18290, #12955
  • Description modified (diff)

comment:2 Changed 4 years ago by vdelecroix

  • Branch set to public/18411

comment:3 Changed 4 years ago by git

  • Commit set to e703eb4437d7b5bec7abc392e2fdfa534c86b704

Branch pushed to git repo; I updated commit sha1. New commits:

e703eb4Trac 18411: remove occurrences of CartesianProduct

comment:4 Changed 4 years ago by git

  • Commit changed from e703eb4437d7b5bec7abc392e2fdfa534c86b704 to 10df21841341b144bff58847011bae02cd852be9

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

635279fTrac 18411: a bounded_number_of_tuples function
1b60903Trac 18411: remove occurrences of CartesianProduct
bec57aeTrac 18411: cartesian_product works with tuple/list/set/frozenset
7dbb663Trac 18411: move iteration of cartesian products to Sets
4fbb4aeTrac 18411: refine category of Set(...)
10df218Trac 18411: fix combinat tutorial

comment:5 Changed 4 years ago by vdelecroix

  • Authors set to Vincent Delecroix
  • Dependencies #18290, #12955 deleted
  • Description modified (diff)
  • Status changed from new to needs_review
  • Summary changed from Get rid of sage.combinat.cartesian_product to remove some CartesianProduct usages

comment:6 Changed 4 years ago by git

  • Commit changed from 10df21841341b144bff58847011bae02cd852be9 to 57b82e3e3fdc7a4d07d0fe4d248f0c99557ce4f0

Branch pushed to git repo; I updated commit sha1. New commits:

57b82e3trax #18411 fixing a typo and doctest continuation

comment:7 Changed 4 years ago by vdelecroix

Thanks Frédéric for fixing a doctest. Though, I do not see the point of modifying src/sage/rings/quotient_ring.py. This file is completely unrelated to this ticket.

comment:8 Changed 4 years ago by git

  • Commit changed from 57b82e3e3fdc7a4d07d0fe4d248f0c99557ce4f0 to a640c244695188ec1c8bbec68b114f184baf1660

Branch pushed to git repo; I updated commit sha1. New commits:

a640c24trac #18411 fixing some doctests

comment:9 Changed 4 years ago by git

  • Commit changed from a640c244695188ec1c8bbec68b114f184baf1660 to 3cc80709f3285c6fa012475681a6a74fdc0f4bf3

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

b650e69trac #18411 fixing some doctests
0dcfed9Trac 18411: fix combinat/partition_tuple
613cef5Trac 18411: fix testing issues
3cc8070Trac 18411: fix composition signed

comment:10 Changed 4 years ago by vdelecroix

Hi Frédéric,

This was clearly not the way to fix composition_signed.py. I removed this change from your commit. The rest of my commits should fix all issues with timed out testing (ie root system and padic) as well as the issue with tableau tuples.

Vincent

comment:11 Changed 4 years ago by git

  • Commit changed from 3cc80709f3285c6fa012475681a6a74fdc0f4bf3 to 70949c7a0b4206ce99e834f09f488bd682f9ca1c

Branch pushed to git repo; I updated commit sha1. New commits:

70949c7Trac 18411: fix two doctests

comment:12 Changed 4 years ago by git

  • Commit changed from 70949c7a0b4206ce99e834f09f488bd682f9ca1c to 9beb0234950b59a7f755c05753e55f0c8637d454

Branch pushed to git repo; I updated commit sha1. New commits:

9beb023Trac 18411: bound number of tests for Domains

comment:13 Changed 4 years ago by vdelecroix

  • Description modified (diff)

comment:14 Changed 4 years ago by git

  • Commit changed from 9beb0234950b59a7f755c05753e55f0c8637d454 to 65808258b9bf22e5b7d6bb1543f7e2ee30634337

Branch pushed to git repo; I updated commit sha1. New commits:

6580825Trac 18411: fix is_empty

comment:15 Changed 4 years ago by vdelecroix

The only failing doctest is fine when run independently... I am not sure what may have happend.

Vincent

comment:16 Changed 4 years ago by git

  • Commit changed from 65808258b9bf22e5b7d6bb1543f7e2ee30634337 to 8a5ca0185dc3d46b7c62429b3d60ccccb485c0c4

Branch pushed to git repo; I updated commit sha1. New commits:

af2c289Trac 18411: use cartesian_product in CombinatorialFreeModule
8a5ca01Trac 18411: remove two final occurrences

comment:17 Changed 4 years ago by vdelecroix

  • Description modified (diff)
  • Status changed from needs_review to needs_work
  • Summary changed from remove some CartesianProduct usages to get rid of CartesianProduct

New commits:

af2c289Trac 18411: use cartesian_product in CombinatorialFreeModule
8a5ca01Trac 18411: remove two final occurrences
Note: See TracTickets for help on using tickets.