{"id":13737416,"url":"https://github.com/wheerd/multiset","last_synced_at":"2025-03-17T16:12:13.867Z","repository":{"id":38361805,"uuid":"70974096","full_name":"wheerd/multiset","owner":"wheerd","description":"A multiset implementation for python","archived":false,"fork":false,"pushed_at":"2024-08-27T13:16:31.000Z","size":135,"stargazers_count":39,"open_issues_count":8,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T06:56:16.837Z","etag":null,"topics":["data-structure","library","multiset","python"],"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/wheerd.png","metadata":{"files":{"readme":"README.rst","changelog":null,"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":"2016-10-15T07:44:06.000Z","updated_at":"2024-12-27T06:45:49.000Z","dependencies_parsed_at":"2023-12-30T09:29:44.623Z","dependency_job_id":"2942e0bc-a0b6-44ba-8e2e-2bdc61ca07d4","html_url":"https://github.com/wheerd/multiset","commit_stats":{"total_commits":82,"total_committers":7,"mean_commits":"11.714285714285714","dds":0.2682926829268293,"last_synced_commit":"5eeeb34a20c52da604a3532f28634242a391f073"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wheerd%2Fmultiset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wheerd%2Fmultiset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wheerd%2Fmultiset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wheerd%2Fmultiset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wheerd","download_url":"https://codeload.github.com/wheerd/multiset/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244066189,"owners_count":20392406,"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":["data-structure","library","multiset","python"],"created_at":"2024-08-03T03:01:47.044Z","updated_at":"2025-03-17T16:12:13.845Z","avatar_url":"https://github.com/wheerd.png","language":"Python","readme":"multiset\n========\n\nThis package provides a multiset_ implementation for python.\n\n|pypi| |coverage| |build| |docs|\n\nOverview\n--------\n\nA multiset is similar to the builtin set_, but it allows an element to occur multiple times.\nIt is an unordered collection of elements which have to be hashable just like in a set_.\nIt supports the same methods and operations as set_ does, e.g. membership test, union, intersection, and\n(symmetric) difference::\n\n    \u003e\u003e\u003e set1 = Multiset('aab')\n    \u003e\u003e\u003e set2 = Multiset('abc')\n    \u003e\u003e\u003e sorted(set1 | set2)\n    ['a', 'a', 'b', 'c']\n\nMultisets can be used in combination with sets_::\n\n    \u003e\u003e\u003e Multiset('aab') \u003e= {'a', 'b'}\n    True\n\nMultisets are mutable::\n\n    \u003e\u003e\u003e set1.update('bc')\n    \u003e\u003e\u003e sorted(set1)\n    ['a', 'a', 'b', 'b', 'c']\n\nThere is an immutable version similar to the frozenset_ which is also hashable::\n\n    \u003e\u003e\u003e set1 = FrozenMultiset('abc')\n    \u003e\u003e\u003e set2 = FrozenMultiset('abc')\n    \u003e\u003e\u003e hash(set1) == hash(set2)\n    True\n    \u003e\u003e\u003e set1 is set2\n    False\n\nThe implementation is based on a dict_ that maps the elements to their multiplicity in the multiset.\nHence, some dictionary operations are supported.\n\nIn contrast to the `collections.Counter`_ from the standard library, it has proper support for set\noperations and only allows positive counts. Also, elements with a zero multiplicity are automatically\nremoved from the multiset.\n\nInstallation\n------------\n\nInstalling `multiset` is simple with `pip \u003chttp://www.pip-installer.org/\u003e`_::\n\n    $ pip install multiset\n\nDocumentation\n-------------\n\nThe documentation is available at `Read the Docs`_.\n\n.. _`Read the Docs`: http://multiset.readthedocs.io/\n\nAPI Documentation\n.................\n\nIf you are looking for information on a particular method of the Multiset class, have a look at the\n`API Documentation`_. It is automatically generated from the docstrings.\n\n.. _`API Documentation`: http://multiset.readthedocs.io/en/latest/api.html\n\nLicense\n-------\n\nLicensed under the MIT_ license.\n\n\n.. _multiset: https://en.wikipedia.org/wiki/Multiset\n.. _set: https://docs.python.org/3.10/library/stdtypes.html#set-types-set-frozenset\n.. _sets: set_\n.. _frozenset: set_\n.. _dict: https://docs.python.org/3.10/library/stdtypes.html#mapping-types-dict\n.. _`collections.Counter`: https://docs.python.org/3.10/library/collections.html#collections.Counter\n.. _MIT: https://opensource.org/licenses/MIT\n\n\n.. |pypi| image:: https://img.shields.io/pypi/v/multiset.svg?style=flat-square\u0026label=latest%20stable%20version\n    :target: https://pypi.python.org/pypi/multiset\n    :alt: Latest version released on PyPi\n\n.. |coverage| image:: https://coveralls.io/repos/github/wheerd/multiset/badge.svg?branch=master\n    :target: https://coveralls.io/github/wheerd/multiset?branch=master\n    :alt: Test coverage\n\n.. |build| image:: https://github.com/wheerd/multiset/workflows/Tests/badge.svg?branch=master\n    :target: https://github.com/wheerd/multiset/actions?query=workflow%3ATests\n    :alt: Build status of the master branch\n\n.. |docs| image:: https://readthedocs.org/projects/multiset/badge/?version=latest\n    :target: http://multiset.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwheerd%2Fmultiset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwheerd%2Fmultiset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwheerd%2Fmultiset/lists"}