Skip to main content

C-based extension implementing fast integer bit sets

Project description

https://travis-ci.org/inveniosoftware/intbitset.png?branch=master https://coveralls.io/repos/inveniosoftware/intbitset/badge.png?branch=master https://pypip.in/v/intbitset/badge.png https://pypip.in/d/intbitset/badge.png

Installation

intbitset is on PyPI so all you need is:

pip install intbitset

Documentation

Provides an intbitset data object holding unordered sets of unsigned integers with ultra fast set operations, implemented via bit vectors and Python C extension to optimize speed and memory usage.

Emulates the Python built-in set class interface with some additional specific methods such as its own fast dump and load marshalling functions. Uses real bits to optimize memory usage, so may have issues with endianness if you transport serialized bitsets between various machine architectures.

Please note that no bigger than __maxelem__ elements can be added to an intbitset.

>>> x = intbitset([1,2,3])
>>> y = intbitset([3,4,5])
>>> print x & y
intbitset([3])
>>> print x | y
intbitset([1, 2, 3, 4, 5])

Complete documentation is available at <http://intbitset.readthedocs.org> or can be build using Sphinx:

pip install Sphinx
python setup.py build_sphinx

Testing

Running the tests are as simple as:

python setup.py test

or (to also show test coverage)

source run-tests.py

License

Copyright (C) 2013 CERN.

intbitset is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

intbitset is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with intbitset; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.

In applying this licence, CERN does not waive the privileges and immunities granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction.

Bitdeli badge

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

intbitset-2.0.tar.gz (133.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

intbitset-2.0.linux-x86_64.tar.gz (192.4 kB view details)

Uploaded Source

File details

Details for the file intbitset-2.0.tar.gz.

File metadata

  • Download URL: intbitset-2.0.tar.gz
  • Upload date:
  • Size: 133.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for intbitset-2.0.tar.gz
Algorithm Hash digest
SHA256 ec00eb3631ef896455930ba4791a10fd1167dda0dada3d8b76be77e93b118c6b
MD5 b6f87ab9090d3567c340cd633cab0d11
BLAKE2b-256 52d83358f3ded5c80fbc4ac408fc57d1c0374d2fb3ee0d048547eb24b61a0475

See more details on using hashes here.

File details

Details for the file intbitset-2.0.linux-x86_64.tar.gz.

File metadata

File hashes

Hashes for intbitset-2.0.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 d7bf1088f679fd5fe9f1fa635e99f8b499a1da5694699ee69b6c7429028b7c50
MD5 5f921f9c98d703e7b0c26f746f1d90cf
BLAKE2b-256 5a8f5e1078e3b7bbeabb3cade5d6d645010d0ded183e335d78042ff0fb3b0fc2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page