LempelZiv-76 complexity engine. Suited for complexity analysis of time series.
Project description
lzcomplexity
lzcomplexity is a C++ library that provides a suite of entropy measures for time series data, based on the Lempel-Ziv 76 (LZ76) factorization algorithm.
Prerequisites
- CMake version >= 3.5
- C++20 compatible compiler:
- apple-clang >= 14
- clang >= 17
- GNU >= 9.4
Prepare the Local Workspace
The project uses the submodules oneTBB for parallel works and pybind11 for building the Python binding of the library.
- Initialize the submodules:
git submodule init
- Clone the submodules into your local directory:
git submodule update --recursive
- Apply the oneTBB patch:
patch external/tbb/CMakeLists.txt patches/tbb.patch
Build and install locally
- Create a build directory and navigate to it:
mkdir build && cd build
- Configure the build process using CMake:
cmake -DCMAKE_BUILD_TYPE=Release ..
- Build and install the library:
make install
lzcomplexity
CMake Options
BUILTIN_TBB(OFF by default): use local oneTBB project instead of system one.LZ_SHARE(ON by default): build shared library.LZ_ONLY_LIBS(OFF by default): build only the libraries (lzcore, lzapp and lzdist).LZ_ONLY_CORE(OFF by default): build only the core library.LZ_APP(ON by default): build the lzcomplexity standalone application.LZ_DISTANCE(ON by default): build the lzdistance standalone application.BUILD_PYTHON(OFF by default): enable python binding.ASAN(OFF by default): configure the build with sanitizer for debug the application (only for clang).ENABLE_ADDRESS_SANITIZER(OFF by default): activate the sanitizer address option for detect memory error.ENABLE_MEMORY_SANITIZER(OFF by default): activate the sanitizer memory option for detect uninitialized memory reads.ENABLE_UNDEFINED_SANITIZER(OFF by default): activate the sanitizer undefined option for detect undefined behavior.
Example Usage
C++ Example
#include <lz/lempelziv.h>
int main() {
lz::sequence seq = "some data sequence";
int result = lz::lz76Factorization(seq);
double entropy = lz::lz76EntropyDensity(seq);
std::cout << "LZ76 Complexity: " << result << std::endl;
std::cout << "Entropy density: " << entropy << std::endl;
return 0;
}
Python Example
import lzcomplexity as lz
seq = "some data sequence"
result = lz.lz76(seq)
print("LZ76 Complexity:", result.complexity)
print("Entropy density:", result.entropy)
License
This project is licensed under the MIT License - see the LICENSE file for details.
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 Distributions
Built Distributions
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 lzcomplexity-0.9.6-cp312-cp312-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: lzcomplexity-0.9.6-cp312-cp312-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.12, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec66a3c6c059850460e6e7b889b97f95374b983bd5395dd5ae9001e05a78d645
|
|
| MD5 |
9125614ef0659aefd29f81b782c5965e
|
|
| BLAKE2b-256 |
a8ebfeba9569bedbd0ab05984c7981a6fb4e465a5b6972207b689ef9cb606814
|
File details
Details for the file lzcomplexity-0.9.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: lzcomplexity-0.9.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd5a084a7cd873a040a38bc90407bdf35a2da1bfc0f8ed87871c21cb57bf5708
|
|
| MD5 |
76a8840bc56e04103aafbf5822795b72
|
|
| BLAKE2b-256 |
a02ac04652f2c3f129b6bcc4bd4ebeeab171647341f76c68ec3b97b676a754bb
|
File details
Details for the file lzcomplexity-0.9.6-cp312-cp312-macosx_12_0_x86_64.whl.
File metadata
- Download URL: lzcomplexity-0.9.6-cp312-cp312-macosx_12_0_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.12, macOS 12.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15d908796d314704be5075bf5812f875c888dab61938fd01e831cceec544194d
|
|
| MD5 |
67a81502a0d7e3301a7b6e12ebff89f5
|
|
| BLAKE2b-256 |
ec643e7a1967c46580a7fc0b55f96d1b52119f60492c51c36e9a97fb8b2e6667
|
File details
Details for the file lzcomplexity-0.9.6-cp312-cp312-macosx_12_0_arm64.whl.
File metadata
- Download URL: lzcomplexity-0.9.6-cp312-cp312-macosx_12_0_arm64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.12, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6aa98a6d7005eeb451b71e54e36ea215f1bf248897369c044da206950abc530a
|
|
| MD5 |
b654c5e0e090d18708ca1127c3c6a74f
|
|
| BLAKE2b-256 |
a3d73f15c75ca7e47fa7380a6f49fc4fa0e748498ac88df649bcbc61637a9ad0
|
File details
Details for the file lzcomplexity-0.9.6-cp311-cp311-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: lzcomplexity-0.9.6-cp311-cp311-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.11, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a27f72fb0c06566d571391c8d8fe166be68f2e7f6f5eb7f8c268b1cc664ee00
|
|
| MD5 |
4c2ac6b3c5133c6d7d48b14cf1a9add3
|
|
| BLAKE2b-256 |
7cde985c8ff27ba559d84d7249c7c6dbe9d04992ef0909e01f0716ecca2ac15d
|
File details
Details for the file lzcomplexity-0.9.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: lzcomplexity-0.9.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
889902586b338f9d3eb8a5182602c8ddc9f6022e29dfb60f7cca122484be3bfe
|
|
| MD5 |
5b98e40f3cb56159925c8d4650d0d572
|
|
| BLAKE2b-256 |
a98e52a9fbbfe07677d9263bc837a1add7bafef3d0850c6dd4d0b6dcb2bb5f5d
|
File details
Details for the file lzcomplexity-0.9.6-cp311-cp311-macosx_12_0_x86_64.whl.
File metadata
- Download URL: lzcomplexity-0.9.6-cp311-cp311-macosx_12_0_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.11, macOS 12.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b03b599ac5c2737e9d52627f23405ff6535802b2242b6ece0589d8d5e41028f9
|
|
| MD5 |
bc946d83cc4c51741fc2857e01870803
|
|
| BLAKE2b-256 |
de8af11eea2d66a5c056d0303f565fb78f546e171d457d3ebf6bf1ae0b50ddb6
|
File details
Details for the file lzcomplexity-0.9.6-cp311-cp311-macosx_12_0_arm64.whl.
File metadata
- Download URL: lzcomplexity-0.9.6-cp311-cp311-macosx_12_0_arm64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.11, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
367db120f35cdd924c199c91fc857e976bcccd887ecb58c57b3d47151bfce459
|
|
| MD5 |
8d865dfc9b5e7c7f02a8fbb90cb62c0f
|
|
| BLAKE2b-256 |
b1466552a6587c03d3287f1eea785898db8cf99d4388d44fbf02bd7b70f5f42a
|
File details
Details for the file lzcomplexity-0.9.6-cp310-cp310-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: lzcomplexity-0.9.6-cp310-cp310-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.10, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4deb0c2d694101cbec0a954ebf12b56cfa73cee6d1b2a3b615025043da4adee2
|
|
| MD5 |
5c96791d5decf96e258204a6e1bc363a
|
|
| BLAKE2b-256 |
3db013303e069b81e9b6498d921c46ee84f47c751866cede73a92d2f0a27d73f
|
File details
Details for the file lzcomplexity-0.9.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: lzcomplexity-0.9.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
884c82e9c522434c52beac522b07723691be6bf5d2a2a03f154f909544e67e74
|
|
| MD5 |
10fc08f4f20452f709bd9294968da409
|
|
| BLAKE2b-256 |
6e2b314bb74dac0a32f792640a99ed1d130913df0e2479ee40a55026f2c23b54
|
File details
Details for the file lzcomplexity-0.9.6-cp310-cp310-macosx_12_0_x86_64.whl.
File metadata
- Download URL: lzcomplexity-0.9.6-cp310-cp310-macosx_12_0_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.10, macOS 12.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c38d9155f707464fc1ead7ac70f1ce4b61325804aeb8f2b11468fca36b57ab06
|
|
| MD5 |
081f7ae872170c53d8c52ae469075ce6
|
|
| BLAKE2b-256 |
014573e7935e460d19ef4b455d127bff9b4f48145141bc4b75f728d6e177fadc
|
File details
Details for the file lzcomplexity-0.9.6-cp310-cp310-macosx_12_0_arm64.whl.
File metadata
- Download URL: lzcomplexity-0.9.6-cp310-cp310-macosx_12_0_arm64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67499cfd8eaa4d5199c387e4a0d46c8c17398f75624612e876a2df18c4dce980
|
|
| MD5 |
432a7f851614c8e35c907b858becdfd2
|
|
| BLAKE2b-256 |
c6a5171a331609ce3a7e68486df6add3e42ffa3cd2a83f6d762c14d480af68fa
|
File details
Details for the file lzcomplexity-0.9.6-cp39-cp39-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: lzcomplexity-0.9.6-cp39-cp39-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.9, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3a39baabadfd5aadc82d6b34a35f0bdde1a1c397ff5583b8cc584fe1cd4e610
|
|
| MD5 |
f17d7b71a7d298b052677008ea60ff03
|
|
| BLAKE2b-256 |
321c432c201f0822e4d91dfc42ebde5195c53481cee165aaa3e0e11c27645c1b
|
File details
Details for the file lzcomplexity-0.9.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: lzcomplexity-0.9.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a115ca4b8532cb0a2536ed572dde0ff9deea888860264de857fe2221ae0b2b06
|
|
| MD5 |
2ed2974d7b21e8a43a63f786a9478aaa
|
|
| BLAKE2b-256 |
392d1ab7738abdaf78439e3c06fa9bbcc92228c579bf4aecd631ce8b23162987
|
File details
Details for the file lzcomplexity-0.9.6-cp39-cp39-macosx_12_0_x86_64.whl.
File metadata
- Download URL: lzcomplexity-0.9.6-cp39-cp39-macosx_12_0_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.9, macOS 12.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bc4325c822d4fbaa4205ebcf00721499e809a3b155b6ed671e1b177a92a917d
|
|
| MD5 |
a5efff9a23bbd0d23b95c931cddb44a8
|
|
| BLAKE2b-256 |
3ac2aea7b3062f6c960e69bce2485b38c60e189bce0ea4c575a8d7b2dce50a0b
|
File details
Details for the file lzcomplexity-0.9.6-cp39-cp39-macosx_12_0_arm64.whl.
File metadata
- Download URL: lzcomplexity-0.9.6-cp39-cp39-macosx_12_0_arm64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.9, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78b50eae1962e73c1704bb5f61e8c01b0bd66c612686d5d3a782bd75b2b2e746
|
|
| MD5 |
e2d600e200fe8f26aae792cc81fdc35d
|
|
| BLAKE2b-256 |
163e4a0ae5b8cdce3bcac688c3cc3df32cddfc5a595f506ede4376a4eb79d133
|