{"id":18084839,"url":"https://github.com/jwodder/permutation","last_synced_at":"2025-08-19T16:33:05.536Z","repository":{"id":57451936,"uuid":"102221470","full_name":"jwodder/permutation","owner":"jwodder","description":"Permutations of finitely many positive integers","archived":false,"fork":false,"pushed_at":"2024-12-01T12:58:42.000Z","size":142,"stargazers_count":16,"open_issues_count":13,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-09T18:11:44.748Z","etag":null,"topics":["available-on-pypi","group-theory","math","mathematics","maths","permutation","python","symmetric-group"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jwodder.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-02T20:22:24.000Z","updated_at":"2024-12-01T12:58:46.000Z","dependencies_parsed_at":"2023-01-31T01:55:12.604Z","dependency_job_id":"264b4c36-fe7b-4610-9063-0ccfbe629651","html_url":"https://github.com/jwodder/permutation","commit_stats":{"total_commits":136,"total_committers":5,"mean_commits":27.2,"dds":"0.044117647058823484","last_synced_commit":"267f3998a7d5f43b077b68456f6f68a698ab69b4"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fpermutation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fpermutation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fpermutation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fpermutation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwodder","download_url":"https://codeload.github.com/jwodder/permutation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230364001,"owners_count":18214717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["available-on-pypi","group-theory","math","mathematics","maths","permutation","python","symmetric-group"],"created_at":"2024-10-31T15:08:24.408Z","updated_at":"2024-12-19T02:07:33.799Z","avatar_url":"https://github.com/jwodder.png","language":"Python","readme":"|repostatus| |ci-status| |coverage| |pyversions| |license|\n\n.. |repostatus| image:: https://www.repostatus.org/badges/latest/active.svg\n    :target: https://www.repostatus.org/#active\n    :alt: Project Status: Active — The project has reached a stable, usable\n          state and is being actively developed.\n\n.. |ci-status| image:: https://github.com/jwodder/permutation/actions/workflows/test.yml/badge.svg\n    :target: https://github.com/jwodder/permutation/actions/workflows/test.yml\n    :alt: CI Status\n\n.. |coverage| image:: https://codecov.io/gh/jwodder/permutation/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/jwodder/permutation\n\n.. |pyversions| image:: https://img.shields.io/pypi/pyversions/permutation.svg\n    :target: https://pypi.org/project/permutation\n\n.. |license| image:: https://img.shields.io/github/license/jwodder/permutation.svg\n    :target: https://opensource.org/licenses/MIT\n    :alt: MIT License\n\n`GitHub \u003chttps://github.com/jwodder/permutation\u003e`_\n| `PyPI \u003chttps://pypi.org/project/permutation\u003e`_\n| `Documentation \u003chttps://permutation.readthedocs.io\u003e`_\n| `Issues \u003chttps://github.com/jwodder/permutation/issues\u003e`_\n| `Changelog \u003chttps://github.com/jwodder/permutation/blob/master/CHANGELOG.md\u003e`_\n\n``permutation`` provides a ``Permutation`` class for representing `permutations\n\u003chttps://en.wikipedia.org/wiki/Permutation\u003e`_ of finitely many positive\nintegers in Python.  Supported operations \u0026 properties include inverses, (group\ntheoretic) order, parity, composition/multiplication, cycle decomposition,\ncycle notation, word representation, Lehmer codes, and, of course, use as a\ncallable on integers.\n\n\nInstallation\n============\n``permutation`` requires Python 3.8 or higher.  Just use `pip\n\u003chttps://pip.pypa.io\u003e`_ for Python 3 (You have pip, right?) to install::\n\n    python3 -m pip install permutation\n\n\nExamples\n========\n\n\u003e\u003e\u003e from permutation import Permutation\n\u003e\u003e\u003e p = Permutation(2, 1, 4, 5, 3)\n\u003e\u003e\u003e p(1)\n2\n\u003e\u003e\u003e p(3)\n4\n\u003e\u003e\u003e p(42)\n42\n\u003e\u003e\u003e p.to_cycles()\n[(1, 2), (3, 4, 5)]\n\u003e\u003e\u003e print(p)\n(1 2)(3 4 5)\n\u003e\u003e\u003e print(p.inverse())\n(1 2)(3 5 4)\n\u003e\u003e\u003e p.degree\n5\n\u003e\u003e\u003e p.order\n6\n\u003e\u003e\u003e p.is_even\nFalse\n\u003e\u003e\u003e p.lehmer(5)\n27\n\u003e\u003e\u003e q = Permutation.cycle(1,2,3)\n\u003e\u003e\u003e print(p * q)\n(2 4 5 3)\n\u003e\u003e\u003e print(q * p)\n(1 3 4 5)\n\u003e\u003e\u003e for p in Permutation.group(3):\n...     print(p)\n...\n1\n(1 2)\n(2 3)\n(1 3 2)\n(1 2 3)\n(1 3)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwodder%2Fpermutation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwodder%2Fpermutation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwodder%2Fpermutation/lists"}