analog-ecc-heights
Python and C++ methods for computing the height profile of analog error-correcting codes, including Jiang's LP formulations and Roth's LP and combinatorial formulations. The distribution is analog-ecc-heights; the Python import is analog_ecc_heights.
One package provides a NumPy/SciPy implementation by default and optional native backends. Installing native support does not change the default backend.
Install
Requires Python 3.10 or later. Pip installs NumPy >=1.23 and SciPy >=1.9 automatically. With Python and Git installed, start from a fresh checkout:
git clone https://github.com/EricYJA/Analog-ECC-height-profile-methods.git
cd Analog-ECC-height-profile-methods
python -m venv .venv
If your Python command is python3 or py, use it to create the environment. Activate it using the command for your shell:
| Platform / shell | Activation command |
|---|---|
| Linux or macOS / Bash or Zsh | source .venv/bin/activate |
| Windows / PowerShell | .\.venv\Scripts\Activate.ps1 |
| Windows / Command Prompt | .venv\Scripts\activate.bat |
Then install into the active environment:
python -m pip install .
An existing Python environment also works. See environment setup for details and the optional Conda workflow.
The default installation does not invoke CMake or require a compiler, Eigen, GLPK, or a separately installed HiGHS library. Native support is an optional source build of this same distribution; see installation.
Use
import numpy as np
from analog_ecc_heights import (
available_backends,
h_m_roth_primal_lp,
h_m_roth_primal_combinatorial,
)
G = np.array([[1.0, 0.0, 1.0], [0.0, 1.0, 1.0]])
print(h_m_roth_primal_lp(G, 1)) # 2.0
print(h_m_roth_primal_lp(G, 1, early_quit_threshold=1.5)) # 1.5
print(h_m_roth_primal_combinatorial(G)) # [2.0]
print(available_backends()) # ["python"] in a default install
For a native-enabled installation, select the implementation explicitly:
h_m_roth_primal_lp(G, 1, backend="cpp-glpk")
h_m_roth_primal_lp(G, 1, backend="cpp-highs", num_threads=1)
h_m_roth_primal_combinatorial(G, 1, backend="cpp", num_threads=1)
| Backend | Methods | Separately installed native dependencies |
|---|---|---|
python |
LP and combinatorial | None; LP uses the HiGHS solver included with SciPy |
cpp |
Combinatorial | Eigen headers at build time; OpenMP |
cpp-glpk |
LP | Eigen headers at build time; GLPK headers and library |
cpp-highs |
LP | Eigen headers at build time; HiGHS headers and library; OpenMP |
An unavailable backend raises an installation error. Unsupported combinations raise an argument error. Calls never switch to another backend automatically.
Documentation and examples
- Installation and native builds
- API, backend selection, and numerical behavior
- Runnable examples: basic usage, height profiles, and backend comparison
License
Licensed under the MIT License. Copyright (c) 2026 Changcheng Yuan.
References
All implementations are based on the methods and theorems developed in these papers:
- Ron M. Roth, “Analog Error-Correcting Codes,” IEEE Transactions on Information Theory, 66(7), 4075–4088, 2020.
- Anxiao Jiang, “Analog Error-Correcting Codes: Designs and Analysis,” IEEE Transactions on Information Theory, 70(11), 7740–7756, 2024.
- Ron M. Roth, Ziyuan Zhu, Changcheng Yuan, Paul H. Siegel, and Anxiao Jiang, “On the Height Profile of Analog Error-Correcting Codes,” 2026 IEEE International Symposium on Information Theory (ISIT), also available as arXiv:2602.20366.
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 analog_ecc_heights-0.1.0.tar.gz.
File metadata
- Download URL: analog_ecc_heights-0.1.0.tar.gz
- Upload date:
- Size: 55.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f76a99ee36cda66ebf1ca1e0cb693fbd562968cadf287c5d0654f6aaa2e1228
|
|
| MD5 |
c23f05eaddf143c77f6b14f5082d2161
|
|
| BLAKE2b-256 |
f9156384e9895f61e38838b8bd2042ae3abd5761ab9e0ab46699245e170d0ab3
|
File details
Details for the file analog_ecc_heights-0.1.0-py3-none-any.whl.
File metadata
- Download URL: analog_ecc_heights-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92ff5d4e5104a00f20b3986cd1962f6098b7bf95c619090ff8bf8e7b25c5e3b7
|
|
| MD5 |
240313430806da269ba34957695d525e
|
|
| BLAKE2b-256 |
4f0227d288b288bcd485250bc66431f2ccc22099f3b6f8236dc6b8323f0ff103
|