set-algebra


Nameset-algebra JSON
Version 0.3.6 PyPI version JSON
download
home_pagehttps://github.com/blackelk/set-algebra
SummaryAlgebra of Sets
upload_time2024-03-30 19:26:56
maintainerNone
docs_urlNone
authorConstantine Parkhimovich
requires_pythonNone
licenseMIT
keywords math set interval
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Algebra of Sets in Python
=================================

| How to have a set containing all real numbers from 1 to 10 not including 10?
| How to add interval from 20 to 30 to the set?
| How to make sure this set is a subset of set of positive numbers?
| How to add scalar number to it?
| How to get complement of the set?

.. code:: python

    >>> from set_algebra import Interval, Set
    >>> s = Set('[1, 10)')
    >>> 1 in s
    True
    >>> 10 in s
    False
    >>> s.add(Interval('[20, 30]'))
    >>> 25 in s
    True
    >>> s <= Set('(0, inf)')
    True
    >>> s.add(100)
    >>> s.notation
    '[1, 10), [20, 30], {100}'
    >>> (~s).notation
    '(-inf, 1), [10, 20), (30, 100), (100, inf)'

Set-Algebra provides classes representing math concepts:

- Infinity
- Endpoint
- Interval
- Uncountable Infinite Set

Besides numbers, Set-Algebra supports all objects that can be compared to each other - strings, datetimes, etc.

Infinity() is greater than any of these objects except float('inf') and float('nan').
NegativeInfinity included as well.


Set-Algebra fully supports Python3. Tested on python 2.7, 3.2 - 3.6.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/blackelk/set-algebra",
    "name": "set-algebra",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "math set interval",
    "author": "Constantine Parkhimovich",
    "author_email": "cparkhimovich@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ad/96/56ee95ed3fb85f55b90d63081b72ccfd05228494916b06bdd7a33b0fbe13/set-algebra-0.3.6.tar.gz",
    "platform": null,
    "description": "Algebra of Sets in Python\n=================================\n\n| How to have a set containing all real numbers from 1 to 10 not including 10?\n| How to add interval from 20 to 30 to the set?\n| How to make sure this set is a subset of set of positive numbers?\n| How to add scalar number to it?\n| How to get complement of the set?\n\n.. code:: python\n\n    >>> from set_algebra import Interval, Set\n    >>> s = Set('[1, 10)')\n    >>> 1 in s\n    True\n    >>> 10 in s\n    False\n    >>> s.add(Interval('[20, 30]'))\n    >>> 25 in s\n    True\n    >>> s <= Set('(0, inf)')\n    True\n    >>> s.add(100)\n    >>> s.notation\n    '[1, 10), [20, 30], {100}'\n    >>> (~s).notation\n    '(-inf, 1), [10, 20), (30, 100), (100, inf)'\n\nSet-Algebra provides classes representing math concepts:\n\n- Infinity\n- Endpoint\n- Interval\n- Uncountable Infinite Set\n\nBesides numbers, Set-Algebra supports all objects that can be compared to each other - strings, datetimes, etc.\n\nInfinity() is greater than any of these objects except float('inf') and float('nan').\nNegativeInfinity included as well.\n\n\nSet-Algebra fully supports Python3. Tested on python 2.7, 3.2 - 3.6.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Algebra of Sets",
    "version": "0.3.6",
    "project_urls": {
        "Homepage": "https://github.com/blackelk/set-algebra"
    },
    "split_keywords": [
        "math",
        "set",
        "interval"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ad9656ee95ed3fb85f55b90d63081b72ccfd05228494916b06bdd7a33b0fbe13",
                "md5": "a81392084338211d642845d1c90de67f",
                "sha256": "306bba7f293f6c44e1e5a4282d83ede006323f3536f593af5ed2b0bb33a200f8"
            },
            "downloads": -1,
            "filename": "set-algebra-0.3.6.tar.gz",
            "has_sig": false,
            "md5_digest": "a81392084338211d642845d1c90de67f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 26004,
            "upload_time": "2024-03-30T19:26:56",
            "upload_time_iso_8601": "2024-03-30T19:26:56.531093Z",
            "url": "https://files.pythonhosted.org/packages/ad/96/56ee95ed3fb85f55b90d63081b72ccfd05228494916b06bdd7a33b0fbe13/set-algebra-0.3.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-30 19:26:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "blackelk",
    "github_project": "set-algebra",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "set-algebra"
}
        
Elapsed time: 0.24319s