{ "info": { "author": "Permuta Triangle", "author_email": "permutatriangle@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Education", "Topic :: Scientific/Engineering :: Mathematics" ], "description": "Tilings\n=======\n\n.. image:: https://travis-ci.org/PermutaTriangle/Tilings.svg?branch=master\n :alt: Travis\n :target: https://travis-ci.org/PermutaTriangle/Tilings\n.. image:: https://coveralls.io/repos/github/PermutaTriangle/Tilings/badge.svg?branch=master\n :alt: Coveralls\n :target: https://coveralls.io/github/PermutaTriangle/Tilings?branch=master\n.. image:: https://img.shields.io/pypi/v/Tilings.svg\n :alt: PyPI\n :target: https://pypi.python.org/pypi/Tilings\n.. image:: https://img.shields.io/pypi/l/Tilings.svg\n :target: https://pypi.python.org/pypi/Tilings\n.. image:: https://img.shields.io/pypi/pyversions/Tilings.svg\n :target: https://pypi.python.org/pypi/Tilings\n.. image:: https://requires.io/github/PermutaTriangle/Tilings/requirements.svg?branch=master\n :target: https://requires.io/github/PermutaTriangle/Tilings/requirements/?branch=master\n :alt: Requirements Status\n\n\n``tilings`` is a Python library for working with gridded permutation and\ntilings.\n\nInstalling\n----------\n\nTo install ``tilings`` on your system, run:\n\n.. code:: bash\n\n pip install tilings\n\nIt is also possible to install ``tilings`` in development mode to work\non the source code, in which case you run the following after cloning\nthe repository:\n\n.. code:: bash\n\n ./setup.py develop\n\nTo run the unit tests:\n\n.. code:: bash\n\n ./setup.py test\n\nWhat are gridded permutations and tilings?\n------------------------------------------\n\nWe will be brief in our definitions here, for more details see\n`Christian Bean\u2019s PhD thesis `__.\n\nA ``gridded permutation`` is a pair ``(\u03c0, P)`` where ``\u03c0`` is a\npermutation and ``P`` is a tuple of cells, called the positions, that\ndenote the cells in which the points of ``\u03c0`` are drawn on a grid. Let\n``G`` denote the set of all gridded permutations. Containment of gridded\npermutations is defined the same as containment of permutations, except\nincluding the preservation of the cells.\n\nA ``tiling`` is a triple ``T = ((n, m), O, R)``, where ``n`` and ``m``\nare positive integers, ``O`` is a set of gridded permutations called\n``obstructions``, and ``R`` is a set of sets of gridded permutations\ncalled ``requirements``.\n\nWe say a gridded permutations avoids a set of gridded permutations if it\navoids all of the permutations in the set, otherwise it contains the\nset. To contain a set, therefore, means contains at least one in the\nset. The set of gridded permutations on a tiling ``Grid(T)`` is the set\nof all gridded permutations in the ``n x m`` grid that avoids ``O`` and\ncontains each set ``r`` in ``R``.\n\nUsing tilings\n-------------\n\nOnce you\u2019ve installed ``tilings``, it can be imported by a Python script\nor an interactive Python session, just like any other Python library:\n\n.. code:: python\n\n >>> from tilings import *\n\nImporting ``*`` from it supplies you with the \u2018GriddedPerm\u2019,\n\u2018Obstruction\u2019, \u2018Requirement\u2019, and \u2018Tiling\u2019 classes.\n\nAs above, a gridded permutation is a pair ``(\u03c0, P)`` where ``\u03c0`` is a\npermutation and ``P`` is a tuple of cells. The permutation is assumed to\nbe a ``Perm`` from the ``permuta`` Python library. Not every tuple of\ncells is a valid position for a given permutation. This can be checked\nusing the ``contradictory`` method.\n\n.. code:: python\n\n >>> from permuta import Perm\n >>> gp = GriddedPerm(Perm((0, 2, 1)), ((0, 0), (0, 0), (1, 0)))\n >>> gp.contradictory()\n False\n >>> gp = GriddedPerm(Perm((0, 1, 2)), ((0, 0), (0, 1), (0, 0)))\n >>> gp.contradictory()\n True\n\nA ``Tiling`` is created with an iterable of ``Obstruction`` and an\niterable of ``Requirement`` lists. It is assumed that all cells not\nmentioned in some obstruction or requirement is empty. You can print the\ntiling to get an overview of the tiling created. In this example, we\nhave a tiling that corresponds to non-empty permutation avoiding\n``123``.\n\n.. code:: python\n\n >>> obstructions = [Obstruction.single_cell(Perm((0, 1)), (1, 1)),\n ... Obstruction.single_cell(Perm((1, 0)), (1, 1)),\n ... Obstruction.single_cell(Perm((0, 1)), (0, 0)),\n ... Obstruction.single_cell(Perm((0, 1, 2)), (2, 0)),\n ... Obstruction(Perm((0, 1, 2)), ((0, 0), (2, 0), (2, 0)))]\n >>> requirements = [[Requirement.single_cell(Perm((0,)), (1, 1))]]\n >>> til = Tiling(obstructions, requirements)\n >>> print(til)\n +-+-+-+\n | |\u25cf| |\n +-+-+-+\n |\\| |1|\n +-+-+-+\n 1: Av(012)\n \\: Av(01)\n \u25cf: point\n Crossing obstructions:\n 012: (0, 0), (2, 0), (2, 0)\n Requirement 0:\n 0: (1, 1)\n >>> til.dimensions\n (3, 2)\n >>> sorted(til.active_cells)\n [(0, 0), (1, 1), (2, 0)]\n >>> til.point_cells\n frozenset({(1, 1)})\n >>> sorted(til.possibly_empty)\n [(0, 0), (2, 0)]\n >>> til.positive_cells\n frozenset({(1, 1)})\n\nThere are a number of methods available on the tiling. You can generate\nthe gridded permutations satisfying the obtructions and requirements\nusing the ``gridded_perms_of_length`` method.\n\n.. code:: python\n\n >>> for i in range(4):\n ... for gp in til.gridded_perms_of_length(i):\n ... print(gp)\n 0: (1, 1)\n 10: (1, 1), (2, 0)\n 01: (0, 0), (1, 1)\n 210: (1, 1), (2, 0), (2, 0)\n 201: (1, 1), (2, 0), (2, 0)\n 120: (0, 0), (1, 1), (2, 0)\n 021: (0, 0), (1, 1), (2, 0)\n 102: (0, 0), (0, 0), (1, 1)\n\nThere are numerous other methods and properties. Many of these specific\nto the ``tilescope`` algorithm, discussed in `Christian Bean\u2019s PhD\nthesis `__.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/PermutaTriangle/Tilings", "keywords": "permutation perm gridded pattern tiling avoid containoccurrences grid class", "license": "BSD-3", "maintainer": "", "maintainer_email": "", "name": "tilings", "package_url": "https://pypi.org/project/tilings/", "platform": "", "project_url": "https://pypi.org/project/tilings/", "project_urls": { "Homepage": "https://github.com/PermutaTriangle/Tilings", "Source": "https://github.com/PermutaTriangle/Tilings", "Tracker": "https://github.com/PermutaTriangle/Tilings/issues" }, "release_url": "https://pypi.org/project/tilings/1.0.1/", "requires_dist": null, "requires_python": ">=3.5", "summary": "A Python library for gridded permutations and tilings.", "version": "1.0.1" }, "last_serial": 5732976, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "9fda967e919515d1c16d7cbff495574e", "sha256": "f899f3b0414206258f67559ae8856442ece9939ae947387f12db6002bc34d8ff" }, "downloads": -1, "filename": "tilings-0.0.1.tar.gz", "has_sig": false, "md5_digest": "9fda967e919515d1c16d7cbff495574e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 27602, "upload_time": "2019-06-04T23:44:25", "url": "https://files.pythonhosted.org/packages/27/4d/5ebcb3fd6c5e905a15b53f847fbfb1ef12ea4bb88ab182dc2e85cff513d0/tilings-0.0.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "5091b4c95eb43704a08dc82a8ebce2f7", "sha256": "499d1182a785eb949342f1e2762c7b1a4fc62a322c4e5656074726c19c4f8b9a" }, "downloads": -1, "filename": "tilings-1.0.0.tar.gz", "has_sig": false, "md5_digest": "5091b4c95eb43704a08dc82a8ebce2f7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 27498, "upload_time": "2019-08-26T12:57:14", "url": "https://files.pythonhosted.org/packages/d8/2f/63a345a13fb35978a4d27c2ea7a5d008c0c62837e039320d577c0f7283de/tilings-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "2713a80701c581d04c6e666b04bf0674", "sha256": "70df46daab3409792b06b69682bde5f31bdea8521d624cb03046db7112a62109" }, "downloads": -1, "filename": "tilings-1.0.1.tar.gz", "has_sig": false, "md5_digest": "2713a80701c581d04c6e666b04bf0674", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 27730, "upload_time": "2019-08-26T20:26:03", "url": "https://files.pythonhosted.org/packages/8d/b4/c81d9b939b5a2992bc24bcfbc6ac9e8235055cd7dc51664fa0574c825bb7/tilings-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2713a80701c581d04c6e666b04bf0674", "sha256": "70df46daab3409792b06b69682bde5f31bdea8521d624cb03046db7112a62109" }, "downloads": -1, "filename": "tilings-1.0.1.tar.gz", "has_sig": false, "md5_digest": "2713a80701c581d04c6e666b04bf0674", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 27730, "upload_time": "2019-08-26T20:26:03", "url": "https://files.pythonhosted.org/packages/8d/b4/c81d9b939b5a2992bc24bcfbc6ac9e8235055cd7dc51664fa0574c825bb7/tilings-1.0.1.tar.gz" } ] }