Skip to main content

Sparse Indexed Doubly Linked List

Project description

Sparse Indexed Doubly Linked List (SIDLL)

Introduction

What is it?

A Sparse Indexed Doubly Linked List (SIDLL) is a linked list that is linked in both directions and which has indices (or pointers) distributed throughout the list which enables O(log p + k) worst case time complexity for inserts, deletes and lookups where p is the size of the indices/pointers and k is the maximum distance travelled between the pointer and a given node. Sparse distribution gives the user choice to trade-off between lookup times (faster if the interpointer distance is small) and memory (less if the interpointer distance is large).

What can it be used for?

Given that it is always sorted by key, it can be used to keep track of metrics like the streaming mean, median, head/tail as well as min/max (and their associated values).

Languages

Python, C++

Methods

  • insertNode(key,value)
  • deleteNode(key)
  • getMinKey()
  • getMaxKey()
  • getMean()
  • getMedian()
  • getLength()
  • head(length:optional)
  • tail(length:optional)
  • keyExists(key)
  • getValue(key,index:optional)
  • setInterpointerDistance(distance)

Installing

Python

There are installers for Windows and manylinux works with multiple Linux distros. For example, for Python 3.8 on CentOS:

pip install sidll

C++

The .h, .cpp files and CMakeLists.txt are in the SIDLL_C++ directory.

Example

Python

import sidll
import random

s = sidll.SIDLL()
s.setVerbosity(0)
s.setInterpointerDistance(10)
deleteList = []

print("-" * 25)
print("Inserting...")
for i in range(0,100):
    randKey = random.uniform(1,100000)
    randVal = random.uniform(1,100000)
    s.insertNode(randKey,0)
    deleteList.append(randKey)
    
print("Length:%d" %s.getLength())
print("MinKey:%f" %s.getMinKey())
print("MaxKey:%f" %s.getMaxKey())
print("Median:%f" %s.getMedian())
print("Mean:%f" %s.getMean())
print(s.head())
print(s.tail())

print("-" * 25)
print("Deleting...")
for i in range(0,50):
    if not deleteList:
        break
    keyToDelete = deleteList.pop()
    s.deleteNode(keyToDelete)
    
print("Length:%d" %s.getLength())
print("MinKey:%f" %s.getMinKey())
print("MaxKey:%f" %s.getMaxKey())
print("Median:%f" %s.getMedian())
print("Mean:%f" %s.getMean())
print(s.head())
print(s.tail())

print(dir(s))

Change log

Version 0.15: First PyPI version.
Version 0.16: Added an sdist repo.

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

sidll-0.17.tar.gz (12.3 kB view details)

Uploaded Source

Built Distributions

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

sidll-0.17-pp311-pypy311_pp73-win_amd64.whl (233.2 kB view details)

Uploaded PyPyWindows x86-64

sidll-0.17-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (134.8 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

sidll-0.17-pp310-pypy310_pp73-win_amd64.whl (232.3 kB view details)

Uploaded PyPyWindows x86-64

sidll-0.17-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (133.1 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

sidll-0.17-pp39-pypy39_pp73-win_amd64.whl (232.4 kB view details)

Uploaded PyPyWindows x86-64

sidll-0.17-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (132.9 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

sidll-0.17-cp314-cp314-macosx_11_0_universal2.whl (184.4 kB view details)

Uploaded CPython 3.14macOS 11.0+ universal2 (ARM64, x86-64)

sidll-0.17-cp313-cp313-win_amd64.whl (235.5 kB view details)

Uploaded CPython 3.13Windows x86-64

sidll-0.17-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (135.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

sidll-0.17-cp313-cp313-macosx_11_0_universal2.whl (184.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ universal2 (ARM64, x86-64)

sidll-0.17-cp312-cp312-win_amd64.whl (235.5 kB view details)

Uploaded CPython 3.12Windows x86-64

sidll-0.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (135.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

sidll-0.17-cp312-cp312-macosx_11_0_universal2.whl (183.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ universal2 (ARM64, x86-64)

sidll-0.17-cp311-cp311-win_amd64.whl (234.4 kB view details)

Uploaded CPython 3.11Windows x86-64

sidll-0.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (134.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

sidll-0.17-cp311-cp311-macosx_11_0_universal2.whl (182.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ universal2 (ARM64, x86-64)

sidll-0.17-cp310-cp310-win_amd64.whl (233.6 kB view details)

Uploaded CPython 3.10Windows x86-64

sidll-0.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (133.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

sidll-0.17-cp310-cp310-macosx_11_0_universal2.whl (179.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ universal2 (ARM64, x86-64)

sidll-0.17-cp39-cp39-win_amd64.whl (232.6 kB view details)

Uploaded CPython 3.9Windows x86-64

sidll-0.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (133.4 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

sidll-0.17-cp39-cp39-macosx_11_0_universal2.whl (179.8 kB view details)

Uploaded CPython 3.9macOS 11.0+ universal2 (ARM64, x86-64)

sidll-0.17-cp38-cp38-win_amd64.whl (233.8 kB view details)

Uploaded CPython 3.8Windows x86-64

sidll-0.17-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (133.1 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file sidll-0.17.tar.gz.

File metadata

  • Download URL: sidll-0.17.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.0

File hashes

Hashes for sidll-0.17.tar.gz
Algorithm Hash digest
SHA256 aec7d82c169dfa23bd2d51b07a6cead5f6a7f9ca801beb5bcfcdabb53648d801
MD5 211a295ded6ac72c4df7974a85c77d75
BLAKE2b-256 00e9e040e1eb9b143f9b05ac5de3fd77f3282adb8b9daf68b90cf49753c3c6a6

See more details on using hashes here.

File details

Details for the file sidll-0.17-pp311-pypy311_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for sidll-0.17-pp311-pypy311_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 64d1e572cf1ed366ddb41a27fa34229c12c76a12ee15e8fb4f1d6c18977331d2
MD5 29c2d8f2d759eba0d428f0848d1f51dc
BLAKE2b-256 66b6e7815db771f7592ed9e9351cc5d42e5cbc8f2e0a2630c80d63fb6146049f

See more details on using hashes here.

File details

Details for the file sidll-0.17-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sidll-0.17-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 00016994462a544d4ef10c7632d6996c95b51ad1291ddd74ffd7bad60e476c3b
MD5 c6a3e4920cb48dd2206c70aae194eedd
BLAKE2b-256 b42fc1fafdcd18e21c737b8b4da5f3e3159111a669ad80003f160bd700234607

See more details on using hashes here.

File details

Details for the file sidll-0.17-pp310-pypy310_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for sidll-0.17-pp310-pypy310_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 9263f7742e98e11f11432a8317773aa39fcc20bb867bb04e5b03121bb13a3597
MD5 63d96da63b3b8ecbbce57d2b7a530f9f
BLAKE2b-256 7c99aecb05bebad5114af3dc7abdffefef07dfaf49d851d9fba1c94d1c8cbcf2

See more details on using hashes here.

File details

Details for the file sidll-0.17-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sidll-0.17-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1d1ac908c2ab412d75f1ca60d764f0f294fd183d9720030834b9af645f7c6222
MD5 622d5c770db48d27606038d1bd62f147
BLAKE2b-256 9dbaf3a27a4b8fcb2c78b12efdd8021ec2ee3cccef69c5be27a73c8597535175

See more details on using hashes here.

File details

Details for the file sidll-0.17-pp39-pypy39_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for sidll-0.17-pp39-pypy39_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 570687ab198cc4b7fa1c0583578f4d73d67418e768c8ec5819b53c421c561b21
MD5 d6a45d45d401c2bf4f5e8d944989da2b
BLAKE2b-256 56c8fae6a0af9d5ff952c2c2406295908b91f250c9036a27d597ac1bc8dc442a

See more details on using hashes here.

File details

Details for the file sidll-0.17-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sidll-0.17-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3e9bfe6d24cde326bd1966e4c3807a8c38d3efb7b69273bb2c39a2f5527d6a17
MD5 2d617dfb4e8c7ef0a0e98d264072769d
BLAKE2b-256 01639d0b554f8035c0e5d715f0e68e0cd4848568e776c599f39deabed5007c7e

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp314-cp314-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for sidll-0.17-cp314-cp314-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 5a4ca13d56e594cf432aa2fc70bb91ade3e3aa578f688feafb4ec571a344547c
MD5 57e8b452507d4bf417ffefffda0a0a7f
BLAKE2b-256 761b84069cf9f13914c83357637ebf748a47627dc22a1a6d44025c352cb5b35d

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: sidll-0.17-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 235.5 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.0

File hashes

Hashes for sidll-0.17-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 939f408c9db548c7141b03862a7c7e7ded7861906079a0609a3a1a12bed87beb
MD5 37cb316101167e588607893c43b2f3b5
BLAKE2b-256 8a2fa97cdd3cded3f06d223e62d90d1c8d84bfa3fb29abc598426d6601838e67

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sidll-0.17-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 72aa3d6674ba7d759ab6925e125bfc90101aa94c3745efb2a59b288e0eb53182
MD5 3e77ed5831d10177a9aa01dbaddf875d
BLAKE2b-256 52b61fc89f19ee392a367263e77babb4075fee5c9a9a2944d22cac8944dd7794

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp313-cp313-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for sidll-0.17-cp313-cp313-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 aa61a920c80245933f5d760cd9251c6e86d47f8d3a4b861c7abde3775ab7f3ab
MD5 ef756c14f82f2c7e2270080d78cd036c
BLAKE2b-256 87015335b8fad25b46fd41d6366d3e5598db9a2705aa1d4410fb56d676bbf95b

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: sidll-0.17-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 235.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.0

File hashes

Hashes for sidll-0.17-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d36381c1c3bfdcfa155fd492382707eb6b614ac88d71667094e02dcb2a5e414b
MD5 f6f4d210eedc71f422ad87239c5b01da
BLAKE2b-256 9af2400ea2990e2ef5b1477dc43e3b7766c097429abf66e18a67f7a9e6fb767d

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sidll-0.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2e3fd7cd7816788d7d183d1ce24f73b702b255ba3658f1f2c3d4e2227d222abe
MD5 103642360cdb9f1e99b25b9cabf803b8
BLAKE2b-256 c0b62699c08ea8aef348c3576da38fda6c29731294088cb18575c5e626928bcd

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp312-cp312-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for sidll-0.17-cp312-cp312-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 0f5c73c48c9a848cb0dd384ae7abb463fd25fa2d0e0b446d757953ab74fde63f
MD5 4a91eeca912cb4254705eb9e3faec136
BLAKE2b-256 f4f51b32bbc6147d2ca4a525c1b55788a41e89430697d9570f150d3f743beb72

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: sidll-0.17-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 234.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.0

File hashes

Hashes for sidll-0.17-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 14b6344847dea906ff78d4d3e23cbd068bea3a901c447c8e1015af1e241fb3ca
MD5 e38419bd44095924dcf70fba3354227d
BLAKE2b-256 fdea2114118ef51784586a2a43f7416b59268cb6e51fa95ab168268a5da519e9

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sidll-0.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1aeb667f433c5075e996a0867ffcf2e32b70d58fb06ccbb51c105dfde7b446b7
MD5 8bcc04dd3bae4edb288d83b01de0b5aa
BLAKE2b-256 a4c5b39a320c07ecc66654509f0af7571075a23aa9c2a794a1c61ca40396dbaa

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp311-cp311-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for sidll-0.17-cp311-cp311-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 f38b817d1e1e755a0f0b2f5a9c3eeef9f739edd399edca29e4ebd7f773f23b83
MD5 24d970570b9e9752dd621bfbe9f3291d
BLAKE2b-256 15b4d3f4c32cf6bee3b7a53ace06f1546479cedf489e6641c2579c3157855c70

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: sidll-0.17-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 233.6 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.0

File hashes

Hashes for sidll-0.17-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c20427d423ece0b9e9033be52ee3e1f3e2ce146a608fa9c55735b52394d223f8
MD5 b7e37e11abb8876c6f0211c35b60b862
BLAKE2b-256 5fa5db4c32989e88c93f401bd185f19f061efb19a661207da76558d2ccf5727e

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sidll-0.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cb7fdfbebf71f7f231d4d7f640b22537f53c6d2b122958dceab64e9231fb83d2
MD5 1ea62181b73081cda3b416afccdc4e3c
BLAKE2b-256 b947c16254fdcecf159064b3ef816f0691c6e0198647e1b62baddb6e5ec4d60f

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp310-cp310-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for sidll-0.17-cp310-cp310-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 7a6c1050d02ab6732506fb79d13863ee278d629a08ab7d956b5d88e19e74050f
MD5 47f01711ea3ae3636e6c6307487bae0b
BLAKE2b-256 18e452606cfc9794c91e19eccf86a73b8e39b68088c874451afb1295c36f08b9

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: sidll-0.17-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 232.6 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.0

File hashes

Hashes for sidll-0.17-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bf03de74bd9373c8f94fb18378757a725e5e03ad731d886bf13ea7c95924bea1
MD5 db70042e3ab9c8c211accd3774854d59
BLAKE2b-256 9337eba1200b8f6a62cd8cab3e6766190372c8b7b0378c4d2b6b8f2a583e87c1

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sidll-0.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 737a0568746e80b86bcfcf7b49198d6a96277356a917aadb6da3c742ff0d2b69
MD5 7633f99bfb0d2238dc29ca3f2467618c
BLAKE2b-256 c63aed89e340a9ffd87f5bce4198b3adc884c4a02d93a8f65c0f4bb8019584f3

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp39-cp39-macosx_11_0_universal2.whl.

File metadata

  • Download URL: sidll-0.17-cp39-cp39-macosx_11_0_universal2.whl
  • Upload date:
  • Size: 179.8 kB
  • Tags: CPython 3.9, macOS 11.0+ universal2 (ARM64, x86-64)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.0

File hashes

Hashes for sidll-0.17-cp39-cp39-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 679f2f632da1348e8228499f6ac7e7bffaea829f7b460961f798abf9b4eb559f
MD5 2c4c66a3c6fb82eb3156eb422029fceb
BLAKE2b-256 9c31cbce197f48ce7b51ec495e66fb9b10c3e95b8a87c6212ff5e179272b7e42

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: sidll-0.17-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 233.8 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.0

File hashes

Hashes for sidll-0.17-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 60dcb18d99dc500912e58df678989260eed048edc2938891df86ade4a84da6bb
MD5 5acdc58ea1957d8b445cebf3140b9e4b
BLAKE2b-256 289d1c31d4533759a4621a7e41326a787b0caa3824899d8382d9b3a29515acc5

See more details on using hashes here.

File details

Details for the file sidll-0.17-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sidll-0.17-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c9ebadb3ce94ea31daec44e7700f8e6ec9794ab4da2b5a80799528da13af19be
MD5 cbb7edf1fa340a82f20a9b907e2bd684
BLAKE2b-256 02851ec0bff5b53cdb6f6ad2b9ba86f176e98d14efb310c544e667066e4f1592

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