Swarmauri Hamming (7,4) matrix community package.
Project description
Swarmauri Matrix Hamming(7,4)
The swarmauri_matrix_hamming74 package provides a binary Hamming (7,4) code matrix that extends MatrixBase. It includes generator and parity-check representations, encoding and decoding helpers, and tight integration with the swarmauri_metric_hamming package for error detection and correction workflows.
Features
- 🧮 Binary matrix implementation built on
MatrixBasewith full indexing and arithmetic support. - 🧷 Generator and parity-check matrix accessors for classic Hamming (7,4) coding schemes.
- 📨 Encoding, syndrome calculation, and nearest-codeword decoding helpers powered by the Hamming metric.
- 🔁 Binary-safe matrix operations (addition, subtraction, multiplication, and matrix multiplication modulo 2).
Installation
Using uv
uv pip install swarmauri_matrix_hamming74
Using pip
pip install swarmauri_matrix_hamming74
Usage
from swarmauri_matrix_hamming74 import Hamming74Matrix
matrix = Hamming74Matrix()
message = [1, 0, 1, 1]
codeword = matrix.encode(message)
# Introduce a single-bit error
received = codeword.copy()
received[3] ^= 1
# Decode using syndrome lookup and Hamming distance search
nearest = matrix.nearest_codeword(received)
print(nearest) # Recovers the original codeword
Support
- Python 3.10, 3.11, and 3.12
- Licensed under the Apache-2.0 license
Contributing
We welcome contributions! Please submit issues and pull requests through the Swarmauri SDK GitHub repository.
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 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 swarmauri_matrix_hamming74-0.9.3.dev21.tar.gz.
File metadata
- Download URL: swarmauri_matrix_hamming74-0.9.3.dev21.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e265cd0a1fd0d028f511834ece7db97d84282d825f510f4cd0cea91bec2f4a72
|
|
| MD5 |
048d2d1f39b9b8fde81de446843535ac
|
|
| BLAKE2b-256 |
ee7fe6d49c9af1325bcbd4d824147418339e1de1c0ecfa308573295ded96e81e
|
File details
Details for the file swarmauri_matrix_hamming74-0.9.3.dev21-py3-none-any.whl.
File metadata
- Download URL: swarmauri_matrix_hamming74-0.9.3.dev21-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c24c9f7e290f03592861858ef853780f419da68f2f26227768bccd8339decae
|
|
| MD5 |
6861800e1f5c1e86c849fff7705dc7d9
|
|
| BLAKE2b-256 |
1e051c1a7a353d69d09d940f61a2141e0dd6ee129ab1f63499c4410df0943671
|