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 https://d2weczhvl823v0.cloudfront.net/kaplun/intbitset/trend.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.

Project details


Release history Release notifications

History Node

2.3.0

History Node

2.2.1

History Node

2.1.1

This version
History Node

2.1

History Node

2.0

History Node

1.4

History Node

1.4a

History Node

1.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
intbitset-2.1-1.src.rpm (141.0 kB) Copy SHA256 hash SHA256 RPM 2.7 Jun 16, 2014
intbitset-2.1-1.x86_64.rpm (216.6 kB) Copy SHA256 hash SHA256 RPM 2.7 Jun 16, 2014
intbitset-2.1.linux-x86_64.tar.gz (210.1 kB) Copy SHA256 hash SHA256 Dumb Binary 2.7 Jun 16, 2014
intbitset-2.1.tar.gz (134.6 kB) Copy SHA256 hash SHA256 Source None Jun 16, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page