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
add method to find a surrounding of a polyomino with isometric copies of itself #29160
Comments
comment:1
Attachment: H.png |
This comment has been minimized.
This comment has been minimized.
Attachment: G.png |
Branch: u/slabbe/29160 |
Commit: |
This comment has been minimized.
This comment has been minimized.
comment:4
A few little things: - ``dimension`` -- integer (default: ``None``), dimension of the space,
if ``None``, it is guessed from the ``coords`` if ``coords`` is non
- empty.
+ empty raise ValueError("dimension(={}) must be provided for"
- " the empty polyomino".format(dimension))
+ " the empty polyomino".format(dimension)) -Return whether self is strictly inside of other.
+Return whether ``self`` is strictly inside of ``other``. and other similar changes. OUTPUT:
- polyomino
+ polyomino return Polyomino(self.frozenset() & other.frozenset(),
- color=self._color, dimension=self._dimension)
+ color=self._color, dimension=self._dimension) OUTPUT:
- set of 3d polyominoes
+ set of 3d polyominoes - Using a Polyomino as input ::
+ Using a Polyomino as input:: - - ``orientation_preserving`` -- bool (optional, default: ``True``),
- If True, the group of isometries of the `n`-cube is restricted to
- those that preserve the orientation, i.e. of determinant 1.
+ - ``orientation_preserving`` -- bool (optional, default: ``True``);
+ if ``True``, the group of isometries of the `n`-cube is restricted
+ to those that preserve the orientation, i.e. of determinant 1 - S = set()
- for cano in all_distinct_cano:
- for t in cano.translated_copies_intersection(box=box):
- S.add(t)
- return S
+ return set([t for cano in all_distinct_cano
+ for t in cano.translated_copies_intersection(box=box)]) def self_surrounding(self, radius, remove_incomplete_copies=True,
- ncpus=None):
+ ncpus=None): OUTPUT:
- list of polyominoes
+ list of polyominoes
I don't like the fact that this raises a general Some of these are PEP8 and could amount to more of bikeshedding, but I think it is good to try and follow them. There are a few other such PEP8 code changes that could be done too beyond those I mentioned here. |
comment:5
Thanks Travis for your careful reading. I agree with your comments. I will work on it. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:8
Each time, I searched and fixed similar issues in the same file. |
comment:9
Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date. |
comment:10
La patchbot se plaint un petit peu :
et ca serait gentil de briser cette ligne en deux. |
comment:11
ok, je fais ça la semaine prochaine. |
comment:13
J'ai trouvé le double statement sur une même ligne. Je l'ai mis sur deux lignes séparées. J'ai fait un rebase sur une version plus récente de Sage que j'utilise sur cette machine (9.1.rc1). Needs review. Sébastien |
Reviewer: Travis Scrimshaw, Frédéric Chapoton |
comment:15
ok, allons-y |
Changed branch from u/slabbe/29160 to |
This ticket adds some code based on the tiling solver class and dancing links solver to find a surrounding of a polyomino with copies of itself. An example is below:
See: https://user-images.githubusercontent.com/2339795/216875696-aef5396f-e30f-4e85-b4f5-85f5a841b797.pngeesch%27s_problem
Component: combinatorics
Author: Sébastien Labbé
Branch/Commit:
9d36ca5
Reviewer: Travis Scrimshaw, Frédéric Chapoton
Issue created by migration from https://trac.sagemath.org/ticket/29160
The text was updated successfully, but these errors were encountered: