{ "info": { "author": "Robert Smallshire", "author_email": "rob@sixty-north.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3 :: Only", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Software Development :: Libraries" ], "description": "factoradic\n==========\n\nThe *factorial number system* (also known as *factoradic*) is a way of\nrepresenting an integer as the sum of multiples of factorials. All\nintegers have a unique representation in the factoradic number system.\nFor example, the number 1337 can be represented as:\n\n 1*6! + 5*5! + 0*4! + 2*3! + 2*2! + 1*1! + 0*0!\n\nwith coefficients 1 5 0 2 2 1 0. This is the unique factoradic\nrepresentation of decimal 1337.\n\nFactoradic numbers have uses in combinatorics, particularly in the\nnumbering of permutations. This ``factoradic`` library is useful for\nconverting to and from factoradic number representations both in\nPython and from the command-line.\n\nStatus\n------\n\n.. image:: https://travis-ci.org/rob-smallshire/factoradic.svg?branch=master\n :target: https://travis-ci.org/rob-smallshire/factoradic\n\n.. image:: https://coveralls.io/repos/github/rob-smallshire/factoradic/badge.svg?branch=master\n :target: https://coveralls.io/github/rob-smallshire/factoradic?branch=master\n\n\n\nInstallation\n------------\n\nThe ``factoradic`` package is available on the Python Package Index (PyPI):\n\n.. image:: https://badge.fury.io/py/factoradic.svg\n :target: https://badge.fury.io/py/factoradic\n\nThe package supports Python 3 only. To install::\n\n $ pip install factoradic\n\nPython Interface\n----------------\n\nFor full help::\n\n >>> import factoradic\n >>> help(factoradic)\n\nIn the meantime, here are some highlights.\n\nTo convert from an integer to factoradic use ``to_factoradic()``::\n\n >>> factoradic.to_factoradic(1337)\n [0, 1, 2, 2, 0, 5, 1]\n\nThe result is the list of coefficients where the factorial of each\nzero-based index gives a place value, and the item at that index is\nthe coefficient by with the place value is to be multiplied. The\nelements are from least-significant to most-significant. Since the\ncoefficient at any index must be less that or equal to the index,\nthe coefficient at index 0 is always 0.\n\nTo convert from factoradic use ``from_factoradic()``::\n\n >>> factoradic.from_factoradic([0, 1, 2, 2, 0, 5, 1])\n 1337\n\n\nCommand-Line Interface\n----------------------\n\nThere's also a handy command-line interface. Run ``factoradic --help``\nto see a list of commands::\n\n $ factoradic --help\n Factoradic.\n\n Convert to and from the factorial number system.\n\n Usage:\n factoradic from-integer [--expression]\n factoradic to-integer [ [...]]\n\n Options:\n -e --expression Show as a mathematical expression.\n\n\nTo convert from an integer to factoradic, use the ``from-integer`` subcommand::\n\n $ factoradic from-integer 1729\n 0 1 0 0 2 2 2\n\nThe coefficients are reported from least-significant to most-significant.\nThe see the results as a math expression, specify the ``--expression`` flag::\n\n $ factoradic from-integer 1729 --expression\n 2*6! + 2*5! + 2*4! + 0*3! + 0*2! + 1*1! + 0*0!\n\nTo convert from factoradic representation use the ``to-integer`` subcommand,\nspecifying the coefficients from least-significant to most-significant::\n\n $ factoradic to-integer 0 1 0 0 2 2 2\n 1729\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rob-smallshire/factoradic", "keywords": "combinatorics factoradic factorial number-systems permutations", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "factoradic", "package_url": "https://pypi.org/project/factoradic/", "platform": "", "project_url": "https://pypi.org/project/factoradic/", "project_urls": { "Homepage": "https://github.com/rob-smallshire/factoradic" }, "release_url": "https://pypi.org/project/factoradic/1.0.3/", "requires_dist": [ "check-manifest; extra == 'dev'", "wheel; extra == 'dev'", "sphinx; extra == 'doc'", "cartouche; extra == 'doc'", "sphinx-rtd-theme; extra == 'doc'", "coverage; extra == 'test'", "hypothesis; extra == 'test'", "pytest; extra == 'test'" ], "requires_python": "", "summary": "Convert integers to and from the factoradic number system", "version": "1.0.3" }, "last_serial": 3548081, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "6cf239caf822c605114c082445e89ce1", "sha256": "e009bb0337bdb95fe382dfa2fe28586a767761f22cf069aa7fd9e4ec356c4aae" }, "downloads": -1, "filename": "factoradic-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6cf239caf822c605114c082445e89ce1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7429, "upload_time": "2018-02-02T21:10:46", "url": "https://files.pythonhosted.org/packages/45/69/1bfce71f0a0f6bdc5e88da78f2c0028a95dc62b97f01988f27ed49496b3b/factoradic-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "af2c9b8e8e87199d5b13fe39f5519ca6", "sha256": "3b3411f19bf928a4962cc7950139cfd9f84a587ddc59512ca6b880364dc8d343" }, "downloads": -1, "filename": "factoradic-1.0.0.tar.gz", "has_sig": false, "md5_digest": "af2c9b8e8e87199d5b13fe39f5519ca6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5937, "upload_time": "2018-02-02T21:10:48", "url": "https://files.pythonhosted.org/packages/30/82/eeb65aaad2efb89dc2547623dc8dfd98cd0b398a90ddd956069820717b26/factoradic-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "e0bb8c5ac9cd87f8bc25f2df46b47f38", "sha256": "3aa963a118de16fd08b0f51b320db61394dc49adf5c8a9083f53793dfbae7c17" }, "downloads": -1, "filename": "factoradic-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e0bb8c5ac9cd87f8bc25f2df46b47f38", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7420, "upload_time": "2018-02-02T21:21:24", "url": "https://files.pythonhosted.org/packages/6c/e6/5f82622848141dc7cac25caedd96f3448a00858238bfec2229857a028f9b/factoradic-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a9b2923900288cd16ca9998a978635a0", "sha256": "e8a2b09058ac29dd7215c5e85920ec572c7dc532e8c18d43172a63abe8de40a3" }, "downloads": -1, "filename": "factoradic-1.0.1.tar.gz", "has_sig": false, "md5_digest": "a9b2923900288cd16ca9998a978635a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5928, "upload_time": "2018-02-02T21:21:26", "url": "https://files.pythonhosted.org/packages/b5/2c/3f153e96873f2a3d37bfc479984c0a15cc109041b82a92fa40496190a37e/factoradic-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "62f7ccbc95399f4a6a3d78c3ca369458", "sha256": "0bfb7c2e68b28ef8ee9e13efa6e5e969b3bb8f7c76e4b7494f1153e21a6f0750" }, "downloads": -1, "filename": "factoradic-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "62f7ccbc95399f4a6a3d78c3ca369458", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7422, "upload_time": "2018-02-02T21:29:05", "url": "https://files.pythonhosted.org/packages/bb/e2/c7de146f80024dd1a6eb4a74f96e27e57b4bb79536c08a6becd59ac1a05a/factoradic-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "36b09c567d5d80a04ddfd5c63b1604bc", "sha256": "4555fdd75b8b5ebf29a64498d98d77528f85576daf2eb01d2dee27a927a81d80" }, "downloads": -1, "filename": "factoradic-1.0.2.tar.gz", "has_sig": false, "md5_digest": "36b09c567d5d80a04ddfd5c63b1604bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5929, "upload_time": "2018-02-02T21:29:10", "url": "https://files.pythonhosted.org/packages/94/ca/60d5909275ee184a0d4682b0fb02198551eaf3e1e3cadc2911d63bc44e43/factoradic-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "a569bce239c27c7c5ec1eb0b7ba681b0", "sha256": "378e3822a0b3149bc4709d2822d038d82bf5b138db19868dfe96df20fc5af50b" }, "downloads": -1, "filename": "factoradic-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "a569bce239c27c7c5ec1eb0b7ba681b0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7383, "upload_time": "2018-02-03T09:00:04", "url": "https://files.pythonhosted.org/packages/6c/81/c237352a4eda57515be7015a54240ae0a00504e0db206e9918da0619e50b/factoradic-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b4cda966e2528ec30703f970b2209f47", "sha256": "132dbfc88363daca6e2007f5c572fe019fcdbb0705e10f239a0461b53346b618" }, "downloads": -1, "filename": "factoradic-1.0.3.tar.gz", "has_sig": false, "md5_digest": "b4cda966e2528ec30703f970b2209f47", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5900, "upload_time": "2018-02-03T09:00:07", "url": "https://files.pythonhosted.org/packages/b5/0d/e06b2702cc7c66d9cebc4ba31e575419cd24abb1132698ab1ddbab1a8e3c/factoradic-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a569bce239c27c7c5ec1eb0b7ba681b0", "sha256": "378e3822a0b3149bc4709d2822d038d82bf5b138db19868dfe96df20fc5af50b" }, "downloads": -1, "filename": "factoradic-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "a569bce239c27c7c5ec1eb0b7ba681b0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7383, "upload_time": "2018-02-03T09:00:04", "url": "https://files.pythonhosted.org/packages/6c/81/c237352a4eda57515be7015a54240ae0a00504e0db206e9918da0619e50b/factoradic-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b4cda966e2528ec30703f970b2209f47", "sha256": "132dbfc88363daca6e2007f5c572fe019fcdbb0705e10f239a0461b53346b618" }, "downloads": -1, "filename": "factoradic-1.0.3.tar.gz", "has_sig": false, "md5_digest": "b4cda966e2528ec30703f970b2209f47", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5900, "upload_time": "2018-02-03T09:00:07", "url": "https://files.pythonhosted.org/packages/b5/0d/e06b2702cc7c66d9cebc4ba31e575419cd24abb1132698ab1ddbab1a8e3c/factoradic-1.0.3.tar.gz" } ] }