A package for performing operations on numeric sets
Project description
Operations on Sets of Numeric Intervals
This package allows you to perform all operations on sets of numeric intervals. NumericSet class has all methods of Python set data structure as well as many additional ones. Intervals class has all basic methods to work with numeric intervals.
Usage example
Import classes from the main module of the package into your Python script.
from numeric_sets.main import Interval, NumericSet
main.main()
Feel free to perform any operation!
myset_1 = NumericSet()
myset_1.add(Interval(2, 4, True, True)) # [2, 4]
myset_1.add(Interval(5, 7)) # (5, 7)
myset_1.add(Interval(8, 10, is_end_inclusive=True)) # (8, 10]
myset_2 = NumericSet()
myset_2.add(Interval(2, 5)) # (2, 5)
myset_2.add(Interval(6, 9)) # (6, 9)
union = myset_1.union(
myset_2) # [2, 5) + (5, 10]
Meta
Dmytro Yaroshevych – dyaroshevych@gmail.com
Distributed under the MIT license. See LICENSE
for more information.
https://github.com/dyaroshevych/numeric_sets
Contributing
- Fork it (https://github.com/dyaroshevych/numeric_sets/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for numeric_sets_dyaroshevych-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 631bdd4ec6218964c2dfc9185cf4b559f4c46859e4c36790b680acc928c575fb |
|
MD5 | 3dbb7cf0d2f664a64fb8767026de3fdf |
|
BLAKE2b-256 | 661e2745793aa5394d676014d903762770c9564b1ccd66604cbe5b50a87f4b1b |
Close
Hashes for numeric_sets_dyaroshevych-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea12e8170d7e8878c88fa1597ea7e9cfb3f18287d96ad220e7d90bd781a0aa87 |
|
MD5 | 3e2d27b9b6be6b0f69e9067fa65dec55 |
|
BLAKE2b-256 | 41da11683f04c7cf2f72ed1c9f616419c93901139ad732b7a6e8be22d1cf591b |