Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get rid of CartesianProduct #18411

Closed
videlec opened this issue May 13, 2015 · 98 comments
Closed

get rid of CartesianProduct #18411

videlec opened this issue May 13, 2015 · 98 comments

Comments

@videlec
Copy link
Contributor

videlec commented May 13, 2015

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 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 to Sets.CartesianProducts.ParentMethods
  • allows cartesian_product to be called with list, tuple, set, frozenset
  • make cartesian_product([]) works
  • introduce a function some_tuples in sage.misc.misc that is intensively used in the testing framework (and incidentally speed up some doc test)
  • refine the category of Set([1,2,3]) to be finite
  • implement a (very naive) random_element for Set([1,2,3])
  • implement a (naive) hash for EnumeratedSetFromIterator

see also : #15425, #19195
one that can be closed as duplicate: #14224, #19192

Depends on #17411

CC: @nthiery @nathanncohen

Component: combinatorics

Author: Vincent Delecroix

Branch/Commit: 6e27dde

Reviewer: Nicolas M. Thiéry

Issue created by migration from https://trac.sagemath.org/ticket/18411

@videlec videlec added this to the sage-6.7 milestone May 13, 2015
@videlec

This comment has been minimized.

@videlec
Copy link
Contributor Author

videlec commented May 13, 2015

Dependencies: #18290, #12955

@videlec
Copy link
Contributor Author

videlec commented Sep 7, 2015

Branch: public/18411

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 7, 2015

Commit: e703eb4

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 7, 2015

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

e703eb4Trac 18411: remove occurrences of CartesianProduct

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 12, 2015

Changed commit from e703eb4 to 10df218

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 12, 2015

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

@videlec
Copy link
Contributor Author

videlec commented Sep 12, 2015

Author: Vincent Delecroix

@videlec

This comment has been minimized.

@videlec
Copy link
Contributor Author

videlec commented Sep 12, 2015

Changed dependencies from #18290, #12955 to none

@videlec videlec changed the title Get rid of sage.combinat.cartesian_product remove some CartesianProduct usages Sep 12, 2015
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 12, 2015

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

57b82e3trax #18411 fixing a typo and doctest continuation

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 12, 2015

Changed commit from 10df218 to 57b82e3

@videlec
Copy link
Contributor Author

videlec commented Sep 12, 2015

comment:7

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.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 12, 2015

Changed commit from 57b82e3 to a640c24

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 12, 2015

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

a640c24trac #18411 fixing some doctests

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 12, 2015

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

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 12, 2015

Changed commit from a640c24 to 3cc8070

@videlec
Copy link
Contributor Author

videlec commented Sep 12, 2015

comment:10

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

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 12, 2015

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

70949c7Trac 18411: fix two doctests

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 12, 2015

Changed commit from 3cc8070 to 70949c7

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 12, 2015

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

9beb023Trac 18411: bound number of tests for Domains

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 12, 2015

Changed commit from 70949c7 to 9beb023

@videlec

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 12, 2015

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

6580825Trac 18411: fix is_empty

@nthiery
Copy link
Contributor

nthiery commented Oct 16, 2015

comment:60

The change sounds fine to me! Assuming all test pass, back to positive review.

@videlec
Copy link
Contributor Author

videlec commented Oct 17, 2015

comment:61

... does not...

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 17, 2015

Changed commit from 525d038 to 41af762

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 17, 2015

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

41af762Trac 18411: pass keywords in __call__

@videlec
Copy link
Contributor Author

videlec commented Oct 17, 2015

comment:63

...waiting for the patchbot green light...

@videlec
Copy link
Contributor Author

videlec commented Oct 17, 2015

comment:64

Bueno!

@vbraun
Copy link
Member

vbraun commented Oct 17, 2015

comment:65

Merge conflict

@videlec
Copy link
Contributor Author

videlec commented Oct 20, 2015

comment:66

With what?

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 22, 2015

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

6e27ddeTrac 18411: merge sage-6.10.beta1

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 22, 2015

Changed commit from 41af762 to 6e27dde

@videlec
Copy link
Contributor Author

videlec commented Oct 22, 2015

comment:68

Hoping I will not have to rebase once more...

@vbraun
Copy link
Member

vbraun commented Oct 23, 2015

Changed branch from public/18411 to 6e27dde

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants