A collection that tries to imitate a "lazy" difference and union of sets.
Project description
# LazySet
A collection that tries to imitate a “chained” difference and union of sets and various other operations are performed lazily:
Given a base set, an iterable of sets to subtract from the base set, and an iterable of sets to now add to it (note that the order is important!), a LazySet will act exactly like a regular set and supports all the basic operations, but without actually performing any state-changing unions or differences to any of the participating sets (that take O(number of items in all sets)).
Instead, the LazySet goes over all participating sets according to their order to check if an item is contained in it, thus giving a better run time in some cases for most operations. For example, if the LazySet used is after initialization and no modifying operations were used on it, containment checking takes O(number of participating sets).
Note that when using only difference and union operations, this collection is the set equivalent of ChainMap, so it can also be called ChainSet.
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lazy_set-1.4.6.tar.gz.
File metadata
- Download URL: lazy_set-1.4.6.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4ab7de151118f774fe48bde9b08c33d16529222f9b9009eb29036eaa836869e
|
|
| MD5 |
0aae5afbee997264caf01d573d60911a
|
|
| BLAKE2b-256 |
c223248cce9a0453927df50dc6c99d927dd865b659fcba2af24a574484005763
|
File details
Details for the file lazy_set-1.4.6-py3-none-any.whl.
File metadata
- Download URL: lazy_set-1.4.6-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cccb074a0d976197c72d399137d53d414673ffd307be39b7329caece18275c3
|
|
| MD5 |
bead3e5e810ff97debb135217f604dba
|
|
| BLAKE2b-256 |
c961fd51dd7135fe0de9161993c13e92f83bc53ec885ec915e684d7b01a4947a
|